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

Make all inputs fullWidth by default #9704

Merged
merged 18 commits into from
Mar 13, 2024
Merged

Make all inputs fullWidth by default #9704

merged 18 commits into from
Mar 13, 2024

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Mar 8, 2024

Problem

MUI doesn't define a consistent input width, and neither do we. As a consequence, forms mixing various input types don't show a proper alignment by default.

See this story for an illustration. Refs #8796.

Solution

Make all inputs full width by default

Before After
Capture d’écran 2024-03-08 à 22 47 03 Capture d’écran 2024-03-08 à 22 46 24

The 'all inputs' story has been updated to let the user test all existing themes, as well as an empty theme (default MUI) and a compat theme (to get the same input widths as in react-admin v4).

As a result, building custom form layouts with Stack and Grid is faster, as we don't have to set fullWidth manually in all inputs (see the changeset for the react-admin demos).

This change is easily reversible for existing apps using a custom theme.

Supersedes #9686

@fzaninotto fzaninotto changed the title Input-fullWidth Make all inputs fullWidth by default Mar 8, 2024
@fzaninotto fzaninotto added the RFR Ready For Review label Mar 8, 2024
fzaninotto and others added 5 commits March 12, 2024 21:17
@fzaninotto
Copy link
Member Author

Review applied

docs/Upgrade.md Outdated Show resolved Hide resolved
@adguernier adguernier merged commit 4992470 into next Mar 13, 2024
12 checks passed
@adguernier adguernier deleted the input-fullWidth branch March 13, 2024 14:32
@adguernier adguernier added this to the 5.0.0 milestone Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants