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

Exclude page row from layout definition in rows with one single element #2302

Closed
2 tasks done
apedroferreira opened this issue Jul 10, 2023 · 0 comments · Fixed by #2388
Closed
2 tasks done

Exclude page row from layout definition in rows with one single element #2302

apedroferreira opened this issue Jul 10, 2023 · 0 comments · Fixed by #2388
Assignees
Labels
enhancement This is not a bug, nor a new feature scope: toolpad-studio Abbreviated to "studio"

Comments

@apedroferreira
Copy link
Member

apedroferreira commented Jul 10, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

Right now every element in the layout of a Toolpad application is inside a Row component, even if a row only has one single element inside it.
This makes it so that the layout definition is usually more complex and has a deeper hierarchy than it needs to, especially for isolated elements, which are very common.
These types of Row components can be omitted from the page layout definition and have the Toolpad runtime wrap them automatically in rows, so that the page hierarchy becomes cleaner and easier to read.

Extra (maybe isolate to separate issue in due time): on saving a Toolpad YAML file, make it so that the file is automatically optimized according to this improvement, eliminating single-element rows.

Examples 🌈

No response

Motivation 🔦

On a first implementation of the page hierarchy explorer, it was noticed that every element at the deepest level is shown as being inside a page row, which makes it more cumbersome to work with and does not provide the most useful information as easily.
Fixing this issue would solve this type of problem on the deepest level, without any extra workarounds/inconsistencies being needed for the explorer to be easy to work with.

@apedroferreira apedroferreira added status: waiting for maintainer These issues haven't been looked at yet by a maintainer enhancement This is not a bug, nor a new feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 10, 2023
@apedroferreira apedroferreira self-assigned this Jul 10, 2023
@oliviertassinari oliviertassinari added the scope: toolpad-studio Abbreviated to "studio" label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature scope: toolpad-studio Abbreviated to "studio"
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants