Skip to content

Conversation

@JonasKellerer
Copy link
Contributor

resolves #

Summary

This is a draft of one way to fix the anchor scrolling. It uses an astro component, which has a script tag inside. In this script we listen to the 'gs-finished-loading' events and when the given number is reached, it scrolls to the anchor element. I added also a loading indicator, so we have less scrolling during the loading phase.

This currently only works on the analyze single variant pages of a standart organism, but it should be easy to also do this for the other views.

Things to discuss:
This now uses an astro component wtih srcipt tag to perform client actions. This feels strange, as we use normally react for that. Therefore, we might switch to react for this component. However, we would need to move many elements from astro to react.

  • The layout of the loading indicator is not very nice. This could need some improvement
  • We don't have a loading indicator for the filter bar. I am not sure if we want one, or not. This does not introduce layout shifts during rendering on large screens. However, on smaller screens the filter bar is at the top. We might need to consider this as well.

Screenshot

Bildschirmaufnahme.2025-05-16.111059.mp4

@JonasKellerer JonasKellerer force-pushed the 632-scroll-to-component-links-dont-fully-work branch from f771fe5 to 898d1f1 Compare May 16, 2025 09:19
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