Skip to content

[DashboardLayout] Remove DashboardLayout navigation prop#4881

Merged
apedroferreira merged 9 commits intomui:masterfrom
apedroferreira:remove-layout-navigation-prop
Apr 30, 2025
Merged

[DashboardLayout] Remove DashboardLayout navigation prop#4881
apedroferreira merged 9 commits intomui:masterfrom
apedroferreira:remove-layout-navigation-prop

Conversation

@apedroferreira
Copy link
Collaborator

Deprecate navigation prop in DashboardLayout for the next 2 versions.
The navigation should always be set in the AppProvider instead.

Closes #4856

@mui-bot
Copy link

mui-bot commented Apr 23, 2025

Netlify deploy preview

https://deploy-preview-4881--mui-toolpad-docs.netlify.app/

Generated by 🚫 dangerJS against 250b544

@apedroferreira apedroferreira requested review from a team and bharatkashyap April 29, 2025 08:39
* @default []
* @deprecated Set the navigation in the [AppProvider](https://mui.com/toolpad/core/react-app-provider) instead.
*/
navigation?: Navigation;
Copy link
Member

Choose a reason for hiding this comment

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

Probably also want to show a warning at runtime.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added in 9551fd1

sx,
} = props;

React.useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

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

This should only run in development, and we also have this utility. Doesn't seem to be used anywhere though

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

didn't know about it, used it here, I guess it should be used on render like this? de4d2c7

@apedroferreira apedroferreira requested a review from Janpot April 29, 2025 16:23
Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

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

We always use process.env.NODE_ENV !== 'production'

@apedroferreira apedroferreira merged commit 18156ef into mui:master Apr 30, 2025
15 checks passed
@apedroferreira apedroferreira deleted the remove-layout-navigation-prop branch April 30, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: toolpad-core Abbreviated to "core"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invariant Violation: Item not found in navigation

4 participants