Skip to content

Dont break GitHub file toolbar

Warren Gifford requested to merge dont-break-github-file-toolbar into master

Created by: felixfbecker

Part of #9462 (closed) Fixes #4480 (closed)

This ensures that even if there is an unnatural amount of action items, the GitHub UI does not break (e.g. the button groups stay together). I chose to let our buttons wrap. If a user chooses to add all these extensions, I think they would expect to see their UI too.

Here are some fabricated, extreme examples with the new styling (see https://github.com/sourcegraph/sourcegraph/issues/4480 for the "before" state):

image

Here we can nicely see that we will take "the backseat" before GitHub UI in taking up space, but eventually we also let the file name wrap before our buttons become stacked too much. We will never break up button groups though now, which was the case before.

This change also ensures there is some vertical margin when buttons do have to wrap.

File views:

image

Tested on github.com and GitHub Enterprise, with and without Refined GitHub.

Merge request reports

Loading