Skip to content

Conversation

@kindoflew
Copy link
Collaborator

Why

Found this bug while making the new demo for testing (I didn't even set up cypress yet 😅):

If more than 2 layers are sticky on the same page, their positions may be suddenly shifted down a page before becoming sticky when scrolled to a second time (depending on their order in the HTML). Description might not be totally clear, but you can see what I mean here: https://codesandbox.io/s/nifty-night-j6xdm?file=/src/App.tsx.

Obviously, I had to discover this the day after 9.2.0 released.

What

Instead of having conditional position properties like this:

[layer.horizontal ? 'left' : 'top']: 0

All four are now listed explicitly (top: 0, bottom: 0, etc..). This has no effect on regular layers.

In the future when the inset property has more support we can switch it to that so it looks a little cleaner, but that's a nitpick really. (Also, by that time, overflow: clip will hopefully be better supported and we can just use that instead and none of this will matter anyways.)

Checklist

  • Documentation updated: N/A
  • Demo added: N/A
  • Ready to be merged

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2ef0020:

Sandbox Source
spring-card Configuration
spring-goo-blobs Configuration
spring-flip-card Configuration
spring-slide Configuration
spring-draggable-list Configuration
spring-cards-stack Configuration
spring-viewpager Configuration
spring-simple-transition Configuration
spring-image-fade Configuration
spring-list-reordering Configuration
dark-surf-sgy56 PR

Copy link
Member

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

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

Good spot! I'll release this now. I'm thinking of adding the changesets bot like in leva so contributors will be prompted to make a changeset 🤔

@joshuaellis joshuaellis merged commit 27409ac into pmndrs:master May 28, 2021
@kindoflew kindoflew mentioned this pull request Jun 4, 2021
3 tasks
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