Skip to content

[Tabs] optimization of tabs for static label elements#11703

Closed
toddtarsi wants to merge 11 commits intomui:masterfrom
toddtarsi:tab-optimizations
Closed

[Tabs] optimization of tabs for static label elements#11703
toddtarsi wants to merge 11 commits intomui:masterfrom
toddtarsi:tab-optimizations

Conversation

@toddtarsi
Copy link
Copy Markdown

@toddtarsi toddtarsi commented Jun 4, 2018

This is a wip implementation of #11673.

I'll be able to finish this out and put together a benchmark test with some tabs later this week, but for now I have to look at something else. Thanks again for the great repo!

Currently this does the following:

  • Adds a staticLabel prop to Tabs and Tab, and pass it through from one to the other.
  • If Tab sees staticLabel, it currently avoids calling checkTextWrap after mounting.

This is what I'm still working on:

  • If Tabs sees staticLabel, it will avoid the calls for tabsMeta after mounting, and only update tabMeta when value changes.

Thanks again for the great repo!

@toddtarsi
Copy link
Copy Markdown
Author

@oliviertassinari - Okay, I have the first pass of this done. I have a question for you:

If I'd like to bundle my fork and import and use it to a node dependency to test it, how would I do this? My plan is to fork this branch and test it on my codebase as a dependency. This would help me sanity test that this works as expected on mobile where resizing doesn't really occur.

@toddtarsi
Copy link
Copy Markdown
Author

Actually, I am testing this now and it needs a bit more fixing. Have created an onsite demo to test it. Will report when its 100%.

@toddtarsi
Copy link
Copy Markdown
Author

toddtarsi commented Jun 8, 2018

Alright, the scrollbar handles the value changes as expected now. Everything here works well by my testing using the new demo I created at the bottom of the Tabs page.

@toddtarsi toddtarsi changed the title [Tabs] wip optimization of tabs for static label elements [Tabs] optimization of tabs for static label elements Jun 12, 2018
@oliviertassinari oliviertassinari self-assigned this Jun 17, 2018
@oliviertassinari
Copy link
Copy Markdown
Member

@toddtarsi I'm moving the conversation back to #11673.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: tabs Changes related to the tabs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants