Skip to content

[Tabs] Add variant "auto" #17499

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

Closed
wants to merge 1 commit into from
Closed

[Tabs] Add variant "auto" #17499

wants to merge 1 commit into from

Conversation

vadimka123
Copy link
Contributor

Added new variant "auto" to Tabs which make tabs scrollable if scroll active or fullWidth if scroll not active

@vadimka123 vadimka123 changed the title Tabs: add variant "auto" [Tabs] Add variant "auto" Sep 20, 2019
@mui-pr-bot
Copy link

Details of bundle changes.

Comparing: e91f970...9126f00

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core +0.01% 🔺 +0.04% 🔺 331,962 331,997 90,633 90,666
@material-ui/core/Paper 0.00% 0.00% 68,660 68,660 20,458 20,458
@material-ui/core/Paper.esm 0.00% 0.00% 62,098 62,098 19,203 19,203
@material-ui/core/Popper 0.00% 0.00% 28,397 28,397 10,159 10,159
@material-ui/core/Textarea 0.00% 0.00% 5,082 5,082 2,132 2,132
@material-ui/core/TrapFocus 0.00% 0.00% 3,766 3,766 1,596 1,596
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 16,348 16,348 5,818 5,818
@material-ui/core/useMediaQuery 0.00% 0.00% 2,488 2,488 1,050 1,050
@material-ui/lab 0.00% 0.00% 154,783 154,783 46,921 46,921
@material-ui/styles 0.00% 0.00% 51,420 51,420 15,288 15,288
@material-ui/system 0.00% 0.00% 15,581 15,581 4,351 4,351
Button 0.00% 0.00% 78,633 78,633 24,021 24,021
Modal 0.00% 0.00% 14,542 14,542 5,114 5,114
Portal 0.00% 0.00% 2,907 2,907 1,318 1,318
Rating 0.00% 0.00% 69,963 69,963 21,856 21,856
Slider 0.00% 0.00% 75,084 75,084 23,184 23,184
colorManipulator 0.00% 0.00% 3,835 3,835 1,519 1,519
docs.landing 0.00% 0.00% 54,267 54,267 14,345 14,345
docs.main 0.00% 0.00% 597,961 597,961 191,048 191,048
packages/material-ui/build/umd/material-ui.production.min.js +0.01% 🔺 +0.03% 🔺 302,849 302,893 87,078 87,104

Generated by 🚫 dangerJS against 9126f00

@oliviertassinari
Copy link
Member

@vadimka123 Do we have a related issue? What's the problem with scrollButtons="auto"?

@vadimka123
Copy link
Contributor Author

@oliviertassinari, I not have related issue
Main idea - sharing use of two variants: "fullWidth" and "scrollable"
I have tabs which can contain from one option to several tens (it's dymanic)
If there are a lot of them, they do not fit on screen and then need "scrollable" variant
If there are several, they are difficult to notice in the beginning and then need "fullWidth" variant
It's variant which dynamically switches beetween "scrollable" and "fullWidth" variant

I clearly explained? have any querstions ?

@oliviertassinari
Copy link
Member

@vadimka123 Thanks for the detail. I don't think that we should add this option. We will rework the API in #15324. The full width should is meant for mobile when a small number of items is displayed. You should be able to know, ahead of layout, if the conditions are met.

@zannager zannager added the component: tabs This is the name of the generic UI component, not the React module! label Feb 13, 2023
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.

4 participants