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

Contain the tabs within the tabbar (do not use translation transform) #13671

Merged
merged 3 commits into from
Jan 3, 2023

Conversation

krassowski
Copy link
Member

References

This is a prerequisite for full adoption of contain: strict jupyterlab/lumino#504.

Briefly, the current tab was using transform: translateY() style exceeding its box which means that we could not contain painting for it (i.e. it would have no effect).

Code changes

  • Re-implement the bottom border using opt-in approach - elements which need bottom border get it in ::after pseudo-element rather than existing opt-out approach (element which should not have it is resized up and shifted down to cover the common border).
  • Remove unnecessary CSS rule (.lm-TabBar-tab.lm-mod-current:hover)

User-facing changes

Removes the jitter of the tab title when switching the active tab.

Old (see how "Launcher" title moves down upon activation):

old-tabbar

New (see no title movement upon activation):

new-tabbar

Backwards-incompatible changes

I think it can be safely backported, but would appreciate a second opinion.

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@github-actions github-actions bot added Design System CSS pkg:application tag:CSS For general CSS related issues and pecadilloes labels Dec 27, 2022
@krassowski krassowski changed the title Do not use translation transform to contain the tabs within the tabbar Do not use translation transform (contain the tabs within the tabbar) Dec 27, 2022
@krassowski krassowski changed the title Do not use translation transform (contain the tabs within the tabbar) Contain the tabs within the tabbar (do not use translation transform) Dec 27, 2022
@krassowski
Copy link
Member Author

please update snapshots

@github-actions
Copy link
Contributor

Galata snapshots updated.

@jtpio
Copy link
Member

jtpio commented Jan 2, 2023

Kicking CI (#13505).

@jtpio jtpio closed this Jan 2, 2023
@jtpio jtpio reopened this Jan 2, 2023
@jtpio
Copy link
Member

jtpio commented Jan 2, 2023

I think it can be safely backported, but would appreciate a second opinion.

Looks like it should indeed be fine at first glance. Adding to the 3.6 milestone for consideration.

@jtpio jtpio added this to the 3.6.0 milestone Jan 2, 2023
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @krassowski

@fcollonval fcollonval merged commit 6ed59fc into jupyterlab:master Jan 3, 2023
@fcollonval
Copy link
Member

@meeseeksdev please backport to 3.6.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jan 3, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 3.6.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 6ed59fc063442c9a919315e66b4ecd7735bc5326
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #13671: Contain the tabs within the tabbar (do not use translation transform)'
  1. Push to a named branch:
git push YOURFORK 3.6.x:auto-backport-of-pr-13671-on-3.6.x
  1. Create a PR against branch 3.6.x, I would have named this PR:

"Backport PR #13671 on branch 3.6.x (Contain the tabs within the tabbar (do not use translation transform))"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

fcollonval pushed a commit to fcollonval/jupyterlab that referenced this pull request Jan 3, 2023
fcollonval added a commit that referenced this pull request Jan 6, 2023
…r (do not use translation transform)) (#13702)

* Backport PR #13671: Contain the tabs within the tabbar (do not use translation transform)

* Update Playwright Snapshots

Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants