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

Update docs to clarify difference between using WinUI and system XAML components #241

Open
leon0399 opened this issue Dec 7, 2022 · 4 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@leon0399
Copy link

leon0399 commented Dec 7, 2022

Problem Description

on the left is a purely native component, and on the right is react component
image

  1. different arrow style
  2. different spacing and sizes (borders, paddings, etc.)

Steps To Reproduce

  1. Clone this repo: https://github.com/openhaptics/unihaptics-connect
  2. Check out this commit: https://github.com/openhaptics/unihaptics-connect/commit/0f0665cfa4a45cea6f09ae90ad08193039b7ca35 on branch different-navigatioin-components

Expected Results

Exact same compnents

Environment

info Fetching system and libraries information...
System:
    OS: Windows 10 10.0.22621
    CPU: (16) x64 AMD Ryzen 7 5800HS with Radeon Graphics
    Memory: 4.95 GB / 15.41 GB
  Binaries:
    Node: 16.18.1 - ~\AppData\Local\Temp\yarn--1670406327817-0.5154773305045288\node.CMD
    Yarn: 1.22.19 - ~\AppData\Local\Temp\yarn--1670406327817-0.5154773305045288\yarn.CMD
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK:
      AllowDevelopmentWithoutDevLicense: Enabled
      AllowAllTrustedApps: Enabled
      Versions: 10.0.18362.0, 10.0.19041.0
  IDEs:
    Android Studio: Not Found
    Visual Studio: 16.11.33027.164 (Visual Studio Community�2019)
  Languages:
    Java: 17.0.1 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.65.0 => 0.65.0
    react-native-windows: 0.65.2 => 0.65.2
  npmGlobalPackages:
    *react-native*: Not Found
@leon0399 leon0399 added the bug Something isn't working label Dec 7, 2022
@ghost ghost added the Needs: Triage 🔍 label Dec 7, 2022
@asklar
Copy link
Member

asklar commented Dec 7, 2022

@leon0399 Your react component is using the older NavigationView and friends (the type from Windows.UI.Xaml), whereas your native component is using it from Microsoft.UI.Xaml (WinUI 2). In order to use the type from MUX in RNX, you have to use WinUI.NavigationView and friends

@leon0399
Copy link
Author

leon0399 commented Dec 8, 2022

Thank you so much!

In order to use the type from MUX in RNX, you have to use WinUI.NavigationView and friends.

I think it is worth mentioning in the docs. Or it is just me just missed this?

@chrisglein chrisglein added documentation Improvements or additions to documentation enhancement New feature or request and removed bug Something isn't working labels Dec 12, 2022
@chrisglein
Copy link
Member

@asklar do we project both the WUX vs. MUX version of the NavigationView?
https://github.com/asklar/react-native-xaml/blob/main/USAGE.md#navigationview

If there are two different versions that seems like something we should clarify in the docs.

@asklar
Copy link
Member

asklar commented Dec 12, 2022

@chrisglein yeah we should clarify it in the docs. We project all xaml controls in WUX and any additional metadata, which by default includes MUXC. Feel free to reuse this issue to mean "update the docs".

@chrisglein chrisglein changed the title Visual difference between purely native and react components Update docs to clarify difference between using WinUI and system XAML components Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants