Skip to content

feat(label)!: port to <pf-v6-label> - #3161

Open
markcaron wants to merge 6 commits into
staging/pfv6from
feat/pfv6-label
Open

feat(label)!: port to <pf-v6-label>#3161
markcaron wants to merge 6 commits into
staging/pfv6from
feat/pfv6-label

Conversation

@markcaron

Copy link
Copy Markdown
Contributor

What I did

  1. Updated <pf-v6-label> element

@changeset-bot

changeset-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1151b6e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

✅ Commitlint tests passed!

More Info
{
  "valid": true,
  "errors": [],
  "warnings": [],
  "input": "feat(label)!: port to `<pf-v6-label>`"
}

@github-actions github-actions Bot added the AT passed Automated testing has passed label Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Deploy Preview for patternfly-elements ready!

Name Link
🔨 Latest commit 4b9c19f
😎 Deploy Preview https://deploy-preview-3161--patternfly-elements.netlify.app/

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions

Copy link
Copy Markdown
Contributor

SSR Test Run for 7e494ea: Report

@github-actions

This comment has been minimized.

@markcaron
markcaron marked this pull request as ready for review August 13, 2026 15:58
@zeroedin zeroedin changed the title feat: update pf-v6-label element feat(label)!: port to <pf-v6-label> Aug 18, 2026

@zeroedin zeroedin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs:

  • improved PR description
  • changeset
  • tests

Comment thread elements/pf-v6-label/README.md Outdated
Comment thread elements/pf-v6-label/README.md Outdated
Comment thread elements/pf-v6-label/README.md Outdated
| `isEditable` / `editableProps` | Complex inline editing pattern; deferred to a future release |
| `onEditComplete` / `onEditCancel` | Dependent on editable support |
| `render` | React-specific render prop for router integration; not applicable to web components |
| `tooltipPosition` | Tooltip integration for truncated labels; will integrate with `<pf-v6-tooltip>` in a future release |

@zeroedin zeroedin Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this is marked for future release. This PR might just be blocked on #3141

Once that PR merges we can do the integration here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zeroedin are you suggesting we wait for Tooltip to merge, before finishing this PR?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. my assumption is that we'd have to import tooltip inside of label to support this, wrapping the tooltip around the label when truncated is set. I haven't looked deeply into how patternfly itself does this internally.

Comment on lines +32 to +33
| `isEditable` / `editableProps` | Complex inline editing pattern; deferred to a future release |
| `onEditComplete` / `onEditCancel` | Dependent on editable support |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should investigate these further instead of defering.

| `render` | React-specific render prop for router integration; not applicable to web components |
| `tooltipPosition` | Tooltip integration for truncated labels; will integrate with `<pf-v6-tooltip>` in a future release |
| `closeBtn` / `closeBtnProps` | Custom close button node; the web component always renders a native `<button>` |
| `variant="add"` | Add button styling (used by LabelGroup); will be added with `<pf-v6-label-group>` |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this should be a built in function of label-group not label. while it does render like a label it is itself a button action of label group. It does not need to be listed in these tables.

Suggested change
| `variant="add"` | Add button styling (used by LabelGroup); will be added with `<pf-v6-label-group>` |

| `onEditComplete` / `onEditCancel` | Dependent on editable support |
| `render` | React-specific render prop for router integration; not applicable to web components |
| `tooltipPosition` | Tooltip integration for truncated labels; will integrate with `<pf-v6-tooltip>` in a future release |
| `closeBtn` / `closeBtnProps` | Custom close button node; the web component always renders a native `<button>` |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might need to be slottable if it is customizable instead of just statically always a button.

Suggested change
| `closeBtn` / `closeBtnProps` | Custom close button node; the web component always renders a native `<button>` |

But fix the code so <button id="close"> is wrapped in a <slot name="close-button></slot>

Comment on lines +163 to +171
<button id="close"
type="button"
aria-label="${this.closeButtonLabel ?? 'Close'}"
?disabled="${this.disabled}"
@click="${this.#onClose}">
<svg viewBox="0 0 384 512" aria-hidden="true">
<path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z"/>
</svg>
</button>`}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In PF React this is customizable, we likely will need to wrap the <button> with a slot. Then we'll have to ensure we can listen for the click event and still trigger the #onClose and properly disable the button when this.disabled is set.

markcaron and others added 3 commits August 18, 2026 12:11
Co-authored-by: Steven Spriggs <steven.spriggs@gmail.com>
Co-authored-by: Steven Spriggs <steven.spriggs@gmail.com>
Co-authored-by: Steven Spriggs <steven.spriggs@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

SSR Test Run for 2bed786: Report

@github-actions

Copy link
Copy Markdown
Contributor

SSR Test Run for 4b9c19f: Report

@github-actions

Copy link
Copy Markdown
Contributor

SSR Test Run for def563e: Report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AT passed Automated testing has passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants