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

WP components audit: non-UI components #16709

Closed
davewhitley opened this issue Jul 22, 2019 · 3 comments
Closed

WP components audit: non-UI components #16709

davewhitley opened this issue Jul 22, 2019 · 3 comments
Labels
[Feature] UI Components Impacts or related to the UI component system Needs Accessibility Feedback Need input from accessibility [Package] Components /packages/components

Comments

@davewhitley
Copy link
Contributor

davewhitley commented Jul 22, 2019

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

Non-UI components

Audit

While reviewing the components, it was clear that some components were not UI components, and it made browsing them confusing and hard to understand, especially those with empty documentation.

During the audit, I categorized each component into one of 4 buckets:

  • Utility: non-visual component that didn't make sense to categorize with base UI components
  • Specific UI: did not seem general enough for a base UI set. The components were too specific to a certain part of the product.
  • Atomic UI: these are supportive UI components that are not useful in isolation (e.g. popover). These should not be listed with the other base UI components on the doc site.
  • HTML: these appear to be helper components for creating basic HTML elements.

Suggestions

Generally, I think there are some improvements to the way we publish npm packages or splitting components into separate folders.

  • Utility: I would put these in a “utility” folder or some other way of separating them. This assumes that these utilities are required for the base components to function and that it doesn’t make sense to make them a general-use utility available in a separate package (e.g. @wordpress/components-utilities).
  • Specific UI: Move the component into a separate npm package (e.g. @wordpress/components-editor)
  • Atomic UI: These seem like lower level components that shouldn't be listed alongside other base UI components. Some design libraries have an "API" section. Some don't list it at all on their site.
  • HTML: These could be grouped in their own folder and in their own section on the website.
Component Category
Popover Atomic UI
BaseControl Atomic UI
Dropdown Atomic UI
BlockQuotation HTML
HorizontalRule HTML
Svg HTML
ColorIndicator Specific UI
ColorPalette Specific UI
ColorPicker Specific UI
FocalPointPicker Specific UI
FontSizePicker Specific UI
Placeholder Specific UI
Animate Utility
Disabled Utility
Draggable Utility
Focusablelframe Utility
NavigateRegions Utility
HigherOrder Utility
WithConstrainedTabbing Utility
WithFallbackStyles Utility
WithFilters Utility
WithFocusOutside Utility
WithFocusReturn Utility
WithNotices Utility
WithSpokenMessages Utility
IsolatedEventContainer Utility
KeyboardShortcuts Utility
NavigableContainer Utility
QueryControls Utility
ResizableBox Utility
ResponsiveWrapper Utility
Sandbox Utility
ScrollLock Utility
ServerSideRender Utility
Slotfill Utility

Feedback

The feedback I'm looking for is related to naming, structure, and composition. I'm not looking for visual feedback of the components. I'm also not examining each prop for each component; only the ones that I think are relevant for the audit. I know this issue is a lot to take in, and I appreciate any feedback you have.

@davewhitley davewhitley created this issue from a note in Component Audit (In Progress) Jul 22, 2019
@davewhitley davewhitley added [Package] Components /packages/components Needs Technical Feedback Needs testing from a developer perspective. [Feature] UI Components Impacts or related to the UI component system labels Jul 22, 2019
@davewhitley davewhitley moved this from In Progress to Needs feedback in Component Audit Jul 22, 2019
@davewhitley davewhitley added the Needs Accessibility Feedback Need input from accessibility label Jul 24, 2019
@noisysocks
Copy link
Member

Related: #17079

@noisysocks
Copy link
Member

cc. @nerrad who can possibly provide some technical feedback here.

@noisysocks noisysocks removed the Needs Technical Feedback Needs testing from a developer perspective. label Aug 22, 2019
@nerrad
Copy link
Contributor

nerrad commented Aug 22, 2019

There's definitely some overlap here with the issue I created (thanks for linking the issues @noisysocks). I'm not sure I'm the best person to provide technical feedback here but in general I do like the idea of generally grouping things a bit clearer. A first iteration might be to explore doing the grouping internally in the components package which could help lay potential groundwork for identifying what can be split out to different packages. Even being able to do imports from @wordpress/components/utility or something like that would be a gain imo.

cc @mtias what are your thoughts here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system Needs Accessibility Feedback Need input from accessibility [Package] Components /packages/components
Projects
No open projects
Component Audit
  
Needs feedback
Development

No branches or pull requests

4 participants