[FEATURE] UI Customization: Add a semantic CSS className to Panel - #240
[FEATURE] UI Customization: Add a semantic CSS className to Panel#240Zacqary wants to merge 5 commits into
Conversation
| import { PanelContent } from './PanelContent'; | ||
| import { PanelHeader, PanelHeaderProps } from './PanelHeader'; | ||
|
|
||
| const SEMANTIC_CLASS_NAME = 'Panel'; |
There was a problem hiding this comment.
This names should probably come from a centralized file that holds other classes.
There was a problem hiding this comment.
Couldn't find any precedent for this, so I'm pushing a new constants/class-names.ts file.
There was a problem hiding this comment.
Just saw your reply on the issue linking to some work on the ui-customization branch. I'll check back there to see if there's a spot for this already, and align this PR with other coding conventions.
There was a problem hiding this comment.
Yes, sorry I missed to mention that important topic. We are using a feature branch as this requires substantial changes
Signed-off-by: Zac Xeper <zac@pydantic.dev>
Signed-off-by: Zac Xeper <zac@pydantic.dev>
Co-authored-by: Gabriel Bernal <gabrielbernalp@gmail.com> Signed-off-by: Zac Xeper <Zacqary@users.noreply.github.com>
Signed-off-by: Zac Xeper <zac@pydantic.dev>
Inline the ps-Panel literal with clsx to match the Button and Alert
primitives on ui-customization, which use clsx('ps-<Component>', className)
with no shared constant. Removes the dashboards class name constants file
and the redundant className prop declaration already provided by
CardProps<'section'>, and adds class name coverage to Panel tests.
Signed-off-by: Zac Xeper <zac@pydantic.dev>
f019ccf to
bcac6a1
Compare
|
@jgbernalp Just rebased this branch on Also I'm not sure why my rebase broke the DCO check, looks like some previous contributor's name had all the diacritics stripped and that's why it's complaining. |
Description
Part of perses/perses#3729 and perses/perses#3570
This adds a CSS class name of
.ps-Panelto the<Panel>, following conventions established in other UI customization PRs.Also adds
clsxas a dependency to thedashboardspackage. Leaving this PR in draft for now; clarifying on discussion thread whether this is the correct move or if we should be doing this work incomponents/src/next.Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.