Skip to content

State management refactor for structure - #643

Merged
Dananji merged 4 commits into
mainfrom
state-refactor2-630
Sep 20, 2024
Merged

State management refactor for structure#643
Dananji merged 4 commits into
mainfrom
state-refactor2-630

Conversation

@Dananji

@Dananji Dananji commented Sep 18, 2024

Copy link
Copy Markdown
Collaborator

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

@cjcolvar cjcolvar left a comment

Copy link
Copy Markdown
Member

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

Dananji commented Sep 20, 2024

Copy link
Copy Markdown
Collaborator Author

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
@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