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

nav: right CONTENT sidebar highlights 2nd header on top window position #38

Open
jorgeorpinel opened this issue Oct 28, 2019 · 9 comments

Comments

@jorgeorpinel
Copy link

jorgeorpinel commented Oct 28, 2019

Right-side CONTENTS element doesn't highlight the right header, at least with scroll 0 in the example below:

image

https://dvc.org/doc/install/macos

@jorgeorpinel jorgeorpinel added 🐛 type: bug Something isn't working. A: docs Area: documentation website: eng-doc labels Oct 28, 2019
@jorgeorpinel

This comment has been minimized.

@shcheklein

This comment has been minimized.

@shcheklein shcheklein added type: enhancement and removed 🐛 type: bug Something isn't working. labels Oct 29, 2019
@jorgeorpinel jorgeorpinel changed the title react: CONTENTS highlights 2nd header on top window position nav: right CONTENT sidebar highlights 2nd header on top window position Jan 19, 2020
@jorgeorpinel jorgeorpinel removed the A: docs Area: documentation label Jan 19, 2020
@jorgeorpinel jorgeorpinel added 🐛 type: bug Something isn't working. and removed type: enhancement labels May 18, 2020
@jorgeorpinel
Copy link
Author

Also related/ part of the solution: #37

@iKBAHT
Copy link

iKBAHT commented May 18, 2020

Some ideas:
https://github.com/iterative/dvc.org/blob/master/src/components/Documentation/RightPanel/index.tsx#L44
A peculiarity of the navigation algorithm

@jorgeorpinel
Copy link
Author

Ping @iterative/websites small bug outstanding here.

Also related: #37

@jorgeorpinel jorgeorpinel transferred this issue from iterative/dvc.org Jun 29, 2022
@jorgeorpinel
Copy link
Author

jorgeorpinel commented Jun 29, 2022

p.s. this only happens in pages with an H2 near the top (most). Otherwise nothing is highlighted (see also #37), e.g. for https://dvc.org/doc/user-guide/experiment-management/sharing-experiments (in my screen at least).

@jorgeorpinel
Copy link
Author

Hmmm. This may be a more general issue. For example https://dvc.org/doc/command-reference/plots#html-templates highlights the next header as well:

image

@rogermparent
Copy link
Contributor

We can probably overhaul the highlighting logic using intersection observers and some more elegant plumbing on getting the headers in the list synchronized with the content.

@jorgeorpinel

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants