[GH-473] Port Font to Editor by pictos · Pull Request #503 · dotnet/maui (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation10 Commits10 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

pictos

Description of Change

Implements #473

Additions made

PR Checklist

mattleibow

Choose a reason for hiding this comment

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

Looks almost perfect but maybe also add the tests from Entry that also check the font size and attributes? Namely the FontSizeInitializesCorrectly and FontAttributesInitializeCorrectly tests.

Otherwise this is nice and clean and seems to have all the things.

Thanks!

@mattleibow

Also, could you add the entry to the sample MainPage. I know this is now almost impossible to test at this point, but once we got some navigation going this will all be much better.

@pictos

@mattleibow

I mean copy the 2 tests from entry to editor

@pictos

@mattleibow I see, but when you talk about the MainPage.cs sample, is to add the Editor instead of the entry, right? (Yeah it's a dumb question from me, but just to make sure)

@mattleibow

Ah yeah. Editor. 🤦🏻‍♀️ So menu words looking the same.

jsuarezruiz

public static void MapFont(EditorHandler handler, IEditor editor)
{
var services = App.Current?.Services ??
throw new InvalidOperationException($"Unable to find service provider, the App.Current.Services was null.");

Choose a reason for hiding this comment

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

Not related with this PR, but we have this message repeated in several places. Maybe we can create some specific exceptions like FontInitializationException or group all the messages etc.

@jsuarezruiz

Thanks @pictos. Looks nice, just some small changes and I think is ready.

jsuarezruiz

mattleibow

@rmarinho

@rmarinho

@ghost ghost added the legacy-area-controls

Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor

label

Jul 11, 2023