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

[Collapsible] Add transition delay #12118

Merged
merged 4 commits into from
May 21, 2024
Merged

Conversation

kyledurand
Copy link
Contributor

@kyledurand kyledurand commented May 21, 2024

WHY are these changes introduced?

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

WHAT is this pull request doing?

Adds a transition delay property. This will be useful while waiting for the search bar to animate out (top) before collapsing

Adds a style prop. Necessary for things like controlling width in a flex context. I'm not sure we need a full style prop, or classnames, or just try to limit it to flex grow / shrink. Open to ideas there. This is a pretty generic container so I don't think allowing a style prop is too bad.

UPDATE: Opting to override in consumer css instead of adding a style prop here

🎩 checklist

@kyledurand
Copy link
Contributor Author

/snapit

Copy link
Contributor

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

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

"@shopify/polaris": "0.0.0-snapshot-20240521154546"

Copy link
Contributor

@laurkim laurkim left a comment

Choose a reason for hiding this comment

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

Nice 💯
Small fix for delay story but otherwise lgtm!

@kyledurand kyledurand changed the title [Collapsible] Add style and transition delay [Collapsible] Add transition delay May 21, 2024
Copy link
Contributor

@sophschneider sophschneider left a comment

Choose a reason for hiding this comment

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

Nice! small comment about createVar

polaris-react/src/components/Collapsible/Collapsible.tsx Outdated Show resolved Hide resolved
@kyledurand kyledurand merged commit 5fcca65 into main May 21, 2024
12 of 13 checks passed
@kyledurand kyledurand deleted the collapsible_add-delay-prop branch May 21, 2024 20:02
@kyledurand kyledurand added the #gsd:38420 Top bar and global reframe project label May 21, 2024
laurkim pushed a commit that referenced this pull request Jun 3, 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@13.5.0

### Minor Changes

- [#12118](#12118)
[`5fcca651f`](5fcca65)
Thanks [@kyledurand](https://github.com/kyledurand)! - Added transition
delay to Collapsible

### Patch Changes

- Updated dependencies
\[[`fe2891792`](fe28917)]:
    -   @shopify/polaris-icons@9.1.1

## @shopify/polaris-icons@9.1.1

### Patch Changes

- [#12169](#12169)
[`fe2891792`](fe28917)
Thanks [@sam-b-rose](https://github.com/sam-b-rose)! - Updated XIcon SVG
path to correct size

## polaris.shopify.com@1.0.7

### Patch Changes

- [#12191](#12191)
[`82f8a0dcd`](82f8a0d)
Thanks [@sarahill](https://github.com/sarahill)! - Updated common action
guidelines add example


- [#12017](#12017)
[`b54975aef`](b54975a)
Thanks [@sarahill](https://github.com/sarahill)! - Updated common action
pattern guidance for add actions

- Updated dependencies
\[[`5fcca651f`](5fcca65),
[`fe2891792`](fe28917)]:
    -   @shopify/polaris@13.5.0
    -   @shopify/polaris-icons@9.1.1

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
#gsd:38420 Top bar and global reframe project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants