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

Scrollbar for Samples with Numerous Sources #343

Merged
merged 12 commits into from
Jan 11, 2024

Conversation

cmhhelgeson
Copy link
Contributor

Added an overflow scrollbar for samples with numerous code sources, such as the deferred rendering, Cornell box, or bitonicSort samples.
https://github.com/webgpu/webgpu-samples/assets/62450112/0674c338-7929-4cc1-92f4-9524868fed2f
Draft is currently in PR because I would like to apply analogous Firefox styling for viewing in Nightly Firefox builds.

@cmhhelgeson
Copy link
Contributor Author

Actually, applying scrollbar-width: thin seems to be close enough for now.

@cmhhelgeson cmhhelgeson marked this pull request as ready for review January 2, 2024 21:22
@kainino0x
Copy link
Collaborator

Maybe this makes it a bit hard to see that there are more tabs to the right? Right now we flow the tabs onto a new line so they're easy to see.

@cmhhelgeson
Copy link
Contributor Author

cmhhelgeson commented Jan 5, 2024

Maybe this makes it a bit hard to see that there are more tabs to the right? Right now we flow the tabs onto a new line so they're easy to see.

Possibly, but I'd contend that that's only likely if the end of one code "tab" aligns perfectly with the edge of the screen. I think the presence of the scrollbar, the code tab's title going off-screen, and the gray hover indicator going off-screen is enough to clue in the user. Of course, this is a non-essential, subjective change, so it's ultimately just a matter of preference between the stacked and scrolling versions.

…be increased or arrows can be added to content of pseudo elements to make overflow more obvious if necessary
@cmhhelgeson cmhhelgeson requested a review from austinEng January 10, 2024 01:09
@kainino0x
Copy link
Collaborator

Thinking about this further, if someone doesn't have a touchpad and doesn't know shift-scroll then horizontal scrolling is a bit painful. I would prefer a larger scrollbar (it would be more obvious, and easier to click), though I suppose I'm still not a fan of horizontal scrolling in general.

With a larger scrollbar though, I'd be happy enough either way. Thanks for putting up with my opinions :)

Copy link
Collaborator

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

LGTM

@kainino0x kainino0x merged commit 85beeda into webgpu:main Jan 11, 2024
1 check passed
@cmhhelgeson cmhhelgeson deleted the codemirror_scroll_branch branch April 12, 2024 16:40
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.

3 participants