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

[Skia] TextBox #4319

Closed
jeromelaban opened this issue Oct 19, 2020 · 24 comments
Closed

[Skia] TextBox #4319

jeromelaban opened this issue Oct 19, 2020 · 24 comments
Assignees
Labels
area/skia ✏️ Categorizes an issue or PR as relevant to Skia difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding project/input ⌨️ Categorizes an issue or PR as relevant to input (Button, CheckBox, Toggle, Scroll, Map, Numeric,...)

Comments

@jeromelaban
Copy link
Member

Add TextBox support for Skia WPF/GTK

@jeromelaban jeromelaban added area/skia ✏️ Categorizes an issue or PR as relevant to Skia project/input ⌨️ Categorizes an issue or PR as relevant to input (Button, CheckBox, Toggle, Scroll, Map, Numeric,...) labels Oct 19, 2020
@jeromelaban jeromelaban added this to the 3.2 milestone Oct 19, 2020
@carldebilly carldebilly removed this from the 3.2 milestone Oct 30, 2020
@jeromelaban jeromelaban added this to the 3.4 milestone Nov 18, 2020
@jeromelaban jeromelaban modified the milestones: 3.4, 3.5 Dec 7, 2020
@microhobby
Copy link
Contributor

microhobby commented Jan 18, 2021

Just to mention that this is a very important component, a basic component. It would be great to have it implemented. Don't get me wrong, I'm not trying to rush the implementation. Just adding my opinion and a vote+ for this. Thanks for the great work 👍

@LeftTwixWand
Copy link
Contributor

Hi. How can I help you to implement TextBox in Skia?

@francoistanguay francoistanguay modified the milestones: 3.5, 3.6 Jan 25, 2021
@francoistanguay francoistanguay added this to the 3.7 milestone Feb 7, 2021
@jeromelaban jeromelaban added the difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. label Feb 15, 2021
@Mohsens22
Copy link

Mohsens22 commented Feb 15, 2021

Please implement this feature asap, without text input, almost all of Skia heads are useless.
Back in 3.4 days, this was marked to be done in 3.5, and now that 3.5 is out, It's marked for 3.7!

Why is it getting postponed?

@francoistanguay
Copy link
Contributor

francoistanguay commented Feb 15, 2021

This has been postponed because we had higher priorities to tackle for our paid customers and/or we invested where we have the most traction and the most users.

We agree that his is important and we're doing our best to contribute as much as possible to our Skia backend.

This is a free and open-source project. It there's something that you want and isn't there. If you want/need it, you have two options, you contribute a PR or you pay for Enterprise Support for us to prioritize.

Thank you

@jader1313
Copy link

Please, this is essential

@Mohsens22
Copy link

Hello Uno!
What's the status on this feature?

@francoistanguay
Copy link
Contributor

It's shipping in 3.7, within the next 24 hours!

@LeftTwixWand
Copy link
Contributor

Uno team, thank you guys so much!

@MartinZikmund
Copy link
Member

@jader1313 The first version is really initial support, so things like this are not working that perfectly yet. But definitely file issues for all of these and I will tackle them one by one. Keyboard navigation (tabbing) in particular is in active development right now, but having it working with this native text box will be crucial too.

@mterwoord
Copy link
Contributor

@MartinZikmund Isn't "really initial support" (almost) done? Textbox works for me in wpf, including being able to copy the contents to clipboard. Multiine works, but IsReadOnly doesn't.

@MartinZikmund
Copy link
Member

@mterwoord yes, many things should be working but things like IsReadOnly may not work properly yet. Please file an issue for what is not working yet, and I will try to fill the gaps🙂

@francoistanguay francoistanguay modified the milestones: 3.7, 3.8 Apr 30, 2021
@MartinZikmund MartinZikmund modified the milestones: 3.8, 3.9 Jun 7, 2021
@MartinZikmund MartinZikmund added difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding and removed difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Jun 7, 2021
@MartinZikmund MartinZikmund modified the milestones: 3.9, 3.8 Jun 7, 2021
@jeromelaban jeromelaban removed this from the 3.9 milestone Aug 11, 2021
@mmarinchenko
Copy link
Contributor

@jeromelaban, do you have plans to support .NET Framework targets for WPF head? I tried TextBox on net472 (supposed to be fully compatible with netstandard2.0) and found that key input doesn't work (it works on netcoreapp3.1, though).

.NET Core runtimes is still not a part of typical Windows installation, so this may be important.

P.S. Alignment for PlaceholderText property also doesn't work.

@LeftTwixWand
Copy link
Contributor

@mmarinchenko I think, that is no sense, to do it.
Due to this article: .NET Framework 4.5.2, 4.6, 4.6.1 will reach End of Support on April 26, 2022, most of .NET Framework versions will be dead less, than in one year. Release of .NET Framework 4.8 also was the latest release of .NET Framework.

And .NET roadmap shows, that the Microsoft planing to unify their platforms to single .NET platform:
image

I hope, that soon .NET could become a part of default Windows installation. So I think, that it's not relevant to spend time for the old .NET Framework support.
Also, you just can create an app with Self-Contained runtime and use trimming to optimize the size of an installer.

@mterwoord
Copy link
Contributor

I hope .NET (core) won't be part of default Windows installation. I can't find the source of it but I read somewhere by MS that's what was the main cause of the standstill of .NET framework. It being part of the OS means very strict rules for compatibility, whereas with .NET (core), they said there will be incompatible changes allowed between LTS and GA releases (ie, going from 6.0 to 7.0 could mean incompatible changes)

@mmarinchenko
Copy link
Contributor

mmarinchenko commented Aug 18, 2021

@LeftTwixWand, I'm not sure that I got it right... If I understand correctly the main reason why WPF is supported by UNO is Windows 7. So there are my points.

  1. Both Win32 and UWP applications for Windows 10+ can be developed using WinUI3/WinAppSDK. So WPF support is not required for current (officially supported) platforms in UNO.

  2. The end-of-support logic cannot be applied here because I'm talking about .NET Framework 4.7.2+ specifically. .NET Framework 4.7.2+ will be supported until the day when Microsoft ports all its products to modern .NET (ex. Visual Studio 2022 UI still runs on .NET Framework not .NET 6).

  3. In my case, I need to develop a relatively small utility for internal use. I have to target net472 because we have customers who are still using Windows 7 with extended support from Microsoft.

  4. All Windows 7 machines have .NET Framework 4.7.2+ installed since the latest versions of .NET Framework are provided by Microsoft Update service. Modern .NET must be downloaded and installed manually on all machines, which is not an easy task in large organizations.

  5. Yes, I may target modern .NET and package my project as self-contained application but then the size of the app will be much bigger and most importantly we'll have to manually rebuild and redistribute the application each time we need to integrate .NET security updates.

I have other options, such as developing this app in pure WPF (or even WinForms), because it's unlikely that it will be needed on other platforms than Windows. But who knows? I have some time before we start so I decided to ask @jeromelaban about UNO plans.

Anyway, thanks for your comment! I hope my intentions are clear now 😅

@LeftTwixWand
Copy link
Contributor

@mmarinchenko I'm perfectly understanding you about users on the Windows 7.
We also have about 9% of users on this OS. And it's sad(

@mmarinchenko
Copy link
Contributor

mmarinchenko commented Aug 18, 2021

@mterwoord I guess the original source is this blog post:

https://devblogs.microsoft.com/dotnet/update-on-net-core-3-0-and-net-framework-4-8/

.NET Blog
In May, we announced .NET Core 3.0, the next major version of .NET Core that adds support for building desktop applications using WinForms, WPF, and Entity Framework 6. We also announced some exciting updates to .NET Framework which enable you to use the new modern controls from UWP in existing WinForms and WPF applications.

@mterwoord
Copy link
Contributor

If size is of concern, I'd suggest having a look at single file deployment, and linking. Both should be possible with .net 5, and also I think Uno project is also working on getting this working..

@jeromelaban
Copy link
Member Author

@jeromelaban, do you have plans to support .NET Framework targets for WPF head? I tried TextBox on net472 (supposed to be fully compatible with netstandard2.0) and found that key input doesn't work (it works on netcoreapp3.1, though).

.NET Core runtimes is still not a part of typical Windows installation, so this may be important.

P.S. Alignment for PlaceholderText property also doesn't work.

We don't have plans to explicitly support net48 or earlier in the templates because net5 is supported in Win7, but WPF support nuget packages do have net47 available. You'll need to adjust the templates created by Uno to to so and use net47 or later to get your app running.

As for the size of the app with net5/net6, you can enable IL trimming, this will make the payload much smaller.

@mmarinchenko
Copy link
Contributor

@jeromelaban

You'll need to adjust the templates created by Uno to to so and use net47 or later to get your app running.

The app runs on TargetFramework >= net472. The problem is key input in TextBox doesn't work :)

We don't have plans to explicitly support net48 or earlier...

Ok I see. Thank you all, guys, for your attention!

@jeromelaban
Copy link
Member Author

jeromelaban commented Aug 23, 2021

The app runs on TargetFramework >= net472. The problem is key input in TextBox doesn't work :)

Can you open an issue on for particular issue with a repro app that shows it? There should not be any difference with the behavior from the netcore one.

@mmarinchenko
Copy link
Contributor

Yup. #6842

@MartinZikmund
Copy link
Member

Basic support for text input on Skia is now impelmented, let's create separate issues for bugs and missing features as they are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/skia ✏️ Categorizes an issue or PR as relevant to Skia difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding project/input ⌨️ Categorizes an issue or PR as relevant to input (Button, CheckBox, Toggle, Scroll, Map, Numeric,...)
Projects
None yet
Development

No branches or pull requests

10 participants