rails / sdoc

Standalone sdoc generator
http://api.rubyonrails.org/
Other
820 stars 131 forks source link

Rework method spotlight effect #319

Closed jonathanhefner closed 1 year ago

jonathanhefner commented 1 year ago

a67ece6220f8da3ed7f3319b89550234d1728382 changed the HTML around method permalinks, which broke the spotlight effect when navigating to a specific method. However, prior to that commit (since upgrading to Turbo v7), the spotlight effect only worked for cross-page navigation, not intra-page navigation. This commit fixes the spotlight effect for both cross-page and intra-page navigation.

Additionally, this commit changes the visual effect from a momentary flash of yellow to a persistent mark in the left margin. This ensures that effect is not missed (for example, when opening the page as a background tab), and is less jarring when using dark mode.

Before After
before-light after-light
before-dark after-dark