-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
fix(button): update icon size to the default size #29255
Conversation
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.
Also the PR title needs to be updated to follow the conventional commits structure. Example: fix(button): update icon size to the default size
Notice that the example:
- doesn't wrap the type with brackets
- doesn't have capital words
- uses present tense
- doesn't use the word fix in the description since it's already mentioned through the type
You can also find more details under the Ionic Framework PR Process guide.
::slotted(ion-icon[slot="start"]), | ||
::slotted(ion-icon[slot="end"]), | ||
::slotted(ion-icon[slot="icon-only"]) { | ||
font-size: px-to-rem(16); | ||
} |
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.
I noticed that there are two instances of this. What's the difference between this one and the grouping further in the file?
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.
You're right @thetaPC 🤦. Thank you!
Already fixed!
@joselrio one last thing on the PR title that needs to change, remove the period. The PR titles shouldn't have punctuation marks. Thank you! |
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.
We also need a test within core/src/components/button/test/icon/button.e2e.ts
to verify that there will be no visual regressions moving forward. I recommend updating the current one to include these modes, modes: ['ios', 'md', 'ionic-md']
, within the configs
function.
configs({ modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('button: icon'), () => {
test('should not have visual regressions', async ({ page }) => {
await page.goto(`/src/components/button/test/icon`, config);
await page.setIonViewport();
await expect(page).toHaveScreenshot(screenshot(`button-icon`));
});
});
});
@joselrio Understood on the test. Please update the PR description to mention that tests will be done through another PR. |
@thetaPC I think you did not understood the difference between em and rem units. Icons has already sizes you mentioned due to font-size applied at the context and the usage of em units for the icons font-size. Note that (example), If button font-size: 14px, and icon:
For the default (medium) size there is the need to be different since font-size is 14px (converted into rem(s)) and the icon should have 16px (on this particular case, also converted into rem(s)). Take a look at the images below please: Let me know if you have any doubt about it. |
Discussed offline: The icon sizes don't behave as expected when the font increases through the app. This is what it looks like when a user increases the font size, the left side is default and the left side is large. Notice how the large icon is smaller than default. This PR is on hold until the design team can determine next steps. |
Closing this PR due to my previous comment regarding having to wait for the design team. This will be re-visited at a later date. |
Disregard my previous comment, we want to leave this PR open and then make a new with design's decision. |
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.
LGTM, this is accomplishing its intended result. The cause for delay was a lack of understanding on how dynamic font manual testing should have happened.
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.
We discussed as a larger team and I included some information in our Slack as well.
These changes look good when tested with dynamic font scaling. The maximum scale for dynamic font scaling is 310%
.
Issue number: ROU-4815
What is the current behavior?
What is the new behavior?
NOTE: