Skip to content

feat(label-value): refactor to use lit#1005

Open
jasonsubers-tyler wants to merge 1 commit into
tyler-technologies-oss:mainfrom
jasonsubers-tyler:label-value-lit-refactor
Open

feat(label-value): refactor to use lit#1005
jasonsubers-tyler wants to merge 1 commit into
tyler-technologies-oss:mainfrom
jasonsubers-tyler:label-value-lit-refactor

Conversation

@jasonsubers-tyler
Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added/updated: [Y]
  • Docs have been added/updated: [Y]
  • Does this PR introduce a breaking change? [N]
  • I have linked any related GitHub issues to be closed when this PR is merged? [N/A]

Describe the new behavior?

Refactored the "Label Value" component to use Lit

Additional information

Retained deprecated "dense" prop, if used will map to "inline" via willUpdate() call

* Retained deprecated "dense" prop, if used will set "inline" via willUpdate()
* Tests Passing
@jasonsubers-tyler jasonsubers-tyler added the skip-release Preserve the current version when merged label Oct 22, 2025
@jasonsubers-tyler jasonsubers-tyler requested a review from a team as a code owner October 22, 2025 23:07
@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@DRiFTy17 DRiFTy17 added storybook-preview minor Increment the minor version when merged labels Oct 23, 2025
Comment on lines +30 to +42
* @cssproperty --forge-label-value-align
* @cssproperty --forge-label-value-label-spacing
* @cssproperty --forge-label-value-label-block-start-spacing
* @cssproperty --forge-label-value-label-block-end-spacing
* @cssproperty --forge-label-value-label-color
* @cssproperty --forge-label-value-icon-spacing
* @cssproperty --forge-label-value-inline-label-spacing
* @cssproperty --forge-label-value-empty-color
* @cssproperty --forge-label-value-empty-style
*
* @cssproperty --forge-label-value-align - Aligns the label and value. Possible values: `start` (default), `center`, `end`.
* @cssproperty --forge-label-value-label-spacing - The spacing between the label and value.
* @cssproperty --forge-label-value-label-block-start-spacing - The block start spacing for the label.
* @cssproperty --forge-label-value-label-block-end-spacing - The block end spacing for the label.
* @cssproperty --forge-label-value-label-color - The color to apply to the label.
* @cssproperty --forge-label-value-icon-spacing - The spacing between the icon and the label.
* @cssproperty --forge-label-value-inline-label-spacing - The spacing between the label and value when displayed inline.
* @cssproperty --forge-label-value-empty-color - The color to apply to the value when empty.
* @cssproperty --forge-label-value-empty-style - The font-style to apply to the value when empty.
* @slot label
* @slot value
* @slot icon
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.

It looks like the descriptions for these were lost in the process

}

:host([hidden]) {
:host(:where([hide], :state(hidden))) {
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 selector can stay as it was, there is not :state(hidden) and the attribute got renamed incorrectly anyway. This is here to support the native hidden attribute on custom elements.

Comment on lines -99 to -106
function createFixture({ empty = false, ellipsis = false, inline = false } = {}): Promise<ILabelValueComponent> {
return fixture<ILabelValueComponent>(html`
<forge-label-value ?empty=${empty} ?ellipsis=${ellipsis} ?inline=${inline}>
<span slot="label">Label</span>
<span slot="value">Value</span>
</forge-label-value>
`);
}
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.

Why was this removed? It's important that test the component with the slots, some of the other tests above aren't actually rendering content.

Could you revert these changes, and instead only add new assertions for the CSS states?

Comment on lines +88 to +94
if (changedProperties.has('dense')) {
if (this.hasUpdated || this.hasAttribute('dense')) {
// Ignore the initialization cycle. On subsequent updates, map dense to inline
if (this.inline !== this.dense) {
this.inline = this.dense;
}
}
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.

I know it's unfortunate that we have to keep these properties in sync for now to avoid breaking changes, but I'm not sure how I feel about this block. I also noticed that the dense attribute does not get removed if setting inline to false. Not really a big deal since typically only one of these properties is in use at a time, but better to handle it gracefully. Maybe we can clean this up and make it more simple/readable?

@DRiFTy17 DRiFTy17 added this to the 3.15.0 milestone May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged skip-release Preserve the current version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants