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

ui: improve tabbar styling #10822

Merged
merged 1 commit into from
Mar 7, 2022
Merged

ui: improve tabbar styling #10822

merged 1 commit into from
Mar 7, 2022

Conversation

vince-fugnitto
Copy link
Member

What it does

The pull-request fixes some user-experience issues related to the tabbar styling.
Previously, when cycling through the tabs a shift would occur with the tab, file-icons, and close icons.

The pull-request addresses these problems by:

  • adding a "transparent" border for all incative tabs so when a tab is activated and an active border is shown they will not shift compared to inactive tabs.
  • removes extraneous code which caused file-icons and the close icon to shift.
tab-styling.mp4

How to test

  1. start the application
  2. open multiple editors
  3. confirm that switching between editors yields a consistent experience (no shifting of elements) compared to master
  4. confirm that tabs in the bottom area also behave well

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com

The commit fixes the tabbar styling so that no shift happens when
switching tabs (inactive/active).

The fix includes:
- adding a "transparent" border for inactive tabs.
- removing extraneous code that made file-icons and the close icon shift
  when clicked.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
@vince-fugnitto vince-fugnitto added the ui/ux issues related to user interface / user experience label Mar 1, 2022
@vince-fugnitto vince-fugnitto self-assigned this Mar 1, 2022
Comment on lines -264 to -270
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-current > .theia-tab-icon-label > .p-TabBar-tabIcon {
margin-top: -2px;
}

.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-current > .p-TabBar-tabCloseIcon {
margin-top: 0px;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

@msujew I'm not sure why the changes were necessary for the current tab but it caused the shifting of the file-icon and the close to occur:

master-tab

Copy link
Member

Choose a reason for hiding this comment

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

Interesting, that only seems to happen on Chrome. I tested this (and build the original PR) on Firefox, where these lines of CSS fixed the shifting issue. But it seems like they introduced shifting in Chrome

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@vince-fugnitto vince-fugnitto merged commit b8df294 into master Mar 7, 2022
@vince-fugnitto vince-fugnitto deleted the vf/tab-styling branch March 7, 2022 13:21
@github-actions github-actions bot added this to the 1.24.0 milestone Mar 7, 2022
@vince-fugnitto
Copy link
Member Author

I noticed a small regression with the preferences-ui which I'll address (unnecessary top border):

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui/ux issues related to user interface / user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants