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.
Instead of calling these directly can you propagate through the handler?
handler.UpdateValue(nameof(IEntry.MaxLength))
6895f57 to
225ebcb
Compare
jfversluis
left a comment
There was a problem hiding this comment.
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.
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.
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.
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); |
|
/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