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

Make tabs smaller #12003

Merged
merged 18 commits into from
Jun 22, 2020
Merged

Make tabs smaller #12003

merged 18 commits into from
Jun 22, 2020

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jun 21, 2020

Fomantic's tabs are excessively wide and with another tab added on the repo tab bar (#8346) it would break the layout on the english language.

Globally reduce tab bar padding to around half of the previous values. Also the "pointing" tab bar now follows the original styling more in arc-green.

Before:

image

image

image

After:

image

image

image

Fomantic's tabs are excessively wide and with another tab added on the
repo tabbar (go-gitea#8346) it would break
the layout on the english language.

Globally reduce tab bar padding to around half of the previous values.
@silverwind silverwind mentioned this pull request Jun 21, 2020
13 tasks
@lafriks lafriks added the topic/ui Change the appearance of the Gitea UI label Jun 21, 2020
@lafriks lafriks added this to the 1.13.0 milestone Jun 21, 2020
web_src/less/_base.less Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 21, 2020
@silverwind
Copy link
Member Author

Few more tweaks incoming. Issue is arc-green styles the admin menu like tabs but base style doesn't (only border-bottom). I'm trying to get both look like tabs.

.stylelintrc Outdated Show resolved Hide resolved
@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

I don't necessarily agree with changing bottom/top padding

chrome_2020-06-21_22-02-14

@silverwind
Copy link
Member Author

Tweaks done, OP screenshots updated.

@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

padding-right: 1em
padding-left: 1em

chrome_2020-06-21_22-04-58

@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

The change made to admin tab causes active tab to have different positioning then non-active.

chrome_2020-06-21_22-08-37
chrome_2020-06-21_22-08-47

@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

Also it looks weird having them tabs on arc-green but normal on base theme

@silverwind
Copy link
Member Author

@CirnoT try latest changes, I removed the tab styling in arc-green.

@silverwind
Copy link
Member Author

1em (16px) seems to much but I I'll restore to 12px.

@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

You can try .75em, but the point wasn't the 1em but to keep top/bottom padding as they were.

arc-green looks fine now.

web_src/less/_base.less Outdated Show resolved Hide resolved
web_src/less/_base.less Outdated Show resolved Hide resolved
@silverwind
Copy link
Member Author

Tweaks done. Tabs are now 40px high in all cases.

@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

No, I still don't agree with padding such low as 4px, it needs to be at least 12px

chrome_2020-06-21_22-33-59

Visually there is literally no change. These are main tabs and they need to be big because they're main navigation.

@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

Tabs are now 40px high in all cases.

They're 37px, and if you were going for GH look with 40px, they also have 3px border on top :>

@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

10px with min-width 36px keeps them at 40px; we've been over it.

I won't settle for less than 12px, otherwise they're unusable for me and that is what I care about.

@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

And at the risk of repeating myself AGAIN, they look visually big ONLY on arc-green because of color contrast. Try switching to default theme and see for yourself how small they really are in term of clickable area.

@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

This PR reduces the width so to keep the padding ratio, height has the reduce as well

And you do, by whole 2.5px if you go with 12px

@silverwind
Copy link
Member Author

silverwind commented Jun 21, 2020

I don't know. 10px seems fine to me padding-ratio wise. 12px seems just slightly too tall. Maybe I'm just too used to tabs on pages like GitHub that also don't have such tall tabs. Do 4px really make such a difference?

image

image

web_src/less/_base.less Outdated Show resolved Hide resolved
@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

They are originally 46.59px, reducing them by almost 7px is too much change.

@silverwind
Copy link
Member Author

silverwind commented Jun 21, 2020

They are going from 45px (check inactive, active one has 1px more) to 40px. My point is we can't reduce width without some height reduction as well to maintain their general appearange.

@silverwind
Copy link
Member Author

How about 11px? 🤪

@CirnoT
Copy link
Contributor

CirnoT commented Jun 21, 2020

Acceptable 👍

@silverwind
Copy link
Member Author

silverwind commented Jun 21, 2020

Another fix regarding .new-menu background:

image

Overruled that background for the repo settings where it'd look odd when present:

image

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 21, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 22, 2020
@lafriks
Copy link
Member

lafriks commented Jun 22, 2020

🚀

@lafriks lafriks merged commit b948ecb into go-gitea:master Jun 22, 2020
@silverwind silverwind deleted the tabwidths branch June 22, 2020 16:48
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* Make tabs smaller

Fomantic's tabs are excessively wide and with another tab added on the
repo tabbar (go-gitea#8346) it would break
the layout on the english language.

Globally reduce tab bar padding to around half of the previous values.

* disable no-duplicate-selectors linter rule

* more tab bar tweaks

* more tweaks

* merge rules and nesting

* remove arc-green weird hover color

* few more arc-green tweaks

* restore to 12px

* tweaks

* use half width height padding

* final tweak

* 10px

* remove min-height

* 11px

* remve new-menu background on light theme too

* background fixes for new-menu

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants