Skip to content

Conversation

itwasmattgregg
Copy link
Contributor

@itwasmattgregg itwasmattgregg commented Jan 31, 2024

This PR adds the functionality to reverse the order of items in an InlineStack by adding a responsive flex-direction prop with options row and row-reverse with row being the default.

Use case: Sometimes designers want to flip the order of columns on mobile
Screenshot 2024-02-05 at 11 52 31 AM

WHY are these changes introduced?

This change allows for layouts to be created where the order of elements can change between desktop and mobile.

WHAT is this pull request doing?

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

🎩 checklist

@itwasmattgregg itwasmattgregg force-pushed the add-direction-to-inline-stack branch from bbbf1fd to 340917b Compare February 5, 2024 20:27
@itwasmattgregg
Copy link
Contributor Author

/snapit

@itwasmattgregg itwasmattgregg force-pushed the add-direction-to-inline-stack branch 2 times, most recently from d415c96 to fb401d1 Compare February 5, 2024 20:36
@itwasmattgregg itwasmattgregg marked this pull request as ready for review February 5, 2024 20:44
@itwasmattgregg
Copy link
Contributor Author

/snapit

Copy link
Contributor

github-actions bot commented Feb 5, 2024

🫰✨ Thanks @itwasmattgregg! Your snapshot has been published to npm.

Test the snapshot by updating your package.json with the newly published version:

yarn add @shopify/polaris@0.0.0-snapshot-release-20240205221648

'grid-row-gap',
'column-gap',
'grid-column-gap',
'flex-direction',
Copy link
Member

Choose a reason for hiding this comment

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

I think this can be deleted

Fix responsive values for flex-direction

WIP

Fix tests

Remove unused prop

Remove unnecessary line

Remove stylelint disable
@itwasmattgregg itwasmattgregg force-pushed the add-direction-to-inline-stack branch from 3d9b9ee to 71111e3 Compare February 6, 2024 17:53
@itwasmattgregg itwasmattgregg merged commit 1a6b651 into main Feb 7, 2024
@itwasmattgregg itwasmattgregg deleted the add-direction-to-inline-stack branch February 7, 2024 16:51
mrcthms pushed a commit that referenced this pull request Feb 8, 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.14.0

### Minor Changes

- [#11541](#11541)
[`1a6b65103`](1a6b651)
Thanks [@itwasmattgregg](https://github.com/itwasmattgregg)! - Added
`direction` prop to `InlineStack` to allow for reversing the direction
of items.


- [#11566](#11566)
[`5a1ada35a`](5a1ada3)
Thanks [@sam-b-rose](https://github.com/sam-b-rose)! - Removed the Card
shadow bevel and decreased Card gap spacing for the mobile theme


- [#11575](#11575)
[`074c96ece`](074c96e)
Thanks [@mrcthms](https://github.com/mrcthms)! - Deprecated the suffix
from the IndexFilters SearchField component

### Patch Changes

- [#11488](#11488)
[`e755a5790`](e755a57)
Thanks [@chloerice](https://github.com/chloerice)! - Fixed
`monochromePlain` `Button` `variant` SVG fill


- [#11571](#11571)
[`fa00230fe`](fa00230)
Thanks [@tjonx](https://github.com/tjonx)! - Fixed scrollbar hover jank
in safari by forcing re-paint


- [#11567](#11567)
[`7dd064f6a`](7dd064f)
Thanks [@mrcthms](https://github.com/mrcthms)! - Updated the subtitle of
the Page Header to have a sensible max-width


- [#11565](#11565)
[`7d7451eea`](7d7451e)
Thanks [@jesstelford](https://github.com/jesstelford)! - Remove
references to se23/summer editions 2023/etc.


- [#11572](#11572)
[`9fa4b7a20`](9fa4b7a)
Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed section
heading action spacing


- [#11537](#11537)
[`27cf15c98`](27cf15c)
Thanks [@kyledurand](https://github.com/kyledurand)! - Updated scrollbar
colors and width

- Updated dependencies
\[[`27cf15c98`](27cf15c),
[`5a1ada35a`](5a1ada3)]:
    -   @shopify/polaris-tokens@8.7.0

## @shopify/polaris-tokens@8.7.0

### Minor Changes

- [#11537](#11537)
[`27cf15c98`](27cf15c)
Thanks [@kyledurand](https://github.com/kyledurand)! - Added scrollbar
thumb background tokens


- [#11566](#11566)
[`5a1ada35a`](5a1ada3)
Thanks [@sam-b-rose](https://github.com/sam-b-rose)! - Removed the Card
shadow bevel and decreased Card gap spacing for the mobile theme

## @shopify/polaris-migrator@0.27.3

### Patch Changes

- Updated dependencies
\[[`27cf15c98`](27cf15c),
[`5a1ada35a`](5a1ada3)]:
    -   @shopify/polaris-tokens@8.7.0
    -   @shopify/stylelint-polaris@15.2.1

## @shopify/stylelint-polaris@15.2.1

### Patch Changes

- Updated dependencies
\[[`27cf15c98`](27cf15c),
[`5a1ada35a`](5a1ada3)]:
    -   @shopify/polaris-tokens@8.7.0

## polaris-for-vscode@0.9.5

### Patch Changes

- Updated dependencies
\[[`27cf15c98`](27cf15c),
[`5a1ada35a`](5a1ada3)]:
    -   @shopify/polaris-tokens@8.7.0

## polaris.shopify.com@0.62.7

### Patch Changes

- Updated dependencies
\[[`27cf15c98`](27cf15c),
[`e755a5790`](e755a57),
[`1a6b65103`](1a6b651),
[`fa00230fe`](fa00230),
[`5a1ada35a`](5a1ada3),
[`7dd064f6a`](7dd064f),
[`7d7451eea`](7d7451e),
[`074c96ece`](074c96e),
[`9fa4b7a20`](9fa4b7a),
[`27cf15c98`](27cf15c)]:
    -   @shopify/polaris-tokens@8.7.0
    -   @shopify/polaris@12.14.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AnnaCheba pushed a commit to AnnaCheba/polaris that referenced this pull request Apr 22, 2024
This PR adds the functionality to reverse the order of items in an
`InlineStack` by adding a responsive flex-direction prop with options
`row` and `row-reverse` with `row` being the default.

Use case: Sometimes designers want to flip the order of columns on
mobile
<img width="545" alt="Screenshot 2024-02-05 at 11 52 31 AM"
src="https://github.com/Shopify/polaris/assets/7470936/854b5366-43d6-4c0b-9796-5456a687851a">


### WHY are these changes introduced?

This change allows for layouts to be created where the order of elements
can change between desktop and mobile.

### 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>
-->

### 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)
- [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
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