react-native-website icon indicating copy to clipboard operation
react-native-website copied to clipboard

Remove unused scrollbar styles from themes

Open clicktodev opened this issue 11 months ago • 5 comments

Eliminate unnecessary scrollbar styles from both shared and custom themes to streamline the codebase.

they seem to only work partially on codeblocks but even then it's always better to rely on native scrollbars as they behave more closely to user expectations. especially now that native scrollbars support the thin variant which docusaurus already applies at the right places.

image

clicktodev avatar Jan 04 '25 23:01 clicktodev

Deploy Preview for react-native ready!

Name Link
Latest commit bcc9c493069c8bf166f75e8fe891321d3be6b7db
Latest deploy log https://app.netlify.com/sites/react-native/deploys/677e9d5b9bcc150008fa0774
Deploy Preview https://deploy-preview-4422--react-native.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jan 04 '25 23:01 netlify[bot]

I think that those scrollbars are used and don't see anything wrong with them. In contrast, I think that they offer more control and flexibility for the developers, allowing to unify the overall appearance of website, no matter which platform or browser user uses..

Can you explain few points from you take?

streamline the codebase

What exactly you have in mind by that? Does the scrollbars hinder or negatively affect the code base?

they seem to only work partially on codeblocks

Have you tried to fix the spotted issue? Can you elaborate a bit more when they work and when not, and what is an expected behavior in your eyes?

it's always better to rely on native scrollbars as they behave more closely to user expectations

Can you explain a bit more that statement? I would say that the functionally the scrollbars are the same, no matter how they styled. What are the resources or stats you are basing your observations about users expectations on?

Simek avatar Jan 05 '25 18:01 Simek

I checked the places where the custom scrollbar is being applied in the css (main scrollbar, main sidenav, blog sidebar, table of contents, codeblock) and they all use the native scrollbar. I believe these custom styles are from the v1 to v2 migration and are now broken and are being overwritten by docusaurus.

it's always better to rely on native scrollbars as they behave more closely to user expectations

Well this is from personal experience and other devs i worked with agreed with me but here's a collection of forums where the matter was heavily discussed. https://www.reddit.com/r/webdev/comments/1bhhu7k/scrollbar_customization/ https://news.ycombinator.com/item?id=36302002 https://www.reddit.com/r/web_design/comments/akmnq5/why_do_developers_feel_the_need_to_reinvent_and/ https://www.reddit.com/r/webdev/comments/onz3a6/whats_up_with_styling_scrollbars/

clicktodev avatar Jan 07 '25 14:01 clicktodev

Feel free to open both versions side by side and let me know if you find a difference because so far I couldn't find any.

clicktodev avatar Jan 07 '25 17:01 clicktodev

@Simek I added a screenshot for visual proof in the original post

clicktodev avatar Jan 13 '25 22:01 clicktodev