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

fix: List component input spacing #3615

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Conversation

ianjon3s
Copy link
Contributor

@ianjon3s ianjon3s commented Sep 3, 2024

What does this PR do?

Adds padding to list component inputs so that labels are correctly visually associated with corresponding inputs.

Before:
image

After:
image

display: "flex",
flexDirection: "column",
gap: theme.spacing(1.5),
}));
Copy link
Member

@jessicamcinchak jessicamcinchak Sep 3, 2024

Choose a reason for hiding this comment

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

Can you please take a look at this PR that merged last week - #3596

Since these fields are now used in two separate places (List active cards & MapAndLabel tabs) I think we want to set this as an sx prop on List-specific instane of this component so MapAndLabel can maintain it's own unique spacing too !

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ideally we want the spacing to be the same across the two, as we're essentially showing [small variations of] the same form inputs in different wrappers. To me it makes more sense to control this at the wrapper level rather than have to define twice.

Copy link
Member

Choose a reason for hiding this comment

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

I personally anticipate that we're going to be getting feedback from two direction soon even though these are similar from our perspective and the flexibility is going to come in handy.

But trust your expertise on this - if you'd like to just style once here via the ListRows styled component then that's fine, but please then revert/remove sx prop recently added to generic Box otherwise MapAndLabel implementation currently confusing has "double" styles applied here and hard to unpick which overrides other?

Happy to approve after that !

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Taken on board, for simplicity I've reintroduced the sx to SchemaFields.tsx and included specific styling in the component to fix the List Component spacing. If we find the styles are replicated after feedback I'll just in and make the styles global.

Copy link

github-actions bot commented Sep 3, 2024

Removed vultr server and associated DNS entries

@ianjon3s ianjon3s merged commit 3b08133 into main Sep 3, 2024
12 checks passed
@ianjon3s ianjon3s deleted the ian/list-component-input-spacing branch September 3, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants