Skip to content

feat(range): support dynamic type - #28006

Merged
liamdebeasi merged 13 commits into
FW-4146from
FW-4438
Aug 25, 2023
Merged

feat(range): support dynamic type#28006
liamdebeasi merged 13 commits into
FW-4146from
FW-4438

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Aug 16, 2023

Copy link
Copy Markdown
Contributor

Issue number: N/A


What is the current behavior?

Range does not support dynamic type on iOS

What is the new behavior?

  • Range text now scales with Dynamic Type

A few notes:

Icon Sizes

The native iOS spec does not have icons scale with the range, so the icons in ion-range do not scale either.

Pin Sizing

The proportions of the pin on MD mode will change as text scales. Example

I intentionally did not have the tip of the pin scale since we are scaling according to the text size, and the tip of the pin does not have any text in it. I also thought that having the tip grow significantly would look strange since it would increase the overall size of the component without adding a lot of value.

Text Alignment within Pin

The screenshot diffs here appear to be correct. The text within the pin in main is aligned with neither the circle in the pin nor the pin itself. As a result of the changes here, the text is now aligned within the circle (which is the container that has the text).

Alignment with Circle

main branch
main-circle branch-circle

Alignment with Pin

main branch
main-pin branch-pin

Does this introduce a breaking change?

  • Yes
  • No

Other information

@bolt-new-by-stackblitz

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the package: core @ionic/core package label Aug 16, 2023
@liamdebeasi liamdebeasi changed the title Fw 4438 feat(range): support dynamic type Aug 16, 2023

:host(.range-has-pin) {
@include padding($range-md-padding-vertical + $range-md-pin-font-size + $range-md-pin-padding-vertical, null, null, null);
@include padding($range-md-pin-dimension, null, null, null);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The existing padding did not account for the new pin size which is why I changed it here

Comment thread core/src/components/range/range.md.scss
@liamdebeasi
liamdebeasi marked this pull request as ready for review August 18, 2023 13:23
@liamdebeasi
liamdebeasi requested review from a team and brandyscarney and removed request for a team August 18, 2023 13:23

@brandyscarney brandyscarney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great and the pin scales nicely!

@liamdebeasi
liamdebeasi merged commit b453ef5 into FW-4146 Aug 25, 2023
@liamdebeasi
liamdebeasi deleted the FW-4438 branch August 25, 2023 19:20
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