Skip to content

[CRUD] Refactor page titles to pageTitles and pageTitle props #4930

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

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

apedroferreira
Copy link
Member

@apedroferreira apedroferreira commented May 6, 2025

As discussed here the way that page titles integrate with CRUD needed improvements.

This PR fixes the issue with a new pageTitles prop, and by moving the PageContainer inside the Crud component.
Also added a pageContainer slot so that the page containers can be opted out of or modified.
CRUD pages now also take advantage of this to show the current page in the page breadcrumbs.

All necessary changes resulting from this have been added, and the examples can be found in 2 reverted commits in this PR to be merged after the next release.

Unrelated inclusion: also changes CRUD list view data grid so that actions column takes up less space if pinned

https://deploy-preview-4930--mui-toolpad-docs.netlify.app/toolpad/core/react-crud/#custom-page-titles
https://deploy-preview-4930--mui-toolpad-docs.netlify.app/toolpad/core/react-crud/#slots

@apedroferreira apedroferreira self-assigned this May 6, 2025
@apedroferreira apedroferreira added docs Improvements or additions to the documentation examples Relating to /examples labels May 6, 2025
@mui-bot
Copy link

mui-bot commented May 6, 2025

Netlify deploy preview

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

Generated by 🚫 dangerJS against 4524985

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label May 23, 2025
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label May 23, 2025
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label May 30, 2025
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label May 30, 2025
@apedroferreira apedroferreira moved this to In progress in Toolpad public roadmap May 30, 2025
@apedroferreira apedroferreira marked this pull request as draft June 2, 2025 16:21
@apedroferreira apedroferreira changed the title Fix CRUD page titles in several examples [CRUD] Refactor page titles to pageTitles and pageTitle props Jun 4, 2025
@apedroferreira apedroferreira removed the request for review from bharatkashyap June 4, 2025 14:57
@apedroferreira apedroferreira added component: crud and removed examples Relating to /examples labels Jun 4, 2025
@apedroferreira apedroferreira requested a review from a team June 4, 2025 15:01
@apedroferreira apedroferreira marked this pull request as ready for review June 4, 2025 15:02
Signed-off-by: Pedro Ferreira <10789765+apedroferreira@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: crud docs Improvements or additions to the documentation
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

2 participants