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

Api docs scrolling and anchors appear broken #47858

Closed
eri412 opened this issue May 4, 2023 · 10 comments
Closed

Api docs scrolling and anchors appear broken #47858

eri412 opened this issue May 4, 2023 · 10 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@eri412
Copy link

eri412 commented May 4, 2023

URL:

https://nodejs.org/api/modules.html (or any other api page)

Browser Name:

Chrome

Browser Version:

112.0.5615.139

Operating System:

Windows 10, 21H2, 19044.2846

How to reproduce the issue:

Weird scrolling behaviour (look at the scrollbar):

Modules_.CommonJS.modules._.Node.js.v20.1.0.Documentation.-.Google.Chrome.2023-05-04.10-22-10.-.Trim.mp4

Anchors periodically send to a wrong subsection & reloading the page with an anchor in the url (sometimes) moves the page upwards.

Modules_.CommonJS.modules._.Node.js.v20.1.0.Documentation.-.Google.Chrome.2023-05-04.10-23-11.mp4

The same issue also appears in Edge and in Chrome on Mint on VM.

@harshitphoenix
Copy link

I will work on this one.

@ovflowd
Copy link
Member

ovflowd commented May 4, 2023

  • The scrolling behaviour seems to be a bug in our JavaScript code behind the scrolling listening on the API docs JavaScript?
  • The anchor issue is a known issue on the all.html page, it's a tricky and complex bug and probably not worth to be fixed on the current tooling due to its complexity.
  • The issue about when clicking to an anchor being sent to the wrong place also seems to be an issue of the current HTML template and maybe JavaScript of the API docs.

Note that this issue is not an issue of the Website repository, neither for the Website Team. The related code is placed at nodejs/node.

@harshitphoenix feel free to work on them, but they might not be as easy as you think. The 2nd one for example is quite tricky.

I'm moving this issue to https://github.com/nodejs/node repository as it should belong there.

@ovflowd ovflowd transferred this issue from nodejs/nodejs.org May 4, 2023
@ovflowd ovflowd added the doc Issues and PRs related to the documentations. label May 4, 2023
@ovflowd
Copy link
Member

ovflowd commented May 4, 2023

I've just found the culprit of the 1st bug, which seems to be related due the styling of content-visiblity on section tags.

content-visibility: auto;
contain-intrinsic-size: 1px 5000px;

I have no idea why we have these styles applied. But nevertheless, I'd be fine removing them.

@ovflowd
Copy link
Member

ovflowd commented May 4, 2023

It also seems that by removing these, the overall style gets broken the width of the content not respecting the window width. That should probably be fixed by using CSS grids. And allocating a fixed width of 250px for the first column and 1fr for the 2nd column.

@richardlau
Copy link
Member

I've just found the culprit of the 1st bug, which seems to be related due the styling of content-visiblity on section tags.

content-visibility: auto;
contain-intrinsic-size: 1px 5000px;

I have no idea why we have these styles applied. But nevertheless, I'd be fine removing them.

There's already a PR open for this: #41869

@harshitphoenix
Copy link

I've just found the culprit of the 1st bug, which seems to be related due the styling of content-visiblity on section tags.

content-visibility: auto;
contain-intrinsic-size: 1px 5000px;

I have no idea why we have these styles applied. But nevertheless, I'd be fine removing them.

There's already a PR open for this: #41869

Does the PR addresses both the issues?

@ovflowd
Copy link
Member

ovflowd commented May 4, 2023

Nope.

@mscdex
Copy link
Contributor

mscdex commented May 4, 2023

There's an existing issue for this here. Unfortunately there hasn't been any movement on it AFAIK since then.

@mscdex mscdex closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2023
@mscdex mscdex added duplicate Issues and PRs that are duplicates of other issues or PRs. and removed doc Issues and PRs related to the documentations. labels May 4, 2023
@eri412
Copy link
Author

eri412 commented May 4, 2023

Yep, I initially looked through the issues in the wrong repo.

@ovflowd
Copy link
Member

ovflowd commented May 5, 2023

I'm going to reply on the original issue some thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

5 participants