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

[PageContainer] Allow full-size content #4480

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

Conversation

apedroferreira
Copy link
Member

@apedroferreira apedroferreira commented Nov 26, 2024

Closes #4324
Needed it already in the CRUD for the list table to take up the full space in the layout.

As per the discussion in #4324:

  • Allow full-size content inside PageContainer with flex: 1 or height: 100%.
  • Add sx prop to PageContainer.
  • Separate PageHeader from PageContainer to optionally be used as a standalone component
  • Documented both the cases above

https://deploy-preview-4480--mui-toolpad-docs.netlify.app/toolpad/core/react-page-container

@apedroferreira apedroferreira added core Infrastructure work going on behind the scenes bug 🐛 Something doesn't work component: PageContainer labels Nov 26, 2024
@apedroferreira apedroferreira self-assigned this Nov 26, 2024
@@ -1,5 +1,5 @@
{
"props": {},
"props": { "children": { "type": { "name": "node" } } },
Copy link
Member Author

@apedroferreira apedroferreira Nov 26, 2024

Choose a reason for hiding this comment

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

Proptypes are now being generated for the components which don't match the name of the folder (secondary components), I think that should be a good thing?
Changed it in the script that generates proptypes so that the API documentation for PageHeader would be there, auto-generated.

@@ -204,7 +204,7 @@ async function run(argv: HandlerArgv) {
folderName = folderName.slice(9);
}

return fileName === folderName;
return !fileName.endsWith('.test');
Copy link
Member Author

@apedroferreira apedroferreira Nov 26, 2024

Choose a reason for hiding this comment

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

Generates proptypes for all non-test files inside the folder of each component.

Copy link
Member

Choose a reason for hiding this comment

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

This is also generating proptypes for components marked as @ignore in the JSDoc comments - something to fix?

Copy link
Member Author

@apedroferreira apedroferreira Nov 27, 2024

Choose a reason for hiding this comment

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

I guess we can try to exclude them if it's easy to do.
done!

@apedroferreira apedroferreira changed the title [PageContainer] Allow full-size content inside [PageContainer] Allow full-size content Nov 26, 2024
@apedroferreira apedroferreira added scope: toolpad-core Abbreviated to "core" and removed core Infrastructure work going on behind the scenes labels Nov 26, 2024
@apedroferreira
Copy link
Member Author

Looks like the CI is having out of memory issues again, we probably either need to manage dependencies to stay under or increase instance sizes?

@bharatkashyap
Copy link
Member

Looks like the CI is having out of memory issues again, we probably either need to manage dependencies to stay under or increase instance sizes?

Yes, although I'm wondering what exactly triggered the CI out of memory issues

Copy link
Member

@bharatkashyap bharatkashyap left a comment

Choose a reason for hiding this comment

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

Looks good, just some suggestions on the docs demo and one flag on the proptypes script.

Also, I'm guessing this counts as a breaking change since we are renaming PageContainerToolbar to PageHeaderToolbar

Copy link
Member

@bharatkashyap bharatkashyap left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: PageContainer PR: out-of-date The pull request has merge conflicts and can't be merged scope: toolpad-core Abbreviated to "core"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow PageContainer Children to Fully Utilize Viewport Height
2 participants