Skip to content

Conversation

@leekelleher
Copy link
Member

Description

Adds a hide-value-label option to the UUI Color Slider component.

Types of changes

  • New feature (non-breaking change which adds functionality)

Motivation and context

The reason for this is when used in the UUI Color Picker inline/popover component, the Hue slider has a numeric value beneath it, ranging from 0 to 360. This value holds little relevance to the UX or the specified colour value. By hiding the value label, the UI is also tightened up a little.

How to test?

Open the Color Picker component, notice that the numerical value below the Hue slider is not visible.

Copilot AI review requested due to automatic review settings July 14, 2025 14:40
@leekelleher leekelleher added the feature Something we are looking to build label Jul 14, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a hideValueLabel option to the UUI Color Slider so that the numeric label can be hidden when rendering the hue slider in the color picker.

  • Introduces a new boolean property/attribute to toggle the label’s visibility
  • Updates the component template to conditionally render the value label
  • Adds a corresponding Storybook story and applies the attribute in the color picker

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/uui-color-slider/lib/uui-color-slider.story.ts Adds a new HideValueLabel story with hideValueLabel: true
packages/uui-color-slider/lib/uui-color-slider.element.ts Defines hideValueLabel property and wraps the numeric label in a conditional render
packages/uui-color-picker/lib/uui-color-picker.element.ts Applies hide-value-label attribute on the hue slider in the color picker
Comments suppressed due to low confidence (3)

packages/uui-color-slider/lib/uui-color-slider.story.ts:235

  • [nitpick] Consider adding HideValueLabel.storyName = 'Hide value label'; and/or a short description so this story is clearly labeled in Storybook’s UI and docs.
export const HideValueLabel: Story = {

packages/uui-color-slider/lib/uui-color-slider.element.ts:302

  • Add unit or interaction tests to verify that hideValueLabel truly hides the numeric label in the DOM and doesn’t introduce layout regressions.
      ${this.hideValueLabel ? null : Math.round(this.value)}`;

packages/uui-color-picker/lib/uui-color-picker.element.ts:449

  • [nitpick] Align the indentation of hide-value-label with the other attributes for consistent formatting.
              hide-value-label

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1150.westeurope.azurestaticapps.net

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1150.westeurope.azurestaticapps.net

@bjarnef
Copy link
Contributor

bjarnef commented Jul 14, 2025

I think it would be nice if we had a simple tooltip component (besides popover) which could be re-used here, perhaps in slider/rangeslider and at TipTap configuration buttons perhaps?
#1082

@iOvergaard iOvergaard merged commit a6f3820 into main Aug 6, 2025
11 of 12 checks passed
@iOvergaard iOvergaard deleted the v1/feature/color-slider-hide-value-label branch August 6, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Something we are looking to build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants