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(pager): ensure there is no margin-bottom on page number input #5660

Merged
merged 2 commits into from
Dec 5, 2022

Conversation

robinzigmond
Copy link
Contributor

When rendered inside a Form component, the numeric input on Pager gets CSS rules to given it margin-bottom equal to the Form's field-spacing prop. In order to ensure the sub-components of Pager stay in line it always needs 0 margin-bottom, so a CSS rule has been added to set this, and made more specific that the one in Form.

fix #5650

Proposed behaviour

The number input on Pager should never have any bottom-margin, even when inside a Form.

Current behaviour

A Pager inside a Form is given bottom margin according to the Form's FieldSpacing prop (24px by default), causing it to not line up with the text.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Cypress automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in CodeSandbox/storybook
  • Add new Cypress test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

The following CodeSandbox is an example of the broken behaviour.
You can see the new behaviour by looking at the version in the comment by codesandbox[bot].

When rendered inside a Form component, the numberic input on Pager gets CSS rules to given it
margin-bottom equal to the Form's field-spacing prop. In order to ensure the sub-components of Pager
stay in line it always needs 0 margin-bottom, so a CSS rule has been added to set this, and made
more specific that the one in Form.

fix #5650
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 30, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7629ac7:

Sandbox Source
carbon-quickstart Configuration
carbon-quickstart-typescript Configuration
carbon-quickstart PR
dazzling-benji-qldw3l Issue #5650

@cypress
Copy link

cypress bot commented Nov 30, 2022



Test summary

4026 0 6 0Flakiness 0


Run details

Project carbon
Status Passed
Commit 7629ac7
Started Dec 5, 2022 4:10 PM
Ended Dec 5, 2022 4:16 PM
Duration 06:10 💡
OS Linux Debian - 11.4
Browser Chrome 106

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@edleeks87 edleeks87 self-requested a review November 30, 2022 15:47
@Parsium Parsium self-requested a review November 30, 2022 17:14
@robinzigmond robinzigmond marked this pull request as ready for review December 2, 2022 09:12
@robinzigmond robinzigmond requested review from a team as code owners December 2, 2022 09:12
@edleeks87 edleeks87 removed their request for review December 2, 2022 10:05
@robinzigmond robinzigmond merged commit b17870b into master Dec 5, 2022
@robinzigmond robinzigmond deleted the FE-5565-pager-form-margin branch December 5, 2022 16:18
@carbonci
Copy link
Collaborator

carbonci commented Dec 5, 2022

🎉 This PR is included in version 111.13.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Pager input has uneeded margin
5 participants