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

Preview doesn't properly close if state changes are reverted #3

Open
Effanuel opened this issue Jan 25, 2020 · 0 comments
Open

Preview doesn't properly close if state changes are reverted #3

Effanuel opened this issue Jan 25, 2020 · 0 comments
Labels
code design bug Bug caused by code design

Comments

@Effanuel
Copy link
Owner

Effanuel commented Jan 25, 2020

Expected Behavior

<PreviewContainer /> should properly close, if <ScaledContainer /> components states are the same as they were after <PreviewContainer /> was opened.

Current Behavior

If some kind of change is made and then reverted, <PreviewContainer /> doesn't close on "Preview" click.

  • Current situation is handled using boolean cache variable that sets to false after every state change.

Possible Solution

Save state after opening and check before closing/opening.

Steps to Reproduce

  1. Open <PreviewContainer />;
  2. Delete any number of <PreviewContainer /> input and then revert it;
  3. Press "Preview".

Possible Implementation

After opening the <PreviewContainer />, stringify and save its state to compare it before every open/close of <PreviewContainer />.

@Effanuel Effanuel added bug Something isn't working code design bug Bug caused by code design and removed bug Something isn't working labels Jan 25, 2020
@Effanuel Effanuel changed the title Preview button cache handle bug Preview doesn't properly close if state changes are reverted Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code design bug Bug caused by code design
Projects
None yet
Development

No branches or pull requests

1 participant