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

Don't worry about the size of the text #21628

Merged
merged 5 commits into from Apr 5, 2024
Merged

Conversation

PureWeen
Copy link
Member

@PureWeen PureWeen commented Apr 3, 2024

Description of Change

After internal conversations and for the purposes of staying consistent with SR3 we're going to take the route of always letting the image take priority over the text for placement. There's not really a best way to determine the ratio to scale the image to when you have really long text. So, when the user hits a scenarios where the image is just too big for a constrained button it's the users responsibility to resize the physical image themselves. This is ultimately better for performance as well.

@PureWeen PureWeen marked this pull request as ready for review April 4, 2024 14:28
@PureWeen PureWeen requested a review from a team as a code owner April 4, 2024 14:28
// Because this resolves from a task we should validate that the
// handler hasn't been disconnected
if (handler.IsConnected())
handler.UpdateValue(nameof(IImage.IsAnimationPlaying));
Copy link
Member Author

Choose a reason for hiding this comment

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

This was occasionally causing a crash in our device tests.

Also, I don't think we ever should have used ContinueWith here, I don't think ContinueWith will resolve on the synchronization context. I'm pretty sure the code inside ContinueWith will be on a task pool thread unless you pass TaskScheduler.FromCurrentSynchronizationContext()

@PureWeen PureWeen requested a review from mattleibow April 4, 2024 21:21
@PureWeen
Copy link
Member Author

PureWeen commented Apr 4, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattleibow
Copy link
Member

The code looks good. It all seems reasonable and flows logically. I have not yet tested the actual code on a device/emulator.

We probably need to throw in a UI test that updates the location of the image or shows/hides the image. I recall there were "update" issues as well. I think the current UI tests are just testing initial states.

@PureWeen PureWeen enabled auto-merge (squash) April 5, 2024 14:45
@PureWeen
Copy link
Member Author

PureWeen commented Apr 5, 2024

Failing tests unrelated

@PureWeen PureWeen disabled auto-merge April 5, 2024 15:25
@PureWeen PureWeen merged commit 2a71ba9 into main Apr 5, 2024
45 of 47 checks passed
@PureWeen PureWeen deleted the try_removing_text_measure branch April 5, 2024 15:25
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants