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

State management refactor for structure #643

Merged
merged 4 commits into from
Sep 20, 2024
Merged

State management refactor for structure #643

merged 4 commits into from
Sep 20, 2024

Conversation

Dananji
Copy link
Collaborator

@Dananji Dananji commented Sep 18, 2024

Related issue: #630

Use custom hooks for structured navigation for state updates and subscriptions limiting re-renders of the component tree in the StructuredNavigation component. This lets us to use collapsible sections and then keep it collapsed or expanded while the state is getting updated in the background.

For Avalon media object manifest: https://avalon-dev.dlib.indiana.edu/media_objects/g158bh28p/
Screenshot 2024-09-18 at 2 18 23 PM

For cookbook recipe: https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases
Screenshot 2024-09-18 at 2 19 08 PM

For cookbook recipe: https://iiif.io/api/cookbook/recipe/0026-toc-opera
Screenshot 2024-09-18 at 2 18 49 PM

Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

This looks really good!

Not in scope of this PR but when looking through it I thought the cyclical dependence of SectionHeading on List and List on SectionHeading is confusing. I wonder if having an abstract component with subclasses might help scope and conceptualize the different uses of the two components.

@Dananji
Copy link
Collaborator Author

Dananji commented Sep 20, 2024

Not in scope of this PR but when looking through it I thought the cyclical dependence of SectionHeading on List and List on SectionHeading is confusing. I wonder if having an abstract component with subclasses might help scope and conceptualize the different uses of the two components.

That sounds good. I created a new issue to work on this #648

@Dananji Dananji merged commit 6f2d557 into main Sep 20, 2024
0 of 2 checks passed
@Dananji Dananji deleted the state-refactor2-630 branch September 20, 2024 19:18
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.

2 participants