feat(chip): add dynamic type support - #27868
Merged
Merged
Conversation
|
|
mapsandapps
commented
Jul 26, 2023
mapsandapps
commented
Jul 26, 2023
| // -------------------------------------------------- | ||
|
|
||
| /// @prop - Font size of the chip | ||
| $chip-ios-font-size: clamp(13px, 0.875rem, 22px); |
Contributor
Author
There was a problem hiding this comment.
I wasn't sure where to get the min & max values from. I did some quick searching and couldn't find any iOS spec for chip font sizes.
mapsandapps
marked this pull request as ready for review
July 26, 2023 20:28
mapsandapps
requested review from
a team and
thetaPC
and removed request for
a team
July 26, 2023 20:30
liamdebeasi
self-requested a review
July 26, 2023 21:13
thetaPC
reviewed
Jul 27, 2023
liamdebeasi
reviewed
Jul 27, 2023
liamdebeasi
reviewed
Jul 28, 2023
mapsandapps
requested review from
averyrousseau and
sean-perkins
as code owners
August 2, 2023 21:53
Contributor
Author
|
oof, i accidentally pulled |
liamdebeasi
reviewed
Aug 4, 2023
| import { expect } from '@playwright/test'; | ||
| import { configs, test } from '@utils/test/playwright'; | ||
|
|
||
| configs({ directions: ['ltr'], modes: ['ios', 'md'] }).forEach(({ title, screenshot, config }) => { |
Contributor
There was a problem hiding this comment.
Suggested change
| configs({ directions: ['ltr'], modes: ['ios', 'md'] }).forEach(({ title, screenshot, config }) => { | |
| configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { |
Our test infra defaults to testing both md and ios
Contributor
|
I think the changed screenshots are left over from the first update screenshots job, but the diff threshold is so small that Playwright isn't picking it up. I reverted them in 5db6f1c to see if they are needed. However, if they are indeed needed I'll revert the commit |
sean-perkins
pushed a commit
that referenced
this pull request
Aug 18, 2023
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> The chip component does not support dynamic type. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> The chip component supports dynamic type, has a dynamic height, has min and max font sizes in `ios` mode, and has a screenshot test. ### md mode Small md mode: <img width="1368" alt="md-small" src="https://github.com/ionic-team/ionic-framework/assets/14926794/4466c1b6-6d01-4ec8-8de9-0eb71fa45223"> Medium md mode: <img width="1371" alt="md-medium" src="https://github.com/ionic-team/ionic-framework/assets/14926794/c51c324e-a3b7-486b-9f68-84b0e4146570"> Large md mode: <img width="1369" alt="md-large" src="https://github.com/ionic-team/ionic-framework/assets/14926794/166e1229-96b7-4270-9ef2-4c708776691e"> ### ios mode Small ios mode: <img width="1371" alt="ios-small" src="https://github.com/ionic-team/ionic-framework/assets/14926794/de240058-5fe5-4387-8481-d695950853db"> Medium ios mode: <img width="1371" alt="ios-medium" src="https://github.com/ionic-team/ionic-framework/assets/14926794/c63db4be-e813-4917-a525-02ec456849ea"> Large ios mode: <img width="1370" alt="ios-large" src="https://github.com/ionic-team/ionic-framework/assets/14926794/3479f619-82c8-4645-85f7-2725ea43de00"> ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> This also fixes an existing bug that the contents of a chip could get smooshed if the chip doesn't have enough horizontal space for its contents. ### Before <img width="253" alt="rStll" src="https://github.com/ionic-team/ionic-framework/assets/14926794/9a8f4c30-ceef-4fe1-a600-38b2f01c4e68"> ### After <img width="253" alt="Screenshot 2023-08-02 at 5 00 39 PM" src="https://github.com/ionic-team/ionic-framework/assets/14926794/e82e17c3-91e3-4089-a57b-16c7d7b386fb"> --------- Co-authored-by: ionitron <hi@ionicframework.com> Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: N/A
What is the current behavior?
The chip component does not support dynamic type.
What is the new behavior?
The chip component supports dynamic type, has a dynamic height, has min and max font sizes in
iosmode, and has a screenshot test.md mode
Small md mode:

Medium md mode:

Large md mode:

ios mode
Small ios mode:

Medium ios mode:

Large ios mode:

Does this introduce a breaking change?
Other information
This also fixes an existing bug that the contents of a chip could get smooshed if the chip doesn't have enough horizontal space for its contents.
Before
After