feat(ui): add reusable scroll-to-top FAB across long-content pages#291
Closed
JacobCoffee wants to merge 1 commit intomainfrom
Closed
feat(ui): add reusable scroll-to-top FAB across long-content pages#291JacobCoffee wants to merge 1 commit intomainfrom
JacobCoffee wants to merge 1 commit intomainfrom
Conversation
9bb6d7a to
c486fda
Compare
Adds a small floating button that appears once the user has scrolled
past 400px of content and snaps the IonContent back to the top on tap.
Implementation:
- New ScrollToTopModule + ScrollToTopComponent at src/app/scroll-to-top/.
Takes the parent's <ion-content> via @input, subscribes to ionScroll,
toggles visibility on threshold cross, unsubscribes on destroy.
- <app-scroll-to-top [content]="pageContent"> dropped inside ion-content
on every long-content page (21 pages: schedule-list, speakers,
sponsors, job-listings, sprints, rooms, room-detail, sponsor-detail,
session-detail, etc.).
- sponsor-detail and session-detail also gained scrollEvents="true" so
the component's inner subscription fires.
conference-map and expo-hall-map are intentionally skipped — they own
pinch-zoom interactions where an extra FAB at the same anchor point
would conflict.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c486fda to
a4275fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a small `ion-fab` "scroll to top" button that appears once the user has scrolled past 400px and snaps the page back to the top on tap. Wired into 21 long-content pages.
How
Pages wired
schedule-list, speaker-list, sponsors, job-listings, sprints, rooms, room-detail, sponsor-detail, session-detail, keynote-speakers, lightning-talks, session-types, venues-hours, social-media, about-pycon, about-psf, coc, wifi, help, account, now.
`sponsor-detail` and `session-detail` also gained `scrollEvents="true"` so the inner subscription fires.
Skipped
`conference-map` and `expo-hall-map` — they own pinch-zoom interactions and an extra FAB at the same anchor would conflict.
Test plan
🤖 Generated with Claude Code