Repository navigation
feat(note): sync the md theme with Material Design 2 #31741
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
Changes from all commits
a59e389
0bdc314
29dce5a
a5e8ecb
16bf9e7
ff4d84e
d3abbfe
236c041
9b4d1d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,17 +141,14 @@ $item-md-label-slot-end-margin-start: $item-md-label-slot-end-margin-end; | |
| // Note Slots | ||
| // -------------------------------------------------- | ||
|
|
||
| /// @prop - Font size of a note in the start/end slot | ||
| $item-md-note-slot-font-size: dynamic-font(11px); | ||
|
|
||
| /// @prop - Padding top for a note in the start/end slot | ||
| $item-md-note-slot-padding-top: 18px; | ||
| $item-md-note-slot-padding-top: 16px; | ||
|
|
||
| /// @prop - Padding end for a note in the start/end slot | ||
| $item-md-note-slot-padding-end: 0; | ||
|
|
||
| /// @prop - Padding bottom for a note in the start/end slot | ||
| $item-md-note-slot-padding-bottom: 10px; | ||
| $item-md-note-slot-padding-bottom: 0; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Native MD2 for comparison: Compose Material's
That's why the note keeps 16px above it and drops the 10px below. It matches native, and a note no longer makes an item divider taller.
|
||
|
|
||
| /// @prop - Padding start for a note in the start/end slot | ||
| $item-md-note-slot-padding-start: $item-md-note-slot-padding-end; | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -55,10 +55,24 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | |||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||
| * Only MD ion-item-divider has ion-note specific logic | ||||||||||||||||||||||||||||||||||
| * Only MD and ionic ion-item-divider have ion-note specific logic | ||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||
| configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | ||||||||||||||||||||||||||||||||||
| configs({ modes: ['md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => { | ||||||||||||||||||||||||||||||||||
| test.describe(title('note: item-divider'), () => { | ||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Could we add a screenshot for a divider with a label and a note? The test page has three of those now, but the item-divider screenshots only cover a note on its own, so the md height change for that case (42px to 40px) is only checked by hand. This test fails against the base branch in md and ionic, so it does catch the change here. It'll need new
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in d3abbfe |
||||||||||||||||||||||||||||||||||
| test('should not have visual regressions when next to a label in an item-divider', async ({ page }) => { | ||||||||||||||||||||||||||||||||||
| await page.setContent( | ||||||||||||||||||||||||||||||||||
| ` | ||||||||||||||||||||||||||||||||||
| <ion-item-divider> | ||||||||||||||||||||||||||||||||||
| <ion-label>Label</ion-label> | ||||||||||||||||||||||||||||||||||
| <ion-note slot="end">99</ion-note> | ||||||||||||||||||||||||||||||||||
| </ion-item-divider> | ||||||||||||||||||||||||||||||||||
| `, | ||||||||||||||||||||||||||||||||||
| config | ||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||
| const itemDivider = page.locator('ion-item-divider'); | ||||||||||||||||||||||||||||||||||
| await expect(itemDivider).toHaveScreenshot(screenshot(`note-item-divider-label`)); | ||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| test('should not have visual regressions when in the start slot of an item-divider', async ({ page }) => { | ||||||||||||||||||||||||||||||||||
| await page.setContent( | ||||||||||||||||||||||||||||||||||
| ` | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is expected based on my findings on native. |
|
brandyscarney marked this conversation as resolved.
Resolved
|
|
brandyscarney marked this conversation as resolved.
Resolved
|
|
brandyscarney marked this conversation as resolved.
Resolved
|

Uh oh!
There was an error while loading. Please reload this page.