-
Notifications
You must be signed in to change notification settings - Fork 2
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
[IOAPPX-419] Adjust the size of Icon
, Pictogram
and some components based on the value of fontScale
#348
Conversation
fontScale
Icon
, Pictogram
and some components based on the value of fontScale
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.
Here are some suggestions. Feel free to reach out if you have any questions!
@LeleDallas Addressed in the following commit → |
After running some tests, it appears that the app keeps crashing on Android 14. Screen.Recording.2024-12-04.at.11.56.16.movAndroid 14 vs Android 10 |
To resolve the issue, add the following code to your
Thank's @shadowsheep1 for the support! |
@LeleDallas We already have this setting in the |
Yep! I think the effort to put it here is minimal |
@LeleDallas Just added with this commit: |
The feature now works as expected without crashing 🎊🎊! My only concern is about restarting the session after updating the text size... Untitled.mov |
Good on iOS device too! ScreenRecording_12-06-2024.15-58-11_1.MP4 |
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.
As discussed during the meeting, we find this behavior acceptable 💫
…n the `fontScale` value (#356) > [!caution] > This PR depends on: > * #348 ## Short description This PR enables dynamic size on the `SearchInput` and `TextInputBase` components ## List of changes proposed in this pull request - Add `allowFontScaling` prop to the icons contained in the both components - Add `allowScaleSpacing` prop to `VSpacer` and `HSpacer` components ## How to test Go to the **Text Inputs** and **Search Input** screens in the example app
Caution
This PR depends on the following PR:
allowFontScaling
to theIOText
component #347Short description
This PR adds a dynamic size to some components, based on the value of
fontScale
. Dynamic size is currently supported on the following components:Tag
,Badge
,Alert
andFeatureInfo
ListItemCheckbox
,ListItemRadio
, etc…)ListItem…
componentsList of changes proposed in this pull request
useIOFontDynamicScale
hook to get the currentfontScale
valueallowFontScaling
toIcon
,AnimatedIcon
andPictogram
components to enable dynamic size based on thefontScale
valueallowScaleSpacing
toStack
components to enable the same behaviorTag
,Badge
, all the selection andListItem…
componentsmaxFontSizeMultiplier
from1.25
to1.5
ListItem…
andModule…
components if the text size multiplier is quite big (>= 1.5)Preview
ListItemCheckbox
As you can see, the size of the margins, icons and checkboxes also changes depending on the value of
fontScale
:Alert
Same as above, but with boldEnabled set to ON.
How to test