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

[pickers] Stop using WrapperVariantContext in Clock #8083

Merged
merged 6 commits into from
Mar 1, 2023

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Mar 1, 2023

Part of #7372

  • Remove usage of WrapperVariantContext in Clock
  • Replicate behavior by providing ampmInClock prop defaultized to true on desktop
  • refactor specific Time and DateTime picker types by removing duplicated (redundant) ampm prop and replacing it with ampmInClock with more specific (correct) default documentation

@LukasTy LukasTy added component: pickers This is the name of the generic UI component, not the React module! component: DateTimePicker The React component. component: TimePicker The React component. labels Mar 1, 2023
@LukasTy LukasTy self-assigned this Mar 1, 2023
@mui-bot
Copy link

mui-bot commented Mar 1, 2023

Netlify deploy preview

Netlify deploy preview: https://deploy-preview-8083--material-ui-x.netlify.app/

Updated pages

No updates.

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 639.2 1,158 692.8 860.92 187.824
Sort 100k rows ms 776.5 1,229.5 1,229.5 1,020.14 162.923
Select 100k rows ms 202.2 422.6 282.9 301.98 90.355
Deselect 100k rows ms 179.3 275.7 240.6 231.64 41.3

Generated by 🚫 dangerJS against 48949a2

@LukasTy LukasTy requested a review from flaviendelangle March 1, 2023 12:16
@@ -41,7 +41,7 @@ DateTimePicker.propTypes = {
ampm: PropTypes.bool,
/**
* Display ampm controls under the clock (instead of in the toolbar).
* @default false
* @default true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default was wrong. 🙈

@@ -37,12 +37,14 @@ const DesktopDateTimePicker = React.forwardRef(function DesktopDateTimePicker<TD
seconds: null,
...defaultizedProps.viewRenderers,
};
const ampmInClock = defaultizedProps.ampmInClock ?? true;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be pointless until #7279 is implemented.
Do you think it makes sense to omit it for now?

@LukasTy LukasTy requested a review from alexfauquette March 1, 2023 12:53
@LukasTy LukasTy merged commit c36efbb into mui:next Mar 1, 2023
@LukasTy LukasTy deleted the remove-wrapper-variant-from-clock branch March 1, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: DateTimePicker The React component. component: pickers This is the name of the generic UI component, not the React module! component: TimePicker The React component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants