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

FLUID-6754: add system-ui font option to UIO #1098

Merged
merged 11 commits into from
Jul 25, 2024

Conversation

jobara
Copy link
Member

@jobara jobara commented Nov 18, 2022

Adds the system-ui font to UIO

https://issues.fluidproject.org/browse/FLUID-6754

@jobara jobara requested review from amb26 and cindyli November 18, 2022 14:10
@jobara
Copy link
Member Author

jobara commented Nov 18, 2022

@cindyli, @amb26: I've left this as a draft because we need to get the option name translated. Before we do that, want to make sure you're happy with the changes and calling the option "System Font".

Copy link
Member

@cindyli cindyli left a comment

Choose a reason for hiding this comment

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

This PR looks good to me. "System font" is also the best name I can come up with. Let's see what @amb26 thinks. He's much better at naming.

@jobara
Copy link
Member Author

jobara commented Nov 21, 2022

We had a good discussion about naming today. The suggestion is to change "System Font" to "Device Font" as it is more understandable and descriptive about where that font is originating from. Another point raised is that "Default" is now ambiguous, we've landed on changing the name to "No Preference" to indicate that it isn't based on a font that is being applied by UIO. We should also change the "default" option in contrast to be called "No Preference".

@@ -2,6 +2,7 @@

$fonts: (
".fl-font-arial": "Arial",
".fl-font-system-ui": "system-ui",
Copy link
Member

Choose a reason for hiding this comment

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

To avoid confusing ourselves in future, should we rename all these uses of "system" to "device" also?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. The actual generic font-family is called system-ui. So the right hand side can't be changed. We could change the name of the class to device if that's preferred. I'm fine either way, I guess we need to decide if we want the class name to reflect the font family or the name exposed via the adjuster.

@jobara jobara marked this pull request as ready for review December 14, 2022 18:28
@jobara jobara requested review from amb26 and cindyli December 14, 2022 18:28
@jobara
Copy link
Member Author

jobara commented Dec 14, 2022

@amb26 and @cindyli we have the translations in place now. Ready for more review.

@@ -1,5 +1,5 @@
{
"contrast-default": "پیش فرض",
"contrast-default": "No Preference",
Copy link
Member

Choose a reason for hiding this comment

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

The translation should be in Farsi instead of English.

The same comment applies to translation of "No Preferences" in contrast_fr.json, contrast_pt_BR.json.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching this. I had forgotten that those files were updated as well. Interesting thing I had missed before is that the localization preferences already used "No Preference" instead of "Default".

@jobara jobara requested a review from cindyli December 15, 2022 14:41
@cindyli
Copy link
Member

cindyli commented Dec 15, 2022

Steps to produce an issue using the code in this pull request:

  1. Use a browser to open examples/framework/preferences/localizationPreference/urlPath/fa/. Note that the languauge is set to Farsi;
  2. Open another browser tab to open demos/prefsFramework/;
  3. Open UIO, locate "text style" panel, open its drop down, choices are

Screenshot 2022-12-15 at 10 50 40 AM

Note that "No preference" and "device font" are translated to Farsi but not other choices. Shall all choices be translated to Farsi?

This issue happens for all language translations.

@jobara
Copy link
Member Author

jobara commented Dec 16, 2022

Note that "No preference" and "device font" are translated to Farsi but not other choices. Shall all choices be translated to Farsi?

This issue happens for all language translations.

I believe in this case it is the correct behaviour. When we originally sent these off for translation they were sent the whole file, and those font names weren't translated. I believe it's because they are proper names so there isn't a translation, and/or they are more commonly known in their English name.

@jobara
Copy link
Member Author

jobara commented Dec 19, 2022

@amb26 did you have more thoughts on this PR? Should we talk more about the naming changes you were asking about before?

option element styling has limited to no browser support.
@jobara jobara requested a review from greatislander July 25, 2024 15:01
@jobara jobara merged commit f35856c into fluid-project:main Jul 25, 2024
20 of 21 checks passed
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.

4 participants