Windows icon indicating copy to clipboard operation
Windows copied to clipboard

fix: Uno Platform - Avoid square border around `RangeSelector` `Thumbs`

Open MartinZikmund opened this issue 1 year ago • 9 comments

Fixes #386

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

There is a square around Thumbs

What is the new behavior?

No square around thumbs, This workaround is for https://github.com/unoplatform/uno/issues/6457

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • [x] Based off latest main branch of toolkit
  • [ ] Tested code with current supported SDKs
  • [ ] New component
    • [ ] Documentation has been added
    • [ ] Sample in sample app has been added
    • [ ] Analyzers are passing for documentation and samples
    • [ ] Icon has been created (if new sample) following the Thumbnail Style Guide and templates
  • [ ] Tests for the changes have been added (if applicable)
  • [ ] Header has been added to all new source files
  • [x] Contains NO breaking changes

Other information

MartinZikmund avatar Apr 12 '24 14:04 MartinZikmund

Thanks @MartinZikmund, guess we don't expect the Uno issue to get resolved in the near-term? I saw you applied a similar fix to the ColorPicker control for Uno, don't think our revamped ColorPicker in the toolkit we added was effected by this, eh @Arlodotexe?

michael-hawker avatar Apr 15 '24 16:04 michael-hawker

@michael-hawker indeed, especially on WASM it is pretty tricky... ColorPicker was not affected as it does not use the linear gradient

MartinZikmund avatar Apr 18 '24 08:04 MartinZikmund

Thanks @MartinZikmund, looks like there's an error here:

2024-04-24T02:02:26.1277663Z        "C:\a\Windows\Windows\components\RangeSelector\src\CommunityToolkit.WinUI.Controls.RangeSelector.csproj" (default target) (34:39) ->
2024-04-24T02:02:26.1278246Z        "C:\a\Windows\Windows\components\RangeSelector\src\CommunityToolkit.WinUI.Controls.RangeSelector.csproj" (Build target) (34:45) ->
2024-04-24T02:02:26.1278408Z        (MarkupCompilePass1 target) -> 
2024-04-24T02:02:26.1279940Z          C:\a\Windows\Windows\components\RangeSelector\src\RangeSelector.xaml(33,34): XamlCompiler error WMC0001: Unknown type 'Setter' in XML namespace 'http://uno.ui/not_win' [C:\a\Windows\Windows\components\RangeSelector\src\CommunityToolkit.WinUI.Controls.RangeSelector.csproj::TargetFramework=uap10.0.17763]

Arlodotexe avatar Apr 25 '24 15:04 Arlodotexe

@Arlodotexe forgot the mc:Ignorable, please retry, should help

MartinZikmund avatar Apr 26 '24 14:04 MartinZikmund

@Arlodotexe and once more for styling, hopefully will work out this time 😅

Wanted to verify with the sample app, but getting:

1>D:\Work\CommunityToolkitWindows\tooling\ProjectHeads\AllComponents\Wasm\obj\Debug\net7.0\CommunityToolkit.Tooling.SampleGen\CommunityToolkit.Tooling.SampleGen.ToolkitSampleMetadataGenerator\ToolkitSampleRegistry.g.cs(38,781,38,796): error CS1744: Named argument 'showAsNumberBox' specifies a parameter for which a positional argument has already been given
1>D:\Work\CommunityToolkitWindows\tooling\ProjectHeads\AllComponents\Wasm\obj\Debug\net7.0\CommunityToolkit.Tooling.SampleGen\CommunityToolkit.Tooling.SampleGen.ToolkitSampleMetadataGenerator\ToolkitSampleRegistry.g.cs(42,569,42,572): error CS8323: Named argument 'min' is used out-of-position but is followed by an unnamed argument

MartinZikmund avatar Apr 28 '24 10:04 MartinZikmund

@Arlodotexe and once more for styling, hopefully will work out this time 😅

Wanted to verify with the sample app, but getting:

1>D:\Work\CommunityToolkitWindows\tooling\ProjectHeads\AllComponents\Wasm\obj\Debug\net7.0\CommunityToolkit.Tooling.SampleGen\CommunityToolkit.Tooling.SampleGen.ToolkitSampleMetadataGenerator\ToolkitSampleRegistry.g.cs(38,781,38,796): error CS1744: Named argument 'showAsNumberBox' specifies a parameter for which a positional argument has already been given
1>D:\Work\CommunityToolkitWindows\tooling\ProjectHeads\AllComponents\Wasm\obj\Debug\net7.0\CommunityToolkit.Tooling.SampleGen\CommunityToolkit.Tooling.SampleGen.ToolkitSampleMetadataGenerator\ToolkitSampleRegistry.g.cs(42,569,42,572): error CS8323: Named argument 'min' is used out-of-position but is followed by an unnamed argument

That's odd, it looks like our SampleGen tooling is generating invalid metadata for a [ToolkitSampleNumericOption(...)] somewhere, likely for the RangeSelector. It may be a transient error, if CI doesn't pass I can give a hand.

Arlodotexe avatar Apr 29 '24 14:04 Arlodotexe

@Arlodotexe the error now seems unrelated, or not?

MartinZikmund avatar May 01 '24 06:05 MartinZikmund

@Arlodotexe the error now seems unrelated, or not?

Fixed this CI error recently in https://github.com/CommunityToolkit/Windows/pull/411, should be good now.

Arlodotexe avatar May 02 '24 16:05 Arlodotexe

@Arlodotexe seems it helped 👍👍

MartinZikmund avatar May 03 '24 12:05 MartinZikmund

@Arlodotexe seems it helped 👍👍

Great! Tested on WebAssembly, looks like this did the trick. Thanks @MartinZikmund!

image

Arlodotexe avatar May 18 '24 00:05 Arlodotexe