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

fix(lib): add opacity 0 (#168) #175

Merged
merged 1 commit into from
Jun 27, 2023
Merged

fix(lib): add opacity 0 (#168) #175

merged 1 commit into from
Jun 27, 2023

Conversation

Bro3Simon
Copy link
Contributor

Slide and Zoom flicker when the element is just entering the view and certain conditions are met. Slide flickers for direction="up". Zoom flickers when it is styled. This bug is shown in this Code Sandbox, https://codesandbox.io/s/react-awesome-reveal-bug-vy35p2 .

There might be a bigger issue that is shown when inspecting in the browser. The class for these elements is flickering back and forth when the element is just entering the view. It seems it doesn't know what class to apply. It should apply one class or the other not flipping back and forth between the two. Since I don't know how to fix that, this branch fixes the visible bug by applying opacity: 0 when the element is not in view.

resolve #168

@codesandbox
Copy link

codesandbox bot commented Jun 24, 2023

This branch is running in CodeSandbox. Use the links below to review this PR faster.


CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders | Preview

@changeset-bot
Copy link

changeset-bot bot commented Jun 24, 2023

🦋 Changeset detected

Latest commit: 97ae152

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
react-awesome-reveal Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jun 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-awesome-reveal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 25, 2023 6:29pm

Slide and Zoom flicker when the element is just entering the view and
certain conditions are met. Slide flickers when direction is up.
Zoom flickers when it is styled. This bug is shown in this Code Sandbox,
https://codesandbox.io/s/react-awesome-reveal-bug-vy35p2 .

This is fixed by applying opacity: 0 when the element is not in view.

resolve #168
@morellodev
Copy link
Collaborator

Hi @Bro3Simon, thank you for this PR 🙌

Setting opacity: 0 is a working fix for the mentioned issue (it was so since some releases ago to be honest).

I'm approving it, great job!

@morellodev morellodev merged commit cfb05d8 into awesome-reveal:main Jun 27, 2023
1 check passed
@Bro3Simon
Copy link
Contributor Author

@morellodev, glad to have helped. I learned a few things along the way!

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.

Slide flickers when is entering the viewport
2 participants