Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6: Lit 3 and Material Design 3 #180

Open
4 of 10 tasks
motss opened this issue May 6, 2020 · 9 comments
Open
4 of 10 tasks

v6: Lit 3 and Material Design 3 #180

motss opened this issue May 6, 2020 · 9 comments

Comments

@motss
Copy link
Owner

motss commented May 6, 2020

What to expect

  • AppDatePicker - 🎉 Redesigned date picker element with Material Design 2
  • AppDatePickerDialog - 🎉 Redesigned date picker dialog element with Material Design 2
  • AppDatePickerInput - 🆕 New date picker input element with Material Design 2

Highlights

  • All elements are implemented with great keyboard and mouse support for interaction in desktops. Read the Caveats section below to find out why only desktops are supported.
  • All elements are inspired by material-web to provide great extensibility that allows users to not only able to extend the base elements but also can override the original implementation. All thanks to JavaScript Classes and lit. 🚀
  • All elements are fully compatible and interoperable with the elements in material-web so that users can make full use of Material Design 2 consistently in their projects.
  • The infrastructure of the project also receives major overhaul to use the latest and the greatest toolings available that are more web compatible. As such, it is able to ship with 100% code coverage for all the written code to ensure superior code safety and consistent behavior on all evergreen browsers.
  • All published codes are compatible with modern toolings so that users can choose to down compile the code when needed with their favorite project configuration and compilation tools such as Rollup, Webpack, Parcel, Skypack, or Vite, just to name a few.

Caveats

  • The major overhaul only supports desktops. This decision is made to embrace the web platform in the year 2021 as input[type=date] has had great support in all mobile OSes for years and they leverage its own native date picker UI.

Planned

  • AppRangeDatePicker - 🆕New range date picker first introduced in the Material Design 2. Again this will only support desktops.
  • AppRangeDatePickerDialog - 🆕New range date picker dialog with Material Design 2
  • AppRangeDatePickerInput - 🆕New range date picker input with Material Design 2

Roadmap

  • app-datepicker RC becomes the default branch on March 27, 2022! 🎉 🚀
  • [email protected] - First major release to include AppDatePicker, AppDatePickerDialog and the new AppDatePickerInput
  • [email protected] - (TBD) Another minor release to include AppRangeDatePicker, AppRangeDatePickerInput, and AppRangeDatePickerInput.
  • @material/web - v1 has been released alongside a new website designed and built with Material Design 3. Lit 3 also only available in components from @material/web. Major refactoring work needs to be done for a stable v6 release with Lit 3 and MD3 upgrades (Plans to upgrade to Lit 3 and Material Web 1 (M3)? #221). Stay tuned...

References

@userquin
Copy link
Contributor

userquin commented Jan 6, 2021

hi @motss, great work, I haven't use it since version 1:

Another change you will need to apply to app-datepicker is to prevent page scrolling on keyup events (only on calendar view): for example, go to your Configurable demo powered by Firebase and increase the screen font size until vertical scroll appears (Crtl ++), then focus a date on the calendar (not in dialog) and just press Arrow Up and Arrow Down moving between months => the page will scroll vertically.

This is because your handler is passive, so you cannot prevent it's propagation (I also tested to focus the target cell with preventScroll: false without success), so I suggest you to change it to not using passive event handler, use keydown instead keyup and prevent it's propagation.

If the dialog is shown on a popop instead on a dialog, it is very fustrating using the keyboard, the page will scroll up and down => just see the new Web Core Vitals concepts from Google (you can see that on chrome devtools on perfomance tab it will appear a new entry called Experience (between Frames and Main), you will see there:

Warning: Cumulative Layout Shifts can result in poor user experiences.

ezgif com-gif-maker

@userquin
Copy link
Contributor

userquin commented Jan 6, 2021

I also forget you need to add to all buttons the attribute type="button", this will prevent fire submit if shown inside a form (year, current date and month buttons).

@motss
Copy link
Owner Author

motss commented Jan 6, 2021

I also forget you need to add to all buttons the attribute type="button", this will prevent fire submit if shown inside a form (year, current date and month buttons).

Please raise an issue ticket for this.

@motss
Copy link
Owner Author

motss commented Jan 6, 2021

hi @motss, great work, I haven't use it since version 1:

Another change you will need to apply to app-datepicker is to prevent page scrolling on keyup events (only on calendar view): for example, go to your Configurable demo powered by Firebase and increase the screen font size until vertical scroll appears (Crtl ++), then focus a date on the calendar (not in dialog) and just press Arrow Up and Arrow Down moving between months => the page will scroll vertically.

This is because your handler is passive, so you cannot prevent it's propagation (I also tested to focus the target cell with preventScroll: false without success), so I suggest you to change it to not using passive event handler, use keydown instead keyup and prevent it's propagation.

If the dialog is shown on a popop instead on a dialog, it is very fustrating using the keyboard, the page will scroll up and down => just see the new Web Core Vitals concepts from Google (you can see that on chrome devtools on perfomance tab it will appear a new entry called Experience (between Frames and Main), you will see there:

Warning: Cumulative Layout Shifts can result in poor user experiences.

ezgif com-gif-maker

Please raise an issue ticket for this.

@brownieboy
Copy link

There's a number of helper functions that appear to have been dropped, e.g. hasClass and findShadowTarget.

Are there alternative methods for what these used to do?

@motss
Copy link
Owner Author

motss commented Jan 22, 2022

There's a number of helper functions that appear to have been dropped, e.g. hasClass and findShadowTarget.

In v6, most of the helpers are not needed due to low usage if not no usage at all after some rewrite.

Are there alternative methods for what these used to do?

I'm assuming you're using some of the helpers in the module. IMHO this is quite risky as they are not meant for public. I'd recommend to either create your own helper functions instead of depending on those 'private' helpers in this module or just copy those to be your own helpers.

@brownieboy
Copy link

I'd recommend to either create your own helper functions instead of depending on those 'private' helpers in this module or just copy those to be your own helpers

Thanks for your reply, @motss

Yes, I'd already started copying the functions into our own repo. I just wanted to check there wasn't some new methods that I was missing.

@motss motss mentioned this issue Mar 6, 2022
Closed
@KTibow
Copy link

KTibow commented Aug 5, 2023

How is it possible for v5 to be deprecated if v6 is still an RC? All tools (eg npm-check-updates, npmjs.com) still show v5 as the latest version.

@motss
Copy link
Owner Author

motss commented Jan 18, 2024

@KTibow That’s a valid question. You may be curious about the reason. It was because v6 had to wait for the stable release of the MD web and Lit 3. Now that MD3 and Lit 3 are out with major changes, the plan is to add them to the stable v6.

@motss motss changed the title v6 v6: Lit 3 and Material Design 3 Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants