Skip to content

Conversation

@aveline
Copy link
Contributor

@aveline aveline commented Mar 7, 2023

WHY are these changes introduced?

#8530 removed default alignment so that the default is now stretch which renders all children full width.

This makes the existing fullWidth prop unnecessary.fullWidth collides with/override align="start | center | end" because of specificity and so they can't be used together. It is also causing confusion (#8579), so I think we should remove it.

WHAT is this pull request doing?

  • Removes the fullWidth prop from AlphaStack
  • Sets default --pc-stack-align: initial; so that nested Stacks don't inherit align from parent.

To do:

  • Remove fullWidth in style guide

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2023

size-limit report 📦

Path Size
polaris-react-cjs 220.93 KB (-0.02% 🔽)
polaris-react-esm 140.52 KB (-0.03% 🔽)
polaris-react-esnext 197.05 KB (-0.01% 🔽)
polaris-react-css 42.86 KB (-0.01% 🔽)

@aveline aveline requested a review from laurkim March 7, 2023 18:55
@aveline aveline marked this pull request as ready for review March 7, 2023 18:55
@laurkim laurkim self-assigned this Mar 7, 2023
@laurkim
Copy link
Contributor

laurkim commented Mar 7, 2023

/snapit

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2023

🫰✨ Thanks @laurkim! Your snapshots have been published to npm.

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

yarn add @shopify/polaris-cli@0.0.0-snapshot-release-20230307190503
yarn add @shopify/polaris@0.0.0-snapshot-release-20230307190503

@laurkim laurkim merged commit 4fb2bdc into main Mar 8, 2023
@laurkim laurkim deleted the layout-stack-fullwidth branch March 8, 2023 17:28
laurkim pushed a commit that referenced this pull request Mar 8, 2023
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@10.35.0

### Minor Changes

- [#8539](#8539)
[`cb41f719c`](cb41f71)
Thanks [@alex-page](https://github.com/alex-page)! - Updated `variant`
prop on `Text` component to be optional to better support children with
similar styles


- [#8533](#8533)
[`b39b19782`](b39b197)
Thanks [@aveline](https://github.com/aveline)! - Updated `Columns` to
accept `alignItems` prop

### Patch Changes

- [#8582](#8582)
[`4fb2bdc57`](4fb2bdc)
Thanks [@aveline](https://github.com/aveline)! - Removed `fullWidth`
prop from `AlphaStack`

- Updated dependencies
\[[`7d1c4f1db`](7d1c4f1)]:
    -   @shopify/polaris-tokens@6.8.0

## @shopify/polaris-tokens@6.8.0

### Minor Changes

- [#8572](#8572)
[`7d1c4f1db`](7d1c4f1)
Thanks [@lgriffee](https://github.com/lgriffee)! - Added a new `shadow`
token group

## @shopify/polaris-cli@0.1.16

### Patch Changes

-   Updated dependencies \[]:
    -   @shopify/polaris-migrator@0.15.1

## @shopify/polaris-migrator@0.15.1

### Patch Changes

- Updated dependencies
\[[`7d1c4f1db`](7d1c4f1)]:
    -   @shopify/polaris-tokens@6.8.0
    -   @shopify/stylelint-polaris@8.0.2

## @shopify/stylelint-polaris@8.0.2

### Patch Changes

- Updated dependencies
\[[`7d1c4f1db`](7d1c4f1)]:
    -   @shopify/polaris-tokens@6.8.0

## polaris-for-vscode@0.4.0

### Minor Changes

- [#8572](#8572)
[`7d1c4f1db`](7d1c4f1)
Thanks [@lgriffee](https://github.com/lgriffee)! - Added completions for
new `shadow` token group

## polaris.shopify.com@0.38.2

### Patch Changes

- [#8593](#8593)
[`a0e52a30a`](a0e52a3)
Thanks [@laurkim](https://github.com/laurkim)! - Added in chart to map
`Text` variants to font tokens

- Updated dependencies
\[[`4fb2bdc57`](4fb2bdc),
[`cb41f719c`](cb41f71),
[`b39b19782`](b39b197),
[`7d1c4f1db`](7d1c4f1)]:
    -   @shopify/polaris@10.35.0
    -   @shopify/polaris-tokens@6.8.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
juzser pushed a commit to juzser/polaris that referenced this pull request Jul 27, 2023
### WHY are these changes introduced?
Shopify#8530 removed default alignment
so that the default is now `stretch` which renders all children full
width.

This makes the existing `fullWidth` prop unnecessary.`fullWidth`
collides with/override `align="start | center | end"` because of
specificity and so they can't be used together. It is also causing
confusion (Shopify#8579), so I think
we should remove it.

### WHAT is this pull request doing?

- Removes the `fullWidth` prop from `AlphaStack`
- Sets default `--pc-stack-align: initial;` so that nested Stacks don't
inherit align from parent.

To do:
- [x] Remove `fullWidth` in style guide

---------

Co-authored-by: Lo Kim <lo.kim@shopify.com>
juzser pushed a commit to juzser/polaris that referenced this pull request Jul 27, 2023
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@10.35.0

### Minor Changes

- [Shopify#8539](Shopify#8539)
[`cb41f719c`](Shopify@cb41f71)
Thanks [@alex-page](https://github.com/alex-page)! - Updated `variant`
prop on `Text` component to be optional to better support children with
similar styles


- [Shopify#8533](Shopify#8533)
[`b39b19782`](Shopify@b39b197)
Thanks [@aveline](https://github.com/aveline)! - Updated `Columns` to
accept `alignItems` prop

### Patch Changes

- [Shopify#8582](Shopify#8582)
[`4fb2bdc57`](Shopify@4fb2bdc)
Thanks [@aveline](https://github.com/aveline)! - Removed `fullWidth`
prop from `AlphaStack`

- Updated dependencies
\[[`7d1c4f1db`](Shopify@7d1c4f1)]:
    -   @shopify/polaris-tokens@6.8.0

## @shopify/polaris-tokens@6.8.0

### Minor Changes

- [Shopify#8572](Shopify#8572)
[`7d1c4f1db`](Shopify@7d1c4f1)
Thanks [@lgriffee](https://github.com/lgriffee)! - Added a new `shadow`
token group

## @shopify/polaris-cli@0.1.16

### Patch Changes

-   Updated dependencies \[]:
    -   @shopify/polaris-migrator@0.15.1

## @shopify/polaris-migrator@0.15.1

### Patch Changes

- Updated dependencies
\[[`7d1c4f1db`](Shopify@7d1c4f1)]:
    -   @shopify/polaris-tokens@6.8.0
    -   @shopify/stylelint-polaris@8.0.2

## @shopify/stylelint-polaris@8.0.2

### Patch Changes

- Updated dependencies
\[[`7d1c4f1db`](Shopify@7d1c4f1)]:
    -   @shopify/polaris-tokens@6.8.0

## polaris-for-vscode@0.4.0

### Minor Changes

- [Shopify#8572](Shopify#8572)
[`7d1c4f1db`](Shopify@7d1c4f1)
Thanks [@lgriffee](https://github.com/lgriffee)! - Added completions for
new `shadow` token group

## polaris.shopify.com@0.38.2

### Patch Changes

- [Shopify#8593](Shopify#8593)
[`a0e52a30a`](Shopify@a0e52a3)
Thanks [@laurkim](https://github.com/laurkim)! - Added in chart to map
`Text` variants to font tokens

- Updated dependencies
\[[`4fb2bdc57`](Shopify@4fb2bdc),
[`cb41f719c`](Shopify@cb41f71),
[`b39b19782`](Shopify@b39b197),
[`7d1c4f1db`](Shopify@7d1c4f1)]:
    -   @shopify/polaris@10.35.0
    -   @shopify/polaris-tokens@6.8.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

3 participants