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

Fixes #466. Adds support for header highlighting using intersection o… #580

Merged
merged 6 commits into from
Dec 7, 2017

Conversation

Abijeet
Copy link
Member

@Abijeet Abijeet commented Nov 1, 2017

…bserver.

@Abijeet Abijeet mentioned this pull request Nov 1, 2017
@Abijeet
Copy link
Member Author

Abijeet commented Nov 5, 2017

There's an issue that I'm not sure how to solve -

screenshot-127 0 0 1-8000-2017-11-02-01-16-55-784

The current header is decided based on the proximity of a heading to the top of the viewport. To be precise, if a heading is 100px within the top corner of the viewport it is marked as the current heading. Problem is with this heading at the bottom, it never gets close to 100px of the top of the viewport.

@Abijeet
Copy link
Member Author

Abijeet commented Nov 5, 2017

@ssddanbrown - Do you think we should add a scroll event check, and if the user has reached the bottom of the page, we highlight the last header in the page nav?

@ssddanbrown
Copy link
Member

@Abijeet Sorry for the delay in my response.

I know its not conventional by maybe, instead of guessing what the user is viewing (By what's near the top of the page), we highlight all sections currently in view?
So, In your example screenshot, Both the bottom two items in the page nav would be highlighted?

@ssddanbrown ssddanbrown added this to the BookStack Beta v0.19.0 milestone Nov 11, 2017
@@ -135,7 +135,7 @@ body.flexbox {
width: 30%;
left: 0;
height: 100%;
overflow-y: scroll;
overflow-y: auto;
Copy link
Member Author

@Abijeet Abijeet Nov 14, 2017

Choose a reason for hiding this comment

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

Firefox 57 adds a scrollbar with overflow-y: scroll.

bc1bc2e9-c489-425d-b210-cd3606a7c06e

@Abijeet
Copy link
Member Author

Abijeet commented Nov 14, 2017

Like you said, it's unconventional but I've gone ahead and done that since that seemed like the "correct" thing to do. Here is how it looks now -

download

In addition, a property in _grid.scss was causing a scrollbar to appear in Firefox 57. I've fixed that as well -

bc1bc2e9-c489-425d-b210-cd3606a7c06e

@ssddanbrown ssddanbrown merged commit 2261308 into BookStackApp:master Dec 7, 2017
@ssddanbrown
Copy link
Member

Thank again @Abijeet, Now merged.

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

Successfully merging this pull request may close these issues.

2 participants