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

Fix action bar design #9503

Merged
merged 5 commits into from
Apr 2, 2020
Merged

Fix action bar design #9503

merged 5 commits into from
Apr 2, 2020

Conversation

felixfbecker
Copy link
Contributor

@felixfbecker felixfbecker commented Apr 2, 2020

Part of #9462

We set a custom padding that made the buttons hard to distinguish, assymmetric and inconsistent with the rest of the UI. I simply removed the custom padding so it's consistent with all other buttons. We definitely have the space to do that.

I added a 1px gap between buttons so that they are distinct even in "pressed" state. Not fully sure about this one but I settled on it looking better than without.

I also fixed a tiny 1px gap at the bottom of each item by making them stretch.

This also fixes the font color differences between buttons that did not have an href, and the different cursor. In the process I converted the component to a function component.

Action items that are too wide are now clipped with ellipsis.

I modified the "pressed" background color to be a tad lighter. The problem before was that it was the same color as the frame of the action bar, so they didn't appear "pressed", but actually a layer above the bar. With this slight modification I find the state is much better communicated.

On hover action items receive a background lighter than the pressed state. This made a huge difference imo in making them feel like interactive UI elements.

Please note that the gifs are not fully representative because the color resolution is small.

2020-04-02 16 45 58

2020-04-02 16 37 05

@felixfbecker felixfbecker added webapp extensions Sourcegraph extensions design Design-oriented issues. It is not a design work request (use 'needs-design' instead) team/web labels Apr 2, 2020
@felixfbecker felixfbecker added this to the 3.15 milestone Apr 2, 2020
@felixfbecker felixfbecker requested a review from a team April 2, 2020 13:29
Links need empty href to be styled properly.
Rewrite component to function component.
@codecov
Copy link

codecov bot commented Apr 2, 2020

Codecov Report

Merging #9503 into master will increase coverage by 0.00%.
The diff coverage is 80.95%.

@@           Coverage Diff           @@
##           master    #9503   +/-   ##
=======================================
  Coverage   41.53%   41.53%           
=======================================
  Files        1332     1332           
  Lines       72585    72584    -1     
  Branches     6582     6578    -4     
=======================================
  Hits        30145    30145           
+ Misses      39641    39640    -1     
  Partials     2799     2799           
Impacted Files Coverage Δ
web/src/repo/RepoHeader.tsx 0.00% <ø> (ø)
shared/src/components/LinkOrButton.tsx 78.94% <77.77%> (+6.72%) ⬆️
shared/src/actions/ActionItem.tsx 80.64% <100.00%> (-0.41%) ⬇️
shared/src/actions/ActionsNavItems.tsx 80.00% <100.00%> (ø)

Copy link
Member

@eseliger eseliger left a comment

Choose a reason for hiding this comment

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

like the idea and appreciate converting to a function component 👍

Copy link
Contributor

@christinaforney christinaforney left a comment

Choose a reason for hiding this comment

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

Looks great! 🎉

Copy link

@imtommyroberts imtommyroberts left a comment

Choose a reason for hiding this comment

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

Looking great Felix!

@felixfbecker felixfbecker merged commit 1aa55c4 into master Apr 2, 2020
@felixfbecker felixfbecker deleted the fix-action-bar-design branch April 2, 2020 18:41
@felixfbecker felixfbecker mentioned this pull request Apr 6, 2020
63 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design-oriented issues. It is not a design work request (use 'needs-design' instead) extensions Sourcegraph extensions webapp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants