Dont break GitHub file toolbar
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):
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:
Tested on github.com and GitHub Enterprise, with and without Refined GitHub.