Skip to content

Conversation

@Pato-desu
Copy link
Collaborator

@Pato-desu Pato-desu commented Dec 5, 2025

#571

  • get feedback
  • make it "sticky" ? or that it scrolls showing the selected header at the middle (noticeable in risks)
  • fix zoomed states
  • check edgecases and different pages

@netlify
Copy link

netlify bot commented Dec 5, 2025

Deploy Preview for pauseai ready!

Name Link
🔨 Latest commit 6a5ed7b
🔍 Latest deploy log https://app.netlify.com/projects/pauseai/deploys/69430829dfddc500082a86cd
😎 Deploy Preview https://deploy-preview-579--pauseai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 73 (🟢 up 16 from production)
Accessibility: 89 (no change from production)
Best Practices: 100 (no change from production)
SEO: 98 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@Wituareard
Copy link
Collaborator

Thanks, main problem is that it overlays the content at in-between sizes
grafik

@Pato-desu
Copy link
Collaborator Author

@Wituareard how would you fix that? making it go to mobile mode to the slightest zoom?

@Wituareard
Copy link
Collaborator

Not sure, that would be one solution

@Wituareard
Copy link
Collaborator

Wituareard commented Dec 10, 2025

Also I think the library should already be able to scroll automatically?

@Pato-desu
Copy link
Collaborator Author

Pato-desu commented Dec 11, 2025

Also I think the library should already be able to scroll automatically?

Mmm, what do you mean by scrolling automatically? The sidebar in the /risks page was left showing the same headers while the highlighted headers would change to be the ones out of the screen when scrolling too much (on the corpus).

I'm basically vibe coding without understanding the code, but even activating a keepInView thing that the AI tried didn't fix it.

@Wituareard
Copy link
Collaborator

Alright yeah, whatever

@Pato-desu
Copy link
Collaborator Author

i for the love of god cannot make it switch at other resolutions/ zooms, so i give up

@Pato-desu
Copy link
Collaborator Author

@joepio @Maximophone: big change, what do you think?

Maybe the color of the highlighted header in the sidebar is too eye-grabbing?

@Wituareard
Copy link
Collaborator

i for the love of god cannot make it switch at other resolutions/ zooms, so i give up

I'll try to do that

@Pato-desu Pato-desu marked this pull request as ready for review December 16, 2025 02:41
@Pato-desu
Copy link
Collaborator Author

I thought this change was important so I asked for reviews, let me know if it wasn't necessary

@Wituareard
Copy link
Collaborator

Yes makes sense, thanks for the reminder

@Wituareard
Copy link
Collaborator

I adjusted the breakpoint, but I agree that it does look a bit attention grabbing

@Maximophone
Copy link
Contributor

I don't see a sidebar when I go the the preview. Not sure what to look for. Also, I don't know what is the reason for these changes

@Maximophone
Copy link
Contributor

Maximophone commented Dec 19, 2025

OK I found the context, but will need more time than I have available today to read and get up to speed

@seankessinger seankessinger mentioned this pull request Dec 19, 2025
@Wituareard Wituareard linked an issue Dec 19, 2025 that may be closed by this pull request
Copy link
Collaborator

@anthonybailey anthonybailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question about the approach:

I noticed the library (svelte-toc) already has built-in support for a sidebar mode. When desktop is true, it applies position: sticky and has CSS variables like --toc-desktop-sticky-top for customization.

This PR creates a separate wrapper div with position: fixed and renders a second <Toc> component for the sidebar case.

Did you try using the library's built-in desktop mode first? If so, what problem led you to this approach instead?

Not blocking — just want to understand the reasoning before we merge.

Copy link
Collaborator

@anthonybailey anthonybailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(dupe comment deleted)

@anthonybailey
Copy link
Collaborator

I'll note also that I think the choice by svelte-toc author to call a choice desktop/mobile based on viewport width is pretty terrible, but probably not worth painful patching.

@Pato-desu
Copy link
Collaborator Author

i didn't try another thing

@Pato-desu
Copy link
Collaborator Author

I don't know what is the reason for these changes

I mean, having an index on long pages is useful; that's why I think pages like Wikipedia use them

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.

Sidebars on Desktop

5 participants