8000 Fix sticky sidebar issues by mpourismaiel · Pull Request #788 · okkur/syna · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix sticky sidebar issues #788

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

Merged
merged 6 commits into from
Jul 2, 2020

Conversation

mpourismaiel
Copy link
Member

What this PR does / why we need it:

  • Fix sticky sidebar scroll issue (Content was not scrollable when it exceeded height of the page)
  • Fix sticky sidebar being overlapped by sticky navbar

Which issue this PR fixes:
fixes #700
fixes #601

Release note:

- content: Fix sticky sidebar issues

@mpourismaiel mpourismaiel added this to the v0.18.0 milestone Jun 24, 2020
@mpourismaiel mpourismaiel requested a review from stp-ip June 24, 2020 16:09
@mpourismaiel mpourismaiel self-assigned this Jun 24, 2020
@mpourismaiel
Copy link
Member Author
mpourismaiel commented Jun 24, 2020

I forgot to mention, please scroll the docs page with some of the articles expanded, in a long page with browser height set to 400px for example. The sidebar should stay in place while you scroll until it meets the header.

The code is implemented in a way that the two fragments stay independent and ignorant of each other. The content fragment only applies the scroll code if there is an active sidebar and should not break if there is a navbar or not.

@mpourismaiel
Copy link
Member Author

Fixed the bug that was causing the failing test and then fixed a faulty test that failed occasionally. It was failing for this PR so pushed the commit here, let me know if you want me to separate it.

Copy link
Member
@stp-ip stp-ip left a comment

Choose a reason for hiding this comment

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

Ok with the fix in here.

A few comments already.

Comment on lines +227 to +233
{{- if .Params.sticky }}
<style>
:root {
--header-height: 56px;
}
</style>
{{- end -}}
Copy link
Member

Choose a reason for hiding this comment

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

Not sure I like the hardcoding of that. Can't think of a better solution so.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't think of a solution that doesn't involve JS and is not hard coding the value. I'll try to figure something out and maybe we can create an issue to track it.

Copy link
Member

Choose a reason for hiding this comment

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

Fine to keep it as is and open a "revisit" to track this.

@stp-ip
Copy link
Member
stp-ip commented Jun 25, 2020

Like the scrolling, but the position doesn't seem perfect. This is more a side effect of #513 I guess. As we are overwriting the height. Would that be something we would like to fix here as well or am I missing something?

Screenshot_2020-06-25 Multilingual Mode

  • Install <- not shown

@stp-ip
Copy link
Member
stp-ip commented Jun 25, 2020

Edgecase, that should probably get a dev/ page and maybe a test. What happens with 2 sidebars? Do we need an additional note for the "sticky" config for the content fragment?

@stp-ip
Copy link
Member
stp-ip commented Jun 29, 2020

What do you think about a dev/ page for manual testing and probably also automated testing?

@mpourismaiel
Copy link
Member Author

@stp-ip Added tests and dev pages accordingly.

Copy link
Member
@stp-ip stp-ip left a comment

Choose a reason for hiding this comment

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

Awesome. I feel this moves us a great deal forward.
lgtm

@stp-ip stp-ip merged commit 2954785 into okkur:master Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Sidebar with sticky = true [content]: Sidebar is not scrollable
2 participants
0