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

Fix sidebar height & hide ScrollUpButton until scrolled (fade in) #384

Merged
merged 3 commits into from
Jan 24, 2021

Conversation

StewartThomson
Copy link
Contributor

Fixes #383 and issue found within #276

@StewartThomson StewartThomson requested a review from a team as a code owner January 22, 2021 04:42
@codecov
Copy link

codecov bot commented Jan 22, 2021

Codecov Report

Merging #384 (29a0171) into master (d0f47c7) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #384   +/-   ##
=======================================
  Coverage   88.92%   88.92%           
=======================================
  Files          44       44           
  Lines        1436     1436           
=======================================
  Hits         1277     1277           
  Misses         85       85           
  Partials       74       74           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0f47c7...29a0171. Read the comment docs.

Copy link
Member

@jmattheis jmattheis left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. This actually has been bugging me too.

I've added remarks in subcomments.

ui/src/common/ScrollUpButton.tsx Outdated Show resolved Hide resolved
ui/src/common/ScrollUpButton.tsx Outdated Show resolved Hide resolved
@StewartThomson
Copy link
Contributor Author

Feedback implemented @jmattheis


componentWillUnmount() {
if (typeof window !== 'undefined') {
window.removeEventListener('scroll', this.scrollHandler.bind(this));
Copy link
Member

Choose a reason for hiding this comment

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

I think this doesn't work as .bind will give a new reference and thus, doesn't unregister the old handler. I'll fix this. Also, I'll prevent some rerenders, by checking if the state will be changed.

@jmattheis jmattheis merged commit 1cbd273 into gotify:master Jan 24, 2021
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.

Web ui: make sidebar full height
2 participants