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

ToolsPanel: move away from hardcoded classnames #35058

Closed
3 tasks
Tracked by #34345
ciampo opened this issue Sep 22, 2021 · 1 comment · Fixed by #35415
Closed
3 tasks
Tracked by #34345

ToolsPanel: move away from hardcoded classnames #35058

ciampo opened this issue Sep 22, 2021 · 1 comment · Fixed by #35415
Assignees
Labels
[Feature] Component System WordPress component system [Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Enhancement A suggestion for improvement.

Comments

@ciampo
Copy link
Contributor

ciampo commented Sep 22, 2021

What

Requires #34345 first, to make sure that tests don't rely on classnames.

We should refactor the ToolsPanel component so that it avoids using hardcoded classnames as much as possible.

Currently, the hardcoded classnames in TooolsPanel are:

Why

We should avoid using hardcoded classnames as much as possible in our components:

  • it goes against the Styling guidelines, where classnames are generated at runtime
  • hardcoded classnames can be effectively treated as public API, which can later need to involuntary breaking changes later on.

A/C

  • Remove the components-tools-panel classname
  • Remove the single-column classname
  • Remove the components-dropdown-menu and components-dropdown-menu__toggle classnames
@ciampo ciampo mentioned this issue Sep 22, 2021
62 tasks
@ciampo ciampo changed the title ToolsPanel: Refactor styles: move away from hardcoded classes, split styles into smaller, reusable variables ToolsPanel: move away from hardcoded classnames Sep 22, 2021
@ciampo ciampo added [Feature] Component System WordPress component system [Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Type] Bug An existing feature does not function as intended [Type] Enhancement A suggestion for improvement. labels Sep 22, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 7, 2021
@aaronrobertshaw
Copy link
Contributor

A PR removing all the hardcoded classnames except for single-column is up: #35415

Adopting the Grid component to handle the ToolsPanel layout, and thus remove the single-column class, should be possible but will involve a little more work. I'll take care of that in a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Component System WordPress component system [Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants