Windows icon indicating copy to clipboard operation
Windows copied to clipboard

Colorpicker Palette Tooltip shows "Not supported"

Open Marv51 opened this issue 11 months ago • 0 comments

Describe the bug

We use the colorpicker(button) in our app: Image

When users hover over the colors in the palette, the tooltip shows "Not supported".

For me this shows up in WinUI 3, but it seems to be working correctly in the Sample Gallery (UWP?).

I am using the 8.1 release of community toolkit and WinAppSDK 1.6.4.

Steps to reproduce

Add a ColorPickerButton to an empty WinAppSDK project (include the Community Toolkit of course). 

Then:
* click the ColorPickerButton
* navigate to the middle segment with the predefined color palette 
* hover over a color to see the tooltip.

Expected behavior

If this is unsupported, it would be much nicer to just not show any tooltip at all.

Screenshots

See above

Code Platform

  • [ ] UWP
  • [x] WinAppSDK / WinUI 3
  • [ ] Web Assembly (WASM)
  • [ ] Android
  • [ ] iOS
  • [ ] MacOS
  • [ ] Linux / GTK

Windows Build Number

  • [ ] Windows 10 1809 (Build 17763)
  • [ ] Windows 10 1903 (Build 18362)
  • [ ] Windows 10 1909 (Build 18363)
  • [ ] Windows 10 2004 (Build 19041)
  • [ ] Windows 10 20H2 (Build 19042)
  • [ ] Windows 10 21H1 (Build 19043)
  • [ ] Windows 10 21H2 (Build 19044)
  • [ ] Windows 10 22H2 (Build 19045)
  • [ ] Windows 11 21H2 (Build 22000)
  • [x] Other (specify)

Other Windows Build number

WIndows 11 24H2 (Build 26100)

App minimum and target SDK version

  • [x] Windows 10, version 1809 (Build 17763)
  • [ ] Windows 10, version 1903 (Build 18362)
  • [ ] Windows 10, version 1909 (Build 18363)
  • [ ] Windows 10, version 2004 (Build 19041)
  • [ ] Windows 10, version 2104 (Build 20348)
  • [ ] Windows 11, version 22H2 (Build 22000)
  • [x] Other (specify)

Other SDK version

Windows 11 version 22621

Visual Studio Version

2022

Visual Studio Build Number

17.12

Device form factor

Desktop

Additional context

Would you accept a PR that just special cases the string "Not supported" here: https://github.com/CommunityToolkit/Windows/blob/321f5ddc8f3bf07865c8f51d992febb25fd7859a/components/Converters/src/ColorToDisplayNameConverter.cs#L44

I would suggest

var colorName = Microsoft.UI.ColorHelper.ToDisplayName(color);
return colorName == "Not supported" ? "" : colorName;

I tried to look at how ColorHelper is implemented in WinAppSDK, but I seems that part is not open source.

As an alternative or additionally, it might be interesting to expose customizing the color name with the IColorPalette interface. Maybe something like this could be added to the interface string? GetColorName(int colorIndex, int shadeIndex) => null;. (A default implementation that returns null would make this backwards compatible)

Help us help you

Yes, I'd like to be assigned to work on this item.

Marv51 avatar Feb 11 '25 14:02 Marv51