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: Remove IfElse To Keep State Correct #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vladyslavsosiuk
Copy link

@vladyslavsosiuk vladyslavsosiuk commented Nov 6, 2023

Refs: #12

This PR addresses the SwiftUI identification issue. When a view to which the shimmering modifier is applied has its own state and toggles between shimmering active true or false the view would lose its state. Here's a video representing the issue:

Screen.Recording.2023-11-06.at.11.16.07.AM.mov

Here is a video with the expected behavior:

Screen.Recording.2023-11-06.at.11.16.38.AM.mov

why is this an issue described in the following article:
https://www.objc.io/blog/2021/08/24/conditional-view-modifiers/

@lbunicic
Copy link

Thanks for this @vladyslavsosiuk. It's a critical issue imo, let's hope it gets merged sometime soon.

@SoKamil
Copy link

SoKamil commented Dec 5, 2023

Did you notice that on the video with expected behavior part of the toggle button on the right is cut off?

@vladyslavsosiuk
Copy link
Author

Did you notice that on the video with expected behavior part of the toggle button on the right is cut off?

Yes, it's just a preview

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.

None yet

3 participants