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: Conform standalone button width to its container #2361 #2390

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

marek-mihok
Copy link
Contributor

The PR fulfills these requirements: (check all the apply)

  • It's submitted to the main branch.
  • When resolving a specific issue, it's referenced in the PR's title (e.g. feat: Add a button #xxx, where "xxx" is the issue number).
  • When resolving a specific issue, the PR description includes Closes #xxx, where "xxx" is the issue number.
  • If changes were made to ui folder, unit tests (make test) still pass.
  • New/updated tests are included

The idea of this fix is to make the standalone button together with its left margin to fit its container width. This is by specifying display: 'flex for the button wrapper.

Example:
When the standalone button with has specified width of 150px is followed by another standalone button with the same width, the first button will be 150px wide but the second one and every other will be 142px wide as it accounts for 8px left padding. This marginal difference can only be caught by a perfectionist eye. This is demonstrated in the recording below:

Screen.Recording.2024-09-12.at.08.46.16.mov

The alignItems: 'center' is specified not to break existing button stylings.

The solution was manually and visual regression tested.

Closes #2361

Copy link
Collaborator

@mturoci mturoci left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @marek-mihok!

@mturoci mturoci merged commit bf50730 into main Sep 12, 2024
@mturoci mturoci deleted the fix/issue-2361 branch September 12, 2024 09:06
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.

Regression from earlier version, inline Buttons are misplaced
2 participants