Skip to content

Commit

Permalink
Add padding for FooterHelp on small devices (#11299)
Browse files Browse the repository at this point in the history
<!--
  ☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
  - Start with a verb, for example: Add, Delete, Improve, Fix…
  - Give as much context as necessary and as little as possible
  - Open it as a draft if it’s a work in progress
-->

### WHY are these changes introduced?

The missing padding for `FooterHelp` leads to the text being completely
at the edge of a screen on small devices. This doesn't happen on md and
up. It's imho surprising to remove a padding for small screens and leads
to issues in Web Admin.

| Before | After |
| - | - |
|
![image](https://github.com/Shopify/polaris/assets/9371695/35d1f83d-a82f-40db-93e8-56e1c1d0db88)
|
![image](https://github.com/Shopify/polaris/assets/9371695/155671ad-9b3c-46b9-a996-3bc5c644b6d8)
|

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

<!--
  Summary of the changes committed.

Before / after screenshots are appreciated for UI changes. Make sure to
include alt text that describes the screenshot.

  Include a video if your changes include interactive content.

If you include an animated gif showing your change, wrapping it in a
details tag is recommended. Gifs usually autoplay, which can cause
accessibility issues for people reviewing your PR:

  <details>
    <summary>Summary of your gif(s)</summary>
    <img src="..." alt="Description of what the gif shows">
  </details>
-->

It unifies the padding for `FooterHelp` across all breakpoints.

### How to 🎩

- Go to `FooterHelp` story
- Ensure the padding is applied regardless of the size of the screen.

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

### 🎩 checklist

- [ ] Tested a
[snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases)
- [x] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [x] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [x] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [x] Updated the component's `README.md` with documentation changes
- [x] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
  • Loading branch information
fortmarek authored Dec 12, 2023
1 parent 2fce504 commit e530a44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-berries-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': patch
---

Added padding for FooterHelp on small viewports
9 changes: 2 additions & 7 deletions polaris-react/src/components/FooterHelp/FooterHelp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@
.FooterHelp {
display: flex;
justify-content: center;
margin: var(--p-space-500) 0;
width: 100%;

@media #{$p-breakpoints-sm-up} {
margin: var(--p-space-500);
width: auto;
}
margin: var(--p-space-500);
width: auto;
}

.Text {
Expand Down

0 comments on commit e530a44

Please sign in to comment.