Skip to content

feat(item-divider): support dynamic type - #27947

Merged
brandyscarney merged 3 commits into
FW-4146from
FW-4430
Aug 9, 2023
Merged

feat(item-divider): support dynamic type#27947
brandyscarney merged 3 commits into
FW-4146from
FW-4430

Conversation

@brandyscarney

@brandyscarney brandyscarney commented Aug 7, 2023

Copy link
Copy Markdown
Member

Issue number: N/A


What is the current behavior?

Item dividers do not support dynamic type.

What is the new behavior?

  • Adds support for dynamic type by converting font-size to use rem units
  • Adds test for scaling the font which checks an item divider at 310%

Does this introduce a breaking change?

  • Yes
  • No

Other information

Native

I used the Contacts app for comparison

80% 100% 135% 310%
ios-80 ios-100 ios-135 ios-310

Ionic Framework

80% 100% 135% 310%
ios-80 ios-100 ios-135 ios-310
md-80 md-100 md-135 md-310

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@brandyscarney
brandyscarney changed the base branch from main to FW-4146 August 7, 2023 21:07
@github-actions github-actions Bot added the package: core @ionic/core package label Aug 7, 2023

/// @prop - Font size of the item
$item-divider-ios-font-size: 17px !default;
$item-divider-ios-font-size: 1.0625rem !default;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The default value this is set at (17px) is actually wrong when compared against native. It should be 15px (or 0.9375rem) at 100%. Something to keep in mind if you are comparing this against native.

Updating the default value is outside the scope of this feature & we have an open ticket to investigate changes for iOS 17 so we could update the font size as part of that.

@brandyscarney
brandyscarney marked this pull request as ready for review August 7, 2023 23:29
@brandyscarney
brandyscarney requested review from a team and averyrousseau and removed request for a team August 7, 2023 23:29
@brandyscarney
brandyscarney merged commit 251a40a into FW-4146 Aug 9, 2023
@brandyscarney
brandyscarney deleted the FW-4430 branch August 9, 2023 13:47
sean-perkins pushed a commit that referenced this pull request Aug 18, 2023
Adds support for dynamic type by converting `font-size` to use `rem` units.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants