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

Pres Map - Raising exports accordion toggle does not work as expected #4558

Open
Tracked by #159
johnnyporkchops opened this issue Apr 20, 2021 · 1 comment
Open
Tracked by #159

Comments

@johnnyporkchops
Copy link
Contributor

johnnyporkchops commented Apr 20, 2021

Summary

In the final iteration of the changes to pres-finance-map-box.js for #4504, a breaking change was overlooked in testing : The open/close behavior of Export raising data area.

What happened?
User clicks Export raising data button to open downloads area and page scrolls to its location.

  • The ability to toggle the raising downloads area open/closed does not work once a user scrolls away from it and back to it on the page
  • If one closes it the first time it is opened, a scroll away and back will automatically open it

What should have happened?
This area should remain toggleable, once it is open by clicking the Export raising data button and maintain the user-chosen state (open/closed) while scrolling around

Frequency

Always

How to Reproduce

Device, browser, etc

Chrome/Opera/Firefox/Safari
Will need to test in MS Edge as we did for the passive listeners PR #4504 that introduced this and since passive listeners involve touchstart and scroll events, it is a good idea to test touch screen on MS Surface and Phones.

Possible solutions to consider:

  1. Figure out how to maintain the original functionality while also achieving the passive listeners fix (look at previous iteration before passive listener PR 4504)
  2. Remove the ability to close the area once it has been opened by user clicking Export raising data button (with UX approval)
  3. Use the out-of-the-box accordion that we use on other pages, although I believe attempts at this were difficult the first time around, hence the current one-off html/js implementation.

Comment on the issue on post-merged PR
https://github.com/fecgov/fec-cms/pull/4504/files#r615523787

@johnnyporkchops
Copy link
Contributor Author

johnnyporkchops commented Nov 21, 2023

The new scroll listener/function causes the height on the state-downloads links area to continue to calculate long after the scroll has stopped. This blocks the accordion toggle function from working until it finally finishes registering a value for every pixel the user scrolled.

pres_mapA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🗄️ PI backlog
Development

No branches or pull requests

4 participants