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

Implement Expand/Close button in StructuredNav Component #645

Closed
2 of 5 tasks
Dananji opened this issue Sep 18, 2024 · 5 comments
Closed
2 of 5 tasks

Implement Expand/Close button in StructuredNav Component #645

Dananji opened this issue Sep 18, 2024 · 5 comments
Assignees
Labels
structured_nav Improvements/fixes in structured nav

Comments

@Dananji
Copy link
Collaborator

Dananji commented Sep 18, 2024

Description

With the on-going state management refactor using custom hooks (#630), we are able to implement expand/close functionality for each section in the structured navigation in Ramp.
We were not able to do this before due re-rendering in StructuredNavigation component, therefore this functionality was implemented in Avalon code.

Done Looks Like

  • Implement expand/close sections button in StructuredNavigation component
  • Use a prop that goes into StructuredNavigation component to turn on/off the display of this button
  • Document props in styleguidist docs and GitHub wiki
  • Test functionality in all supported platforms
  • Removed related code in Avalon when this is brought into Avalon

Related work

#644
This work is based off of state management refactor. So if this work is re-purposed when working on this issue it needs to be rebased off main branch.

@Dananji Dananji added the structured_nav Improvements/fixes in structured nav label Sep 18, 2024
@Dananji Dananji changed the title Implement Expand/Close button into StructuredNav Component Implement Expand/Close button in StructuredNav Component Sep 18, 2024
@Dananji Dananji self-assigned this Oct 18, 2024
@abankhele
Copy link

abankhele commented Nov 8, 2024

  1. Click on https://avalon-dev.dlib.indiana.edu/media_objects/3j3332278
  2. Observe that the button displays "Close 2 sections."
  3. Collapse one of the sections (e.g., Lunchroom Manners). Despite closing the only section that has structure (so everything is actually closed), the button still reads "Close 2 sections."
  4. Click the "Close 2 sections" button. It then updates to "Expand 2 sections."
Screen.Recording.2024-11-08.at.11.13.41.AM.mov

@elynema
Copy link

elynema commented Nov 8, 2024

In my testing, across all platforms I have observed that the button text does not update if all sections are manually opened or closed:

  1. Click button to close all sections
  2. Expand all sections individually
  3. Button still says 'Expand [x] sections"
  4. Click button to expand all sections
  5. Manually close all sections individually.
  6. Button still says "Close [x] sections" even though all sections are closed.

This happens even if there is only 1 section.

Also across all platforms, if the user loads page and clicks "Close [x] sections" button, then starts playback, the first section does not pop open when playback starts (the second one does).

Private Zenhub Video

@elynema
Copy link

elynema commented Nov 8, 2024

Note that aside from these minor issues, the new button is working wonderfully!! I asked Dananji to take a look at the last issue reported here (the first section does not open when playback begins if all sections are closed prior to playback).

@joncameron Do you think we should create new issues for either of the other minor issues above?

@joncameron
Copy link
Contributor

I created issues for both of these: #731 and #732.

@joncameron
Copy link
Contributor

Tested and closed #731 and #732; closing this issue as well. Working great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
structured_nav Improvements/fixes in structured nav
Projects
None yet
Development

No branches or pull requests

4 participants