-
Notifications
You must be signed in to change notification settings - Fork 974
Conversation
Setting as WIP since it doesn't fit well when user has 20 tabs open. |
While reviewing #6031, I had some feedback for this PR Next time we look at this (perhaps after 0.13.0 is closed out), we can consider making the tab size responsive like we had talked about 😄 For example, there could be 4 "breakpoints" for a tab:
cc: @bradleyrichter Some other interesting food for thought 😄 |
@bsclifton agree. My suggestion is more like to use throttle for window resize and grab each tab's size using |
@cezaraugusto you'll need to work out the conflicts (#6031 was just merged), but you should be good to finish the rest of your work now 😄 Here's the image that @bradleyrichter shared in the other issue (and over Slack): |
PR updated, ready for review |
Rebased but tagged as WIP for further improvements. |
@cezaraugusto what's left on this one? have you gotten the feedback you need? cc: @bradleyrichter, @jkup |
@bsclifton I would like some UI feedback from @bradleyrichter and @jkup first. I rebased this PR and cherry-picked on auto-suggest-sites branch, so it's good to test both here or there. From my part, WIP as I'll need to tweak it again to keep it working with ImmutableComponent. |
Taking a look now! |
I'll paste some snaps of little issues I am finding. But overall, it's awesome! Really great work here @cezaraugusto ! |
Great job, @cezaraugusto 😄 Lots of small details, but you're getting really close on this one. I think these changes will have a huge positive impact on our users 😄 |
thanks @bradleyrichter @bsclifton. It would need another set of eyes after ready since I'm migrating all tab component to Aphrodite, but I took note of those issues and will be fixed on the next request. |
How about hiding the close button at all under the certain minimum width of the tab? |
@luixxiul I like that. I think for the smallest possible tab width we should replicate pinned tabs. If needed we could resize favicon (i.e. from 16px to 14px) just to make sure it fits their container. |
Having closeTab icon on hover would make it difficult to select the tab if we have a lot of them open. Mimicking pinned seems a good solution for that as well. @bradleyrichter WDYT? |
We do have a problem to solve which is how to display the entire tab set of tabs when the user minimizes the window. Setting min-width will cause overflow but we should deal with it anyway. |
Upon reviewing the latest version, it is nearly perfect! Hhere are some remaining UI related issues that would be good to solve:
proposed fix: tell string to truncate further on mouse hover.
Not sure if this only happens below a certain width. I think so...but it only happened with a fresh set of tabs.
proposed solution: place a 16x background square behind the favicon when the tab text is white. The color can be 50% of the current tab color. This would only be applied with tab theme colors enabled. |
Closed in favour of #6900 |
git rebase -i
to squash commits (if needed).Auditors: @bsclifton, @bbondy, @bradleyrichter, @jkup
Fix #5431
Fix #6511
This PR follows this @bradleyrichter spec for tabs:
Test Plan:
npm run test -- --grep="tab tests"
Manual Tests