Skip to content

Conversation

@sam-b-rose
Copy link
Member

@sam-b-rose sam-b-rose commented Feb 4, 2024

WHY are these changes introduced?

Part of https://github.com/Shopify/polaris-internal/issues/1399

This PR updates the light-mobile theme to match the Polaris Mobile native flat style.

  • Removes the primary gradient
  • Removes the shadow bevel effect
  • Applies a solid "border" around the default (secondary) button style
  • Only applies the "pressed" transition movement for non-mobile screens
  • Updates the font size and weight to match mobile on small screens

🌀 Spin URL

WHAT is this pull request doing?

Desktop Mobile
desktop mobile

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

🎩 checklist

@sam-b-rose sam-b-rose force-pushed the mobile-button-styles branch from 6ab0833 to 65de0ad Compare February 4, 2024 23:41
@Shopify Shopify deleted a comment from github-actions bot Feb 4, 2024
@Shopify Shopify deleted a comment from github-actions bot Feb 4, 2024
@sam-b-rose
Copy link
Member Author

/snapit

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2024

🫰✨ Thanks @sam-b-rose! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

yarn add @shopify/polaris-migrator@0.0.0-snapshot-release-20240204234746
yarn add @shopify/polaris@0.0.0-snapshot-release-20240204234746
yarn add @shopify/polaris-tokens@0.0.0-snapshot-release-20240204234746
yarn add @shopify/stylelint-polaris@0.0.0-snapshot-release-20240204234746

@sam-b-rose sam-b-rose changed the title Apply flat button styles for light-mobile theme Apply flat button styles for light-mobile theme Feb 5, 2024
@sam-b-rose sam-b-rose force-pushed the mobile-button-styles branch 2 times, most recently from af49099 to 75f1b8e Compare February 7, 2024 22:45
@sam-b-rose sam-b-rose force-pushed the mobile-button-styles branch from 75f1b8e to 8ce099e Compare February 8, 2024 18:07
@sam-b-rose sam-b-rose merged commit 04e4628 into main Feb 8, 2024
@sam-b-rose sam-b-rose deleted the mobile-button-styles branch February 8, 2024 18:18
sam-b-rose pushed a commit that referenced this pull request Feb 9, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @shopify/polaris@12.15.0

### Minor Changes

- [#11552](#11552)
[`04e462816`](04e4628)
Thanks [@sam-b-rose](https://github.com/sam-b-rose)! - Applied native
mobile styles to Button component for the light-mobile theme

### Patch Changes

- [#11570](#11570)
[`e7f1961e1`](e7f1961)
Thanks [@chloerice](https://github.com/chloerice)! - Fixed the position
of `SelectAllActions` when inside of an offset scrollable container

- Updated dependencies
\[[`04e462816`](04e4628)]:
    -   @shopify/polaris-tokens@8.8.0

## @shopify/polaris-tokens@8.8.0

### Minor Changes

- [#11552](#11552)
[`04e462816`](04e4628)
Thanks [@sam-b-rose](https://github.com/sam-b-rose)! - Applied native
mobile styles to Button component for the light-mobile theme

## @shopify/polaris-migrator@0.27.4

### Patch Changes

- Updated dependencies
\[[`04e462816`](04e4628)]:
    -   @shopify/polaris-tokens@8.8.0
    -   @shopify/stylelint-polaris@15.2.2

## @shopify/stylelint-polaris@15.2.2

### Patch Changes

- Updated dependencies
\[[`04e462816`](04e4628)]:
    -   @shopify/polaris-tokens@8.8.0

## polaris-for-vscode@0.9.6

### Patch Changes

- Updated dependencies
\[[`04e462816`](04e4628)]:
    -   @shopify/polaris-tokens@8.8.0

## polaris.shopify.com@0.62.8

### Patch Changes

- Updated dependencies
\[[`04e462816`](04e4628),
[`e7f1961e1`](e7f1961)]:
    -   @shopify/polaris@12.15.0
    -   @shopify/polaris-tokens@8.8.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
lgriffee added a commit that referenced this pull request Feb 21, 2024
### WHY are these changes introduced?
Fixes #11632
Reverts changes made to mobile button styles in #11552

Styles between native mobile and web mobile are currently not aligned so
if we add any native mobile styles into our design system they will
create discrepancies with screens at the MD (768px) breakpoint and
above. In this case, adding in native mobile button styles resulted in
unexpected font styles (weight, size, line-height) below the MD
breakpoint (768px) in web mobile.



### WHAT is this pull request doing?
| Before | After | 
| -- | -- |
![Screenshot 2024-02-21 at 9 12
26 AM](https://github.com/Shopify/polaris/assets/21976492/9088cb69-2431-47dd-a956-90ce0606c089)|![Screenshot
2024-02-21 at 9 17
15 AM](https://github.com/Shopify/polaris/assets/21976492/ba3ebe8c-e17c-47d3-b5e6-d73c6c3fdd1f)|

| Before | After | 
| -- | -- |
| <video
src="https://github.com/Shopify/polaris/assets/21976492/05128504-ed1f-4289-a448-8ebec4015577"></video>|<video
src="https://github.com/Shopify/polaris/assets/21976492/41a3e932-7da5-457c-ab94-8c4a64313eb0"></video>|


### How to 🎩
_Toggle between 768px and 767px_
- Before:
https://admin.shopify.com/store/laura-griffee-test-store/dashboards
- After:
https://admin.web.button-revert.laura-griffee.us.spin.dev/store/shop1/dashboards

### 🎩 checklist

- [x] 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)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
AnnaCheba pushed a commit to AnnaCheba/polaris that referenced this pull request Apr 22, 2024
### WHY are these changes introduced?

Part of Shopify/polaris-internal#1399

This PR updates the `light-mobile` theme to match the Polaris Mobile
native flat style.

- Removes the primary gradient
- Removes the shadow bevel effect
- Applies a solid "border" around the default (secondary) button style
- Only applies the "pressed" transition movement for non-mobile screens
- Updates the font size and weight to match mobile on small screens

🌀 [Spin
URL](https://admin.web.mobile-button.sam-rose.us.spin.dev/store/shop1)

### WHAT is this pull request doing?

| Desktop | Mobile |
| --- | --- |
| <img width="576" alt="desktop"
src="https://github.com/Shopify/polaris/assets/11774595/4d0ead6e-3855-4bf8-9041-3e8acdffbbdf">
| <img width="576" alt="mobile"
src="https://github.com/Shopify/polaris/assets/11774595/dad25a9d-c0a2-4d4c-a8e9-0a44bd86dfb2">
|


### How to 🎩

🖥 [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

- [x] Tested a
[snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases)
- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [ ] 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)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
AnnaCheba pushed a commit to AnnaCheba/polaris that referenced this pull request Apr 22, 2024
…fy#11624)

### WHY are these changes introduced?
Fixes Shopify#11632
Reverts changes made to mobile button styles in Shopify#11552

Styles between native mobile and web mobile are currently not aligned so
if we add any native mobile styles into our design system they will
create discrepancies with screens at the MD (768px) breakpoint and
above. In this case, adding in native mobile button styles resulted in
unexpected font styles (weight, size, line-height) below the MD
breakpoint (768px) in web mobile.



### WHAT is this pull request doing?
| Before | After | 
| -- | -- |
![Screenshot 2024-02-21 at 9 12
26 AM](https://github.com/Shopify/polaris/assets/21976492/9088cb69-2431-47dd-a956-90ce0606c089)|![Screenshot
2024-02-21 at 9 17
15 AM](https://github.com/Shopify/polaris/assets/21976492/ba3ebe8c-e17c-47d3-b5e6-d73c6c3fdd1f)|

| Before | After | 
| -- | -- |
| <video
src="https://github.com/Shopify/polaris/assets/21976492/05128504-ed1f-4289-a448-8ebec4015577"></video>|<video
src="https://github.com/Shopify/polaris/assets/21976492/41a3e932-7da5-457c-ab94-8c4a64313eb0"></video>|


### How to 🎩
_Toggle between 768px and 767px_
- Before:
https://admin.shopify.com/store/laura-griffee-test-store/dashboards
- After:
https://admin.web.button-revert.laura-griffee.us.spin.dev/store/shop1/dashboards

### 🎩 checklist

- [x] 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)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
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