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

feat: Support PasswordBox on Skia #6768

Merged
merged 2 commits into from
Aug 17, 2021

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Aug 14, 2021

GitHub Issue (If applicable): closes #6396, closes #5767

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

No support for PasswordBox on Skia GTK

What is the new behavior?

Supported

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@Youssef1313 Youssef1313 requested a review from a team August 14, 2021 10:18
@gitpod-io
Copy link

gitpod-io bot commented Aug 14, 2021

@davidjohnoliver davidjohnoliver merged commit 316a172 into unoplatform:master Aug 17, 2021
@Youssef1313 Youssef1313 deleted the issues/6396 branch August 17, 2021 10:02
@davidjohnoliver
Copy link
Contributor

davidjohnoliver commented Aug 19, 2021

@Youssef1313 There was a regression reported on Discord, I'm guessing it's related to this PR.

I can repro with the following XAML in a new app using latest Uno.UI:

	<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="30">
		<Button Content="dummy" />
		<TextBox Text="should be a normal textbox"/>
	</StackPanel>

On Skia.Gtk the TextBox looks like a PasswordBox. If I focus it the text appears normally, but if I remove focus again by clicking the button then the text is obscured.

Could you take a look into it?

The report on Discord:

I find out that in version 3.10.0-dev.396 textbox working like passwordbox on SKIA. On dev.385 everything fine (it just doesn't work).

@@ -45,7 +45,7 @@ public TextBoxView(TextBox textBox)

internal void SetTextNative(string text)
{
DisplayBlock.Text = text;
DisplayBlock.Text = new string('•', text.Length);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem should probably be here. I'll take a look to confirm and fix. Sorry for introducing such a regression :(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, happens to everybody. :)

For my part, I somehow did not even notice this line when I reviewed the PR.

@Youssef1313
Copy link
Member Author

Youssef1313 commented Aug 19, 2021

I'm noticing other issues with TextBox on Gtk when running Samples App:

  • UI hangs a little bit while typing (especially with fast typing).
  • Can't click middle of existing text to being editing
  • Trying to select text doesn't work (both through mouse dragging and CTRL+A)

I reverted my commits locally to make sure these issues are unrelated to my changes and indeed they're unrelated.

I also found that my implementation doesn't only break TextBox, but breaks PasswordBox itself when RevealMode is set programmatically (not through the reveal button). But I wasn't able to completely fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Gallery][Skia.GTK] PasswordBox text is not hiding the text Add PasswordBox support on Skia
3 participants