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

Uno Platform support #120

Open
MartinZikmund opened this issue May 30, 2020 · 15 comments
Open

Uno Platform support #120

MartinZikmund opened this issue May 30, 2020 · 15 comments
Labels
Status/2. Work in progress A branch has been created or a user has taken the work to implement this issue. Type/Platform

Comments

@MartinZikmund
Copy link

Is your feature request related to a problem? Please describe.

Support for Uno Platform.

Describe the solution you'd like

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Difficulty: How difficult would it be? (Trivial, Very Easy, Easy, Moderate, Hard, Very Hard, Tedious, Backbreaking)

Easy

Additional context
Add any other context or screenshots about the feature request here.

@Happypig375
Copy link
Collaborator

Happypig375 commented May 30, 2020

Nice. I also had this idea for quite a while now. Thank you!

@Happypig375 Happypig375 added Type/Platform Status/2. Work in progress A branch has been created or a user has taken the work to implement this issue. and removed Type/Enhancement labels May 30, 2020
@charlesroddie
Copy link
Collaborator

This already exists via SkiaSharp renderer.

@Happypig375
Copy link
Collaborator

This builds on top of the SkiaSharp renderer to integrate with Uno more nicely.

@charlesroddie charlesroddie added Status/½. Needs more information Information needs to be provided for this issue to continue. and removed Status/2. Work in progress A branch has been created or a user has taken the work to implement this issue. labels May 30, 2020
@Happypig375
Copy link
Collaborator

@charlesroddie A Uno front end would provide a MathView directly instead of having to call into drawing code, similar to CSharpMath.Avalonia and CSharpMath.Forms.

@charlesroddie
Copy link
Collaborator

charlesroddie commented May 30, 2020

This is a feature request and is not valid in its current form because the feature requested already exists (at least to our knowledge).

So we would need detail on what the current lack of support it, or assuming that there is already support, what improvement in support is needed.

@Happypig375 A Uno front end would provide a MathView directly instead of having to call into [CSharpMath.SkiaSharp] drawing code, similar to CSharpMath.Avalonia and CSharpMath.Forms.

@MartinZikmund is @Happypig375 's interpretation the thing you are requesting?

@Happypig375
Copy link
Collaborator

There is already common code defining MathView and TextView shared by CSharpMath.Avalonia and CSharpMath.Forms, and the draft PR uses it to define these views for Platform Uno.

@MartinZikmund
Copy link
Author

MartinZikmund commented May 30, 2020

Yes, the goal is to add the controls that make it easy to use CSharpMath in Uno/UWP XAML. Also in case of WebAssembly, a special version of SkiaSharp (Uno.SkiaSharp.Wasm) is required

@Happypig375
Copy link
Collaborator

If that is the case, depending on SkiaSharp might not be the best approach. It would result in unexpected surprises to contributors. Would defining a new MathPainter and TextPainter that draw on Windows.UI.Xaml.Controls.Canvas be better? You can take a look at the Avalonia and SkiaSharp MathPainter and TextPainters.

@MartinZikmund
Copy link
Author

MartinZikmund commented May 30, 2020

@Happypig375 the special SkiaSharp.Wasm dependency is only for the Uno project and only for WebAssembly target. It is also a normally available package on NuGet, so it shouldn't cause any issues. But I will try if classic Canvas solution would be feasible too 👍

@charlesroddie
Copy link
Collaborator

charlesroddie commented May 30, 2020

But I will try if classic Canvas solution

Please don't! That would be massive duplication. We have existing duplication of logic for iOS for historical reasons (iOS was the only renderer at one point), and for Avalonia because that was merged without proper assessment of costs and benefits.

@Happypig375
Copy link
Collaborator

That would be massive duplication. [...] Avalonia because that was merged without proper assessment of costs and benefits.

Not really. The Avalonia front end is pretty small just like CSharpMath.SkiaSharp. Tests are written so that both projects are tested together.

@charlesroddie
Copy link
Collaborator

Actually yes the implementation there does seem a lot smaller than I remembered.

@Happypig375
Copy link
Collaborator

Because I refactored more common code with CSharpMath.Forms into CSharpMath.Xaml.

@Happypig375 Happypig375 added Status/2. Work in progress A branch has been created or a user has taken the work to implement this issue. and removed Status/½. Needs more information Information needs to be provided for this issue to continue. labels May 30, 2020
@Happypig375
Copy link
Collaborator

@MartinZikmund As discussed in #125, a rename from CSharpMath.Uno to CSharpMath.UWPUno will better stress that pure UWP users should also use this package. Thoughts?

@MartinZikmund
Copy link
Author

MartinZikmund commented Jun 3, 2020

Sounds good, I will rename the projects accordingly 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status/2. Work in progress A branch has been created or a user has taken the work to implement this issue. Type/Platform
Projects
None yet
Development

No branches or pull requests

3 participants