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

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

Closed
wants to merge 11 commits into from

Conversation

toddtarsi
Copy link

@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
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
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
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
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
component: tabs This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants