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

3314 Gallery View Unresponsive #3601

Merged
merged 3 commits into from
Jul 31, 2024
Merged

Conversation

cyrusnaficy
Copy link
Collaborator

Resolves #3314

Updated the currSelected variable so it is in the modal class. Now it resets whenever the modal closes so that the expanded view clicking works 100% of the time.

Testing instructions
  1. Open GalleryView
  2. Open the expanded view and press agree/disagree or thumbs up/thumbs down.
  3. Go to another gallery view and do the same.
Things to check before submitting the PR
  • I've written a descriptive PR title.
  • I've added/updated comments for large or confusing blocks of code.

@cyrusnaficy cyrusnaficy self-assigned this Jul 26, 2024
@cyrusnaficy cyrusnaficy marked this pull request as ready for review July 26, 2024 22:13
@misaugstad misaugstad self-assigned this Jul 27, 2024
Copy link
Member

@misaugstad misaugstad left a comment

Choose a reason for hiding this comment

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

I think that it's more appropriate to keep the currSelected variable that tracks the label's validation in ValidationMenu instead of moving it up to Modal! I think that it just needs to be set to null at the right time.

The currSelected variable is correctly set to agree/disagree/unsure when moving to a new label in ValidationMenu in the function showValidationOnExpandedView(). In updateReferenceCard(), either showValidationOnExpandedView() is called if there is a user validation for the new label or _removeValidationVisualsOnExpandedView() if there is not. So it seems that setting currSelected to null in _removeValidationVisualsOnExpandedView() would probably do it!

@cyrusnaficy cyrusnaficy force-pushed the 3314-gallery-view-unresponsive branch from 54c87f4 to 6e5bf0c Compare July 30, 2024 03:08
@cyrusnaficy
Copy link
Collaborator Author

I think that it's more appropriate to keep the currSelected variable that tracks the label's validation in ValidationMenu instead of moving it up to Modal! I think that it just needs to be set to null at the right time.

The currSelected variable is correctly set to agree/disagree/unsure when moving to a new label in ValidationMenu in the function showValidationOnExpandedView(). In updateReferenceCard(), either showValidationOnExpandedView() is called if there is a user validation for the new label or _removeValidationVisualsOnExpandedView() if there is not. So it seems that setting currSelected to null in _removeValidationVisualsOnExpandedView() would probably do it!

Thanks, that makes a lot of sense. Didn't realize that function was also being called when the modal closes. Really appreciate the help!

Copy link
Member

@misaugstad misaugstad left a comment

Choose a reason for hiding this comment

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

Seems to be working great!

@misaugstad misaugstad merged commit 4be0b04 into develop Jul 31, 2024
@misaugstad misaugstad deleted the 3314-gallery-view-unresponsive branch July 31, 2024 17:46
@misaugstad misaugstad mentioned this pull request Aug 22, 2024
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.

Expanded cards in Gallery UI are sometimes unresponsive
2 participants