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] Avoid deeper than 2nd level imports #11588

Merged
merged 5 commits into from
Jan 5, 2024

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Jan 5, 2024

Extracted from #9528

Refactor the existing imports with depth >2 In an effort to avoid future problems when we disallow them.

@LukasTy LukasTy added component: pickers This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature labels Jan 5, 2024
@LukasTy LukasTy self-assigned this Jan 5, 2024
@mui-bot
Copy link

mui-bot commented Jan 5, 2024

Deploy preview: https://deploy-preview-11588--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against d055e99

@@ -32,14 +32,11 @@ import {
} from '@mui/x-date-pickers/StaticDateTimePicker';
import { DateOrTimeView } from '@mui/x-date-pickers/models';
import { PickersShortcutsItem } from '@mui/x-date-pickers/PickersShortcuts';
import { DateRange } from '@mui/x-date-pickers-pro/internals/models';
import { DateRange } from '@mui/x-date-pickers-pro';
Copy link
Member

Choose a reason for hiding this comment

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

I need to move this interface to @mui/x-date-pickers-pro/models in a follow up, it's a shame to have to use the root import here but it's the best we can do for now

Copy link
Member Author

Choose a reason for hiding this comment

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

Were you considering doing a follow-up?
I can do it as well. 👍

Copy link
Member

Choose a reason for hiding this comment

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

Yes that's something I wanted to do for some time 👍
I'll handle it next week

@LukasTy LukasTy merged commit 306e62e into mui:next Jan 5, 2024
17 checks passed
@LukasTy LukasTy deleted the avoid-over-2-depth-imports branch January 5, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants