GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: fix issues related to page scrolling by silverwind · Pull Request #6641 · nodejs/node

Conversation

@silverwind

@silverwind silverwind commented May 8, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Description of change

Moved the sidebar to a fixed position and moved the positioning of the main content to the page's body, which results in back/forward navigation through hash links and search highlight working again.

Added a script to prevent the main column from unintentional scrolling when the sidebar is scrolled outside its boundaries.

Fixes: #6637
Based on: #5716

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@silverwind silverwind added the doc Issues and PRs related to Node.js documentation. label May 8, 2016
@silverwind

silverwind commented May 11, 2016

Copy link
Copy Markdown
Contributor Author

@nodejs/website @nodejs/documentation

Is the JS "hack" too much? While I think it's pretty solid, I think that at this point I'm ok with removing it if someone has concerns about it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eljefedelrodeodeljefe

eljefedelrodeodeljefe commented May 11, 2016

Copy link
Copy Markdown
Contributor

Just general ones. Haven't made it to review yet. If you can avoid it it would be better....

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eljefedelrodeodeljefe

eljefedelrodeodeljefe commented May 11, 2016

Copy link
Copy Markdown
Contributor

Since it is using vanilla and well supported JS, I'd be okay with having this now and hopefully removing this later.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Florian-R
Florian-R reviewed May 11, 2016
View reviewed changes
Comment thread doc/template.html Outdated

@Florian-R Florian-R May 11, 2016

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

If you go this route, may I suggest to throttle the listener to avoid horrible perfs janks?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@silverwind silverwind May 11, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The handler is pretty lightweight, I don't think it could cause any janks, except on maybe ancient hardware.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Fishrock123 Fishrock123 May 11, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Isn't it still good practice to throttle it regardless?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@silverwind silverwind May 11, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Depends on the use case. With throttling, some events won't get cancelled which results in scroll ticks going through. That's not something I want in this case, so every event would have to be cancelled.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@silverwind

silverwind commented May 11, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Hmm, I think I'll drop the JS after all. It was just one user complaining about it, while probably more people agree to let the browser handle scrolling.

eljefedelrodeodeljefe, lpinca, Florian-R, ChALkeR, and detailyang reacted with thumbs up emoji
All reactions
  • 👍 5 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind
silverwind force-pushed the doc-scrolling branch from 09e459a to 15df52a Compare May 11, 2016 16:14
@silverwind
doc: fix issues related to page scrolling
15df52a
Moved the sidebar to a fixed position and moved the positioning of the
main content to the page's body, which results in back/forward
navigation through hash links and search highlight working again.

Fixes: nodejs#6637
Based on: nodejs#5716
@silverwind

silverwind commented May 11, 2016

Copy link
Copy Markdown
Contributor Author

Okay, CSS only change now to fix two issues. Please review!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpinca

lpinca commented May 11, 2016

Copy link
Copy Markdown
Member

I've tested this on Chrome and mobile Safari, all good 👍 .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eljefedelrodeodeljefe

eljefedelrodeodeljefe commented May 11, 2016

Copy link
Copy Markdown
Contributor

LGTM then

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpinca lpinca mentioned this pull request May 14, 2016
[documentation site] Back button does not scroll the page (solution included) #6751
Closed
@silverwind silverwind added the land-on-v5.x label May 15, 2016
silverwind referenced this pull request May 15, 2016
@silverwind
doc: fix issues related to page scrolling
bef1ec0
Moved the sidebar to a fixed position and moved the main column to the
page's body, which results in back/forward navigation through hash
links and search highlight working again.

Fixes: #6637
Fixes: #6751
Based on: #5716
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Robert Lindstaedt <[email protected]>
@silverwind silverwind closed this May 17, 2016
@silverwind

silverwind commented May 17, 2016

Copy link
Copy Markdown
Contributor Author

Landed in bef1ec0.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind
silverwind deleted the doc-scrolling branch May 17, 2016 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

doc Issues and PRs related to Node.js documentation.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

doc: search indicators missing

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@silverwind @eljefedelrodeodeljefe @lpinca @Fishrock123 @Florian-R
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.