Skip to content

Symbol Icon Home not showed in WASM NavigationViewItem #2834

Closed

Description

@SERWare

Current behavior

Home Symbol Icon in NavigationItem is showed in UWP but not WASM. Other Symbol Icons (not Home) are showed in both platforms: UWP and Wasm.

Expected behavior

Home Symbol Icon showed in WASM Platform.

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

Show a NavigationView control as Content of Page with several NavigationItem and Home SymbolIcon in one Item.

<NavigationView>
    <NavigationView.MenuItems>
        <NavigationViewItem Icon="Home">
            <NavigationViewItem Icon="Accept"/>
        </NavigationViewItem>
    </NavigationView.MenuItems>
</NavigationView>

UWP local machine start will show Home and Accept SymbolIcons. WASM IIS Express start will show Accept SymbolIncon but blank instead of Home SymbolIcon.

Affected platform(s):

(iOS and Android not tested)

  • iOS
  • Android
  • [* ] WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • [ *] 2017 (15.9.17 )

Activity

  1. added
    kind/bug
    triage/untriaged
    on Mar 19, 2020
  2. changed the title [-]Symbol Icon Home not showed in WASM NavigationViewItem[/-] [+]Symbol Icon Home not showed in WASM NavigationItem[/+] on Mar 19, 2020
  3. changed the title [-]Symbol Icon Home not showed in WASM NavigationItem[/-] [+]Symbol Icon Home not showed in WASM NavigationViewItem[/+] on Mar 19, 2020
  4. jeromelaban commented on Mar 20, 2020

    @jeromelaban
    Member

    Thanks for the issue. This may be related to Fonts. Could you provide a screenshot of the sample you are using ?

    Here's the sample in the playground: https://playground.platform.uno/#5d7156cd

  5. SERWare commented on Mar 20, 2020

    @SERWare
    Author

    Thanks for the issue. This may be related to Fonts. Could you provide a screenshot of the sample you are using ?

    Here's the sample in the playground: https://playground.platform.uno/#5d7156cd

    I'm testing WASM on Chrome and Microsoft Edge (not yet Chromium version).

    NOTE. I'm using Spanish Versions.

    WASM Sample with blank instead of Home Icon

    UnoWASMHomeSymbolProblem

    UWP Sample showing Home Icon

    UnoUWPHomeSymbolProblem

  6. SERWare commented on Mar 21, 2020

    @SERWare
    Author

    Maybe not related but there's another WASM NavigationView problem: Header not shown.

    Header in Uno WASM PlayGround:

    UnoWASMPlayGroundHomeHeaderProblem

    No Header when IIS Express executed:

    UnoWASMHomeHeaderProblem

  7. jeromelaban commented on Mar 21, 2020

    @jeromelaban
    Member

    I see. The font used by Uno is not the same one as the one Microsoft uses in UWP (a license issue) and that icon may not be as the same character as original one.

    It looks like we'll need to make a mapping here:

    _textBlock.Text = newValue;

    when the open symbols font is used.

  8. added
    good first issue
    and removed
    triage/untriaged
    on Mar 21, 2020
  9. SERWare commented on Mar 21, 2020

    @SERWare
    Author

    I see. The font used by Uno is not the same one as the one Microsoft uses in UWP (a license issue) and that icon may not be as the same character as original one.

    It looks like we'll need to make a mapping here:

    _textBlock.Text = newValue;

    when the open symbols font is used.

    First, simple turnaround that works in WASM: programmatically create the icon with:

    new SymbolIcon(Symbol.Home)

    Do we need to make the mapping as users or will it be included in any Uno library?

    Thanks

  10. jeromelaban commented on Mar 21, 2020

    @jeromelaban
    Member

    This is an interesting finding. Adding Home explicitly should have the same effect as creating a SymbolIcon. This may hide another issue then.

  11. SERWare commented on Mar 21, 2020

    @SERWare
    Author

    This is an interesting finding. Adding Home explicitly should have the same effect as creating a SymbolIcon. This may hide another issue then.

    I don't know... this test is NavigationView generated in code and assigned to Page.Content after InitializeComponent. It shows the Home icon.

    UnoWASMHomeSymbolCodeCreated

  12. kakone commented on Apr 17, 2020

    @kakone
    Contributor

    Home was set as the default symbol in the SymbolIcon.Symbol dependency property but the inner FontIcon.Glyph property was not set.
    The PR fixes this issue, and set the Emoji as the default symbol (like in the SymbolIcon UWP class).

  13. jeromelaban commented on Apr 17, 2020

    @jeromelaban
    Member

    Let's close this issue in favor of #3011, as the is original issue for what's mentioned in this one.

  14. SERWare commented on Apr 17, 2020

    @SERWare
    Author

    Ok, thank you.

  15. kakone commented on Apr 17, 2020

    @kakone
    Contributor

    Let's close this issue in favor of #3011, as the is original issue for what's mentioned in this one.

    I'm not agree, it's not the same problem. As you said : "This may hide another issue then". And it is, there is a bug in the SymbolIcon class.

  16. jeromelaban commented on Apr 17, 2020

    @jeromelaban
    Member

    You're right, I'll reopen this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuekind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions