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

Improve right panel scroll bar #2524

Closed
wants to merge 3 commits into from
Closed

Improve right panel scroll bar #2524

wants to merge 3 commits into from

Conversation

AllanOricil
Copy link

You may disregard these recommendations if you used the Edit on GitHub button from dvc.org to improve a doc in place.

❗ Please read the guidelines in the Contributing to the Documentation list if you make any substantial changes to the documentation or JS engine.

🐛 Please make sure to mention Fix #issue (if applicable) in the description of the PR. This causes GitHub to close it automatically when the PR is merged.

Please choose to allow us to edit your branch when creating the PR.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

Fix #1333

Hi @shcheklein ,

I finished to do the improvements you asked for this #1333
I basically copied the GMail CSS for the shadow boxes like you commented.
I spent around 8h to finish it. Around 1.5h fixing dependency issues with with Mac M1 (more specifically libvips which is used by sharp and used by Gatsby) and problems with my node version. I was using node 12 and Sharp was not working on my Mac M1, so I switched to Node 15 and everything worked. Then I used around 4h to learn the basics about React hooks and 2.5h to actually create and execute a plan to fix the issues.

Follow below pictures to show the result. I hope it is exactly what you asked.
Can you tell me which branch you want me to open the PR against?

When the scroolbar appears and it is at the top, a shadow box appears at the bottom

Screenshot 2021-06-01 at 13 03 49

When the scrollbar appears and it is anywhere in between, both shadow boxes appear in the top and bottom
Screenshot 2021-06-01 at 13 05 13

When the scrollbar appears and it is at the bottom/end of the div, a shadow box appears at the top
Screenshot 2021-06-01 at 13 06 17

When the scrollbar is not present, the shadow boxes are not added
Screenshot 2021-06-01 at 13 07 19

All the changes above are also working on Firefox 89.0 and Safari 14.1.1.

I also made the "Selected Menu Item" to be visible all the time. I noticed the current code was attempting to do that, but it was not working, so I did a small change to fix it. Now whenever you scroll to a section the Menu Item will follow you along, even when there are scrollbars.

Screenshot 2021-06-01 at 13 11 30

React is not my thing but I think I did a good job. Now lets see what you think. Thanks.

@AllanOricil
Copy link
Author

AllanOricil commented Jun 1, 2021

@shcheklein the commit check error does not make sense.
Screenshot 2021-06-01 at 17 37 04

According to the offical specification of scrollIntoview behavior can receive 'instant' as its value.

https://developer.mozilla.org/pt-BR/docs/Web/API/Element/scrollIntoView

@AllanOricil
Copy link
Author

AllanOricil commented Jun 1, 2021

It is failling on lint stuff. When I run locally this error is not accused. When I ran prettier it formats differently than what is expecting. I dont really know how to fix it because it was suppose to be the same as we are using the same rules.

Screenshot 2021-06-01 at 17 51 39

@AllanOricil AllanOricil closed this Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

right panel scroll bar improvements
1 participant