feat(label-group): create pf-label-group element#2949
feat(label-group): create pf-label-group element#2949saraDahanCode wants to merge 32 commits intopatternfly:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 642b367 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…verflow, and basic label groups
|
@bennypowers When running the dev server, three TypeScript type errors occur in tools/pfe-tools/dev-server/config.ts: cors, cacheBusterMiddleware, liveReloadTsChangesMiddleware middlewares fail due to incompatible Koa types. The errors indicate Property 'back' is missing and type conflicts between different @types/koa versions. This prevents the dev server from starting and causes the tests to fail. Example snippet: 127 cors, // TS2322: Type '(ctx: Context, next: Next) => Promise' is not assignable to type 'Middleware' It seems related to multiple @types/koa versions being used in the project. |
|
@markcaron @bennypowers @zeroedin Hi, |
420bb96 to
bc5f6c9
Compare
elements/pf-label-group/demo/label-group-with-a-very-long-name.html
Outdated
Show resolved
Hide resolved
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
The idea of adding labels to the group should not be handled inside the PfLabelGroupClass. We should certainly document how to do this with demos, but those demos shouldn't be using built-in features of pf-label-group, rather, they should show an example fo how to build that yourself. pf-label-group should be responsible for
- displaying labels in a group
- displaying a label for the label group
- being closable
- having a horizontal or vertical orientation
Ideally, demos should be written to add a new editable label, but i understand that the editable feature is still in development, so the demos in this pr don't have to use editable.
There was a problem hiding this comment.
it looks like this comment still needs to be addressed. There shouldn't be anything like "add-label-mode" - adding new labels is something outside code has to do (e.g. in the demo's <script> tag)
feat(label-group): change demo
Partially addresses #2935
What I did
<pf-label-group>element.<pf-label>elements with support for removable and overflow states.overflowbehavior that collapses extra labels into a "+N more" indicator.LabelGroupCloseEventwhen the whole group is closed./demo/pf-label-group/showing various configurations (horizontal, vertical, removable, overflow, and closable examples)..changesetfile with typeminorto trigger a release.Testing Instructions
npm startand openhttp://localhost:8000/elements/pf-label-group/demo/.LabelCloseEventis fired.npm run lintandnpm testto ensure all checks pass successfully.Notes to Reviewers
.changesetfile is set to minor, since this PR introduces a new element.