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

Wayfinder does not scroll to first or last sections #598

Open
hobuobi opened this issue Aug 1, 2022 · 2 comments
Open

Wayfinder does not scroll to first or last sections #598

hobuobi opened this issue Aug 1, 2022 · 2 comments
Assignees

Comments

@hobuobi
Copy link

hobuobi commented Aug 1, 2022

The Wayfinder on Spotlight is the bar at the bottom that contains the "table of contents," as well as arrows to allow the user to easily navigate from section to section sequentially.

Currently, the Wayfinder does not allow the user to to first or last sections. To reproduce:

  • Go to any narrative on Spotlight (for any state)
  • Click on the rightwards arrow (next) until at the second to last section (e.g. section 5/6, or section 3/4).
  • Click the right arrow again.
  • Observe error Bump websocket-extensions from 0.1.3 to 0.1.4 #1 (page will scroll halfway to the last section and then stop).
  • Try doing the same thing going in the other direction, i.e., click the left arrow until the second section on the page (page 2/X).
  • Click the left arrow again.
  • Observe error Build frontend skeleton #2 (page will scroll halfway to the first section and then stop).

I don't believe we were running into this issue when the feature was first merged, so maybe a recent change broke it? cc @nasaownsky as the original engineer on the feature and might have some idea why it's broken.

@terryttsai
Copy link
Contributor

@nasaownsky I dug into this and found that scrolling abruptly stops when one of the nav buttons (AdvanceLink) becomes disabled. If I change lines 195-196 in Wayfinder.tsx to this:

  const disablePrev = activeSection === 1 && false;
  const disableNext = activeSection === totalPages && false;

then scrolling works for the first and last sections. Hadn't figure out why this happens but at least we know where it's happening.

@terryttsai
Copy link
Contributor

terryttsai commented Aug 3, 2022

If we need to, we can release Spotlight with the wayfinder buttons tweaked so that the buttons aren't disabled when you reach the first or last section, so you could still click on them they just would do nothing when you reach the end or beginning of the page.

@jkgerig jkgerig added the Team: State Pod Label for all tasks to be completed by state pods label Sep 26, 2022
@jkgerig jkgerig removed State Pod: MINDMELD Team: State Pod Label for all tasks to be completed by state pods labels Nov 10, 2023
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

No branches or pull requests

4 participants