-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
WP components audit: TabPanel #16710
Comments
Props auditAs an addendum, here is a deeper evaluation of the props for these components. This is an effort to expand the components to be more useful and to answer the question, "Are properties well thought out and consistently applied?" This only covers visual props. Event handler props will be evaluated at a later date. OverflowTo be useful, we need to consider how the tabs overflow and if we should provide different options in different contexts:
✨ New
*not necessary, but would greatly enhance the usefulness of the component. ✂️ Remove
Event handler props will be evaluated at a later date. |
Further explanation on removing the vertical orientation: Vertical orientation is a common feature of tabs in component libraries and it's an ARIA widget, but I believe this could be an outdated way of displaying tabs. Some concerns:
This may be why some mature component libraries don't have this option, like Material and Polaris. |
Tab contents can't link to other tabs -- they have no way to control tab state. It could be fixed by passing an extra parameter to the children function, like this:
Don't know if this is the proper place to ask for new props or enhanced props (but it seemed like it). |
I'm closing out the Component Audit issues for now. |
Is your feature request related to a problem? Please describe.
This issue is part of a review on the naming, structure, and composition of the UI components as brought up in #16367
TabPanel
Audit
Opportunities I came across while reviewing this component.
vertical
option for this component could be confusing, since that could be considered a Menu. There would be confusion on when to use one over the other. More concerns on vertical tabs.Suggestions
After looking at a few libraries, I've come across a few different implementation strategies.
Option 1
Option 2
Option 3
Option 4 (example)
To me, options 3 and 4 makes the most sense structurally, but I could see how option 2 could be convenient. Maybe we could have a mix of both?
This component can be broken down into several components:
Feedback
The feedback I'm looking for is related to naming, structure, and composition. I'm not looking for visual feedback of the components. Prop audit can be seen in the comment below.
I'm most interested in how you think the TabPanel component should be named and which composition is best.
The text was updated successfully, but these errors were encountered: