Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chip] Chip's Icon not showing #557

Closed
1 of 6 tasks
eriklimakc opened this issue Apr 27, 2023 · 4 comments · Fixed by #560
Closed
1 of 6 tasks

[Chip] Chip's Icon not showing #557

eriklimakc opened this issue Apr 27, 2023 · 4 comments · Fixed by #560
Assignees
Labels
control/chip-chipgroup kind/bug Something isn't working

Comments

@eriklimakc
Copy link
Contributor

Current behavior

Chip's Icon not being displayed

image

Expected behavior

The icon to be displayed

How to reproduce it (as minimally and precisely as possible)

First I tried with the Figma Plugin, then with an Uno App and Playground (Here's the link to the snippet -> http://playground.platform.uno/#7c595c83)

Basically, add a ChipGroup and a Chip with Icon.

Uno.UI v4.8.15
Uno.Themes v2.5.3
Uno.Toolkit.UI v2.5.8
Uno.Extensions v2.3.2

Affected platform(s):

All

IDE:

  • Visual Studio 2022
  • Visual Studio 2019
  • Visual Studio Code
  • Visual Studio for Mac
  • Rider Windows
  • Rider macOS

Relevant plugins:

Anything else we need to know?

@eriklimakc eriklimakc added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. labels Apr 27, 2023
@kazo0
Copy link
Contributor

kazo0 commented Apr 27, 2023

instead of PathIcon can you try just using an Image element? I dont think the Icon property supports types of IconElement, it probably should though

although you could probably use IconTemplate and use a PathIcon inside of the DataTemplate

@Xiaoy312
Copy link
Contributor

oculd you produce a TreeGraph of the rendered output?

@Xiaoy312 Xiaoy312 self-assigned this Apr 27, 2023
@eriklimakc
Copy link
Contributor Author

@Xiaoy312 Not sure of how to produce a TreeGraph. Should I call it on my Page?

By looking at the Toolkit Sample of Chips, I realized that Chip Icon only renders if the Chip is NOT a child of a ChipGroup. For example:

<utu:Chip Content="Chip Icon Image" Style="{StaticResource InputChipStyle}">
  <utu:Chip.Icon>
        <Image Source="ms-appx:///MyApp/Assets/Avatar.png" />
  </utu:Chip.Icon>
</utu:Chip>
<utu:Chip Content="Chip Icon PathIcon" Style="{StaticResource InputChipStyle}">
  <utu:Chip.Icon>
	  <PathIcon Data="{StaticResource Icon_Delete}" />
  </utu:Chip.Icon>
</utu:Chip>

But if I add a parent ChipGroup to those Chips their icons won't render anymore, even if it's a <Image />

@Xiaoy312
Copy link
Contributor

yea, you will need to add a button to your MainPage (in BottomPanel area)
with the handler:

var tree = Uno.UI.Extensions.ViewExtensions.TreeGraph(renderOutput);
Console.WriteLine(tree);

@Xiaoy312 Xiaoy312 added control/chip-chipgroup and removed triage/untriaged Indicates an issue requires triaging or verification. labels Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
control/chip-chipgroup kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants