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] Default to width: auto. Add fillWidth prop. #5969

Closed
wants to merge 2 commits into from
Closed

[Tabs] Default to width: auto. Add fillWidth prop. #5969

wants to merge 2 commits into from

Conversation

jamesbrewerdev
Copy link

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

Per the Material Guidelines, it is allowed for tabs with be width: auto;. On desktop, this seems to be the default. On mobile, the default seems to be the current behavior of Material UI's tabs.

Per the discussion in #3807, it sounds like the general preference is to default to width: auto;. The downside is that this is backwards incompatible. Happy to discuss and make changes if necessary.

From the Material Guidelines:

Material Guidelines, Tabs, Desktop

Material Guidelines, Tabs, Mobile

This PR changes the default behavior of tabs to be width: auto;. It also adds a new prop, fillWidth, that will give the current behavior.

This PR is missing tests, so it shouldn't be merged yet. I'm not sure what the best way to test this is. Adding a couple tabs and checking their width makes sense, but I'm not exactly sure how to get the width of an element in a test. I welcome any thoughts on this.

Fixes #3807.

@oliviertassinari
Copy link
Member

I'm wondering, do we still need that PR with #5604?

@jamesbrewerdev
Copy link
Author

Ah. I guess not. Any thoughts on when callemall:next will be released?

@oliviertassinari
Copy link
Member

@BRWR Sorry, I should have closed that issue. The implemention looks cool. I don't think we should move forward. Let's use our ressources with the next branch.
When will it be released? I think that we could start doing some alpha publish on npm.
There is still quite some components to migrate. It could take a year or a month. It really depend on how much ressources is involved.
Thanks for your time!

@jamesbrewerdev
Copy link
Author

@oliviertassinari Where can I learn more about what's going on with the next branch? Specifically, what the goals are and what still needs doing. Happy to help speed that up if I can. This is a feature we need internally, so I'm keen on doing what I can to get it landed on master.

@oliviertassinari
Copy link
Member

A good starting point is with the ROADMAP section.

This is a feature we need internally

I'm glad you are willing to help. If you need that quickly, have you considered having a fork?

@jamesbrewerdev
Copy link
Author

It's an option, but in my experience it's better to avoid forking when possible. We will figure something out. 😄

In the mean time, I'll check out that link. Cheers!

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

[Tabs] Default 'width' to 'auto' instead of '100 / n%'
4 participants