8000 Bugfix/buffer scrollbar fixes by akinsho · Pull Request #2495 · onivim/oni · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Bugfix/buffer scrollbar fixes #2495

Merged
merged 6 commits into from
Aug 19, 2018
Merged

Conversation

akinsho
Copy link
Member
@akinsho akinsho commented Aug 6, 2018

This PR fixes #2114 and a few issues with the buffer scroll bar

The first issue relates to #2114 which was the fact the the buffer bar lagged behind if the window was resized. The specific change that fixes this is changing the position from absolute to fixed

The other issue was that the error markers weren't rendering correctly i.e. only one error marker was shown in the buffer because the uniqBy function was filtering by Id but actually there was no id prop. Ive changed this to filter by line so the scroll bar just shows errors by line, meaning you now get multiple errors in the scroll bar based on position

Also took the opportunity to change the components to styled components with dynamic attrs and added keys to the error components

@akinsho akinsho changed the title Bugfix/laggy buffer scrollbar responsiveness Bugfix/buffer scrollbar responsiveness Aug 6, 2018
because position fixed does not respect overflow
@codecov
Copy link
codecov bot commented Aug 7, 2018

Codecov Report

Merging #2495 into master will increase coverage by 0.04%.
The diff coverage is 55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2495      +/-   ##
==========================================
+ Coverage    44.2%   44.24%   +0.04%     
==========================================
  Files         344      345       +1     
  Lines       13886    13937      +51     
  Branches     1829     1830       +1     
==========================================
+ Hits         6138     6167      +29     
- Misses       7508     7530      +22     
  Partials      240      240
Impacted Files Coverage Δ
browser/src/UI/components/Error.tsx 41.3% <22.22%> (-0.92%) ⬇️
browser/src/UI/components/BufferScrollBar.tsx 62.5% <81.81%> (ø)
browser/src/UI/components/VersionControl/File.tsx 78.57% <0%> (-14.29%) ⬇️
...src/Services/VersionControl/VersionControlPane.tsx 47.61% <0%> (-0.39%) ⬇️
...src/Services/VersionControl/VersionControlView.tsx 73.01% <0%> (ø) ⬆️
browser/src/Services/Learning/LearningPane.tsx 28.07% <0%> (ø) ⬆️
browser/src/UI/components/WindowSplits.tsx 39.39% <0%> (ø) ⬆️
...rowser/src/UI/components/VersionControl/Staged.tsx 96.15% <0%> (ø) ⬆️
browser/src/Services/Menu/MenuComponent.tsx 38.8% <0%> (ø) ⬆️
... and 1 more

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 60c647e...02c9a07. Read the comment docs.

separate out marker creation into a separate method
add keys to error markers
@akinsho akinsho changed the title Bugfix/buffer scrollbar responsiveness Bugfix/buffer scrollbar fixes Aug 7, 2018
@akinsho
Copy link
Member Author
akinsho commented Aug 19, 2018

would appreciate a review @CrossR or @TalAmuyal, this fixes a UI issue which was really annoying me which is that there was a lag when resizing the window so the scrollbar would visibly be slow to move when resizing the original issue has a GIF also fixed an issue where error markers weren't being shown properly on the scrollbar

@akinsho akinsho requested review from CrossR and TalAmuyal August 19, 2018 12:57
Copy link
Member
@CrossR CrossR left a comment

Choose a reason for hiding this comment

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

Code changes look good, and works fine from my testing!

Feel free to just stick me as a reviewer on any PRs, sometimes I miss the swap from WIP to non-WIP.

@akinsho akinsho merged commit 127a2bc into onivim:master Aug 19, 2018
@akinsho akinsho deleted the bugfix/laggy-scrollbar branch August 19, 2018 16:20
psxpaul pushed a commit to psxpaul/oni that referenced this pull request Aug 20, 2018
This PR fixes onivim#2114 and a few issues with the buffer scroll bar

The first issue relates to onivim#2114 which was the fact the the buffer bar lagged behind if the window was resized. The specific change that fixes this is changing the position from `absolute` to `fixed`

The other issue was that the error markers weren't rendering correctly i.e. only one error marker was shown in the buffer because the `uniqBy` function was filtering by Id but actually there was no id prop. Ive changed this to filter by line so the scroll bar just shows errors by line, meaning you now get multiple errors in the scroll bar based on position

Also took the opportunity to change the components to styled components with dynamic attrs and added keys to the error components
@akinsho akinsho restored the bugfix/laggy-scrollbar branch October 1, 2018 09:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrollbar lags behind oni screen on resize
2 participants
0