-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fixed entry text color [iOS] #20100
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
Fixed entry text color [iOS] #20100
Conversation
Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
You're on fire @kubaflo thank you! |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Thanks for the contribution. I can help adding UI tests here. |
I'm still learning the MAUI codebase, but I try to be helpful! 😅 |
Added UITest. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@jsuarezruiz @jfversluis Any update on this ? |
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
@PureWeen or @jsuarezruiz any plan to move this one forward soon? |
Any update on when this will be merged? |
|
||
private static void MapFormatting(IEntryHandler handler, IEntry entry) | ||
{ | ||
handler.PlatformView?.UpdateMaxLength(entry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of calling these directly can you propagate through the handler?
handler.UpdateValue(nameof(IEntry.MaxLength))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx!
6895f57
to
225ebcb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also see a very lengthy discussion about this on the live stream here: https://www.youtube.com/watch?v=ERh9Ixz8f_Y
😄
{ | ||
base.OnAppearing(); | ||
|
||
await Task.Delay(1500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we trigger the text change just with a button click instead of a delay? That might speed up things and is less arbitrary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did as you suggested and it does the job!
// Any text update requires that we update any attributed string formatting | ||
handler.UpdateValue(nameof(IEntry.MaxLength)); | ||
handler.UpdateValue(nameof(IEntry.CharacterSpacing)); | ||
handler.UpdateValue(nameof(IEntry.HorizontalTextAlignment)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really new to the MAUI code (I really appreciate all your great work!), but I'm curious why we wouldn't have an handler.UpdateValue(nameof(IEntry.TextColor));
here? I'm curious how these length, spacing and alignment attributes fix the text color (from what I gather, it looks like perhaps we are almost "tricking" iOS into updating the field?). Thank you! 😃
@jfversluis Oh no I missed that stream :/ I rewatched it though, and must admit it was a really good one that hurts me even more that I wasn't there live haha |
|
||
// 2. Verify that the Entry bounded TextColor is correct (Green). | ||
var color = App.FindElement("").GetText(); | ||
Assert.AreEqual("[Color: Red=0, Green=0.5019608, Blue=0, Alpha=1]", color); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Can u add the screen shots for all four platforms? |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
a195a09
to
82ad24c
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Any updates on when this will be implemented? |
How do we utilize this fix using the Nuget Package? Or will there be a release soon |
You can try https://github.com/dotnet/maui/wiki/Nightly-Builds. I check when a nightly build was done and compare it to the moment when a PR was merged. There was some issue when not every night, there was actually a new build but it should be fixed now. Probably still worth checking the date to be on the safe side. |
Description of Change
Added MapFormatting() for MapText in Entry.iOS like it is done in EntryHandler.iOS
Issues Fixed
Fixes #19509
Fixes #19470
Fixes #19424
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-01-27.at.13.44.26.mp4