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

Use local state for Flipbook Viewer's frame to avoid MST re-renders #5952

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

goplayoutside3
Copy link
Contributor

Package

lib-classifier

Linked Issue and/or Talk Post

Partial fix of #5951

❗ This bug is not specific to the flipbook viewer, however it was reported via Daily Minor Planet because that project has an autoplay flipbook, hence exacerbating the Issue linked above. This PR is not a full fix, but of high priority to get Daily Minor Planet data exports back online while I investigate a full fix for all subject viewers.

Describe your changes

How to Review

Steps to reproduce the bug are outlined in the linked Issue. Here is a flipbook projects for testing (Daily Minor Planet's workflow might be deactivated):

Checklist

PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.

General

  • Tests are passing locally and on Github
  • Documentation is up to date and changelog has been updated if appropriate
  • You can yarn panic && yarn bootstrap or docker-compose up --build and FEM works as expected
  • FEM works in all major desktop browsers: Firefox, Chrome, Edge, Safari (Use Browserstack account as needed)
  • FEM works in a mobile browser

General UX

Example Staging Project: i-fancy-cats

  • All pages of a FEM project load: Home Page, Classify Page, and About Pages
  • Can submit a classification
  • Can sign-in and sign-out

Bug Fix

  • The PR creator has listed user actions to use when testing if bug is fixed
  • The bug is fixed
  • Unit tests are added or updated

@goplayoutside3 goplayoutside3 added bug Something isn't working high priority Something that needs immediate attention labels Mar 5, 2024
@coveralls
Copy link

coveralls commented Mar 5, 2024

Coverage Status

coverage: 80.813% (+0.001%) from 80.812%
when pulling 28b02ae on flipbook-frame-state
into d601d3f on master.

@mcbouslog mcbouslog self-assigned this Mar 5, 2024
@mcbouslog mcbouslog self-requested a review March 5, 2024 12:48
Copy link
Contributor

@mcbouslog mcbouslog left a comment

Choose a reason for hiding this comment

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

Changes look good, as noted, a partial revert of #5754 .

Confirmed issue with Flipbook viewer, as well as with ImageAndText and MultiFrame viewers.

Confirmed these changes fix issue with Flipbook viewer (classification.metadata.subject_dimensions only includes one item). Viewers that use the subjectViewer store to track frame state will need additional follow-up for fix, as noted.

@github-actions github-actions bot added the approved This PR is approved for merging label Mar 5, 2024
@goplayoutside3 goplayoutside3 merged commit e18ee83 into master Mar 5, 2024
8 checks passed
@goplayoutside3 goplayoutside3 deleted the flipbook-frame-state branch March 5, 2024 14:31
mcbouslog pushed a commit that referenced this pull request Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved for merging bug Something isn't working high priority Something that needs immediate attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants