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

Issue 494: Updated scroll transition logic to fix wrapAround flash #635

Merged
merged 1 commit into from
Jan 11, 2020

Conversation

mariano-formidable
Copy link
Member

@mariano-formidable mariano-formidable commented Jan 8, 2020

Description

This PR updates the scroll-transition logic to remove the wrapAround flash. It divides up the available slides to be in-front and in-back of the carousel (taking into account, alignment and slides to show) so flipping through slides shouldn't flash (as much...).

Fixes #494, #606

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Passes all written tests, and lots of manual testing.

Screenshots

Normal wrap around:
normal-wraparound

Partial wrap around:
partial-wraparound

Height Mode "current" wrap around:
current-wraparound

Extreme wrap around. Slides to show is 6, slides to scroll is 2, and there are only 6 slides in total 😱 (still manages to "work" as best it can):
extreme-wraparound

@mariano-formidable mariano-formidable force-pushed the fix/494-flash-wrap-around branch 2 times, most recently from 3c3733b to c64ebbf Compare January 9, 2020 17:21
},
() => {
stateCb();
this.setLeft();
Copy link
Member Author

@mariano-formidable mariano-formidable Jan 9, 2020

Choose a reason for hiding this comment

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

Removing the call to setLeft and the updates to left and top from the method setDimensions fixed the wrap around problem we saw when heightMode was set to current.

I beliiieeeeve (but I'm not positive), that these extra calls to set the left and top, were simply ways to ensure that the carousel wouldn't flash. But, I think the new wrapAround logic should prevent it sooooooooo... I don't think we need these calls. I've been playing around with the demo a bit and it all still works.

However, if you notice new bugs coming from these removal of these lines, I can put them back in and try and fix the wraparound problem when heightMode is current in another PR.

@@ -15,6 +15,7 @@ class App extends React.Component {
underlineHeader: false,
zoomScale: 0.5,
slidesToShow: 1,
slidesToScroll: 1,
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this to state in our demo app so we can easier update this param when testing.

@mariano-formidable mariano-formidable force-pushed the fix/494-flash-wrap-around branch from c64ebbf to e9c959b Compare January 9, 2020 17:32
@mariano-formidable mariano-formidable changed the title [WIP] Issue 494: Updated scroll transition logic to fix wrapAround flash Issue 494: Updated scroll transition logic to fix wrapAround flash Jan 9, 2020
@sarmeyer sarmeyer merged commit a65d512 into master Jan 11, 2020
@sarmeyer sarmeyer deleted the fix/494-flash-wrap-around branch March 12, 2021 23:05
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.

Flash after wrap around
2 participants