Repository navigation
feat(note): add recipe and tokens #31729
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e0f6306
feat(note): add recipe and tokens
thetaPC f11a991
docs(note): call the removed classes theme classes
thetaPC e2cd08e
Revert "docs(note): call the removed classes theme classes"
thetaPC 842c283
Merge branch 'FW-6855-tests' into FW-6855
thetaPC ff4e849
Merge branch 'FW-6855-tests' into FW-6855
thetaPC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| /** | ||
| * @prop --ion-note-font-family: Font family of the note | ||
| * @prop --ion-note-font-size: Font size of the note | ||
| * @prop --ion-note-hue-bold-default-color: Text color of the `bold` hue | ||
| * @prop --ion-note-hue-bold-semantic-default-color: Text color of the `bold` hue when a semantic color is applied | ||
| * @prop --ion-note-hue-subtle-default-color: Text color of the `subtle` hue | ||
| * @prop --ion-note-hue-subtle-semantic-default-color: Text color of the `subtle` hue when a semantic color is applied | ||
| */ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import type { Hue } from '../../themes/themes.interfaces'; | ||
|
|
||
| export type IonNoteRecipe = { | ||
| font?: { | ||
| family?: string; | ||
| size?: string; | ||
| }; | ||
|
|
||
| hue?: { | ||
| [K in Hue]?: { | ||
| default?: { | ||
| color?: string; | ||
| }; | ||
|
|
||
| /** Any of the semantic colors like primary, secondary, etc. */ | ||
| semantic?: { | ||
| default?: { | ||
| color?: string; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| export type IonNoteConfig = { | ||
| hue?: Hue; | ||
| }; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,30 @@ | ||
| @import "./note.ios.vars"; | ||
| @use "./note.docs"; | ||
|
|
||
| // iOS Note | ||
| // Note | ||
| // -------------------------------------------------- | ||
|
|
||
| :host { | ||
| /** | ||
| * @prop --color: Color of the note | ||
| */ | ||
| color: var(--color); | ||
| box-sizing: border-box; | ||
|
|
||
| font-family: $font-family-base; | ||
| font-family: var(--ion-note-font-family, inherit); | ||
| font-size: var(--ion-note-font-size); | ||
| } | ||
|
|
||
| box-sizing: border-box; | ||
| // Note: Hue | ||
| // -------------------------------------------------- | ||
|
|
||
| :host(.note-hue-bold) { | ||
| color: var(--ion-note-hue-bold-default-color); | ||
| } | ||
|
|
||
| :host(.note-hue-subtle) { | ||
| color: var(--ion-note-hue-subtle-default-color); | ||
| } | ||
|
|
||
| :host(.note-hue-bold.ion-color) { | ||
| color: var(--ion-note-hue-bold-semantic-default-color); | ||
| } | ||
|
|
||
| :host(.ion-color) { | ||
| color: #{current-color(base)}; | ||
| :host(.note-hue-subtle.ion-color) { | ||
| color: var(--ion-note-hue-subtle-semantic-default-color); | ||
| } |
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
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
Binary file removed
BIN
-380 Bytes
...sic/note.e2e.ts-snapshots/note-color-ionic-md-ltr-light-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-654 Bytes
...ic/note.e2e.ts-snapshots/note-color-ionic-md-ltr-light-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-599 Bytes
...sic/note.e2e.ts-snapshots/note-color-ionic-md-ltr-light-Mobile-Safari-linux.png
Binary file not shown.
Binary file removed
BIN
-443 Bytes
...ote/test/basic/note.e2e.ts-snapshots/note-color-ios-ltr-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-840 Bytes
...te/test/basic/note.e2e.ts-snapshots/note-color-ios-ltr-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-532 Bytes
...ote/test/basic/note.e2e.ts-snapshots/note-color-ios-ltr-Mobile-Safari-linux.png
Binary file not shown.
Binary file removed
BIN
-340 Bytes
...note/test/basic/note.e2e.ts-snapshots/note-color-md-ltr-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-655 Bytes
...ote/test/basic/note.e2e.ts-snapshots/note-color-md-ltr-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-599 Bytes
...note/test/basic/note.e2e.ts-snapshots/note-color-md-ltr-Mobile-Safari-linux.png
Binary file not shown.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { expect } from '@playwright/test'; | ||
| import { configs, test } from '@utils/test/playwright'; | ||
|
|
||
| import { HUES } from '../../../../themes/themes.interfaces'; | ||
|
|
||
| /** | ||
| * This behavior does not vary across directions. | ||
| */ | ||
| configs({ directions: ['ltr'], modes: ['ionic-md', 'md', 'ios'] }).forEach(({ config, screenshot, title }) => { | ||
| test.describe(title('note: hue'), () => { | ||
| HUES.forEach((hue) => { | ||
| test(`should render ${hue} notes`, async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <style> | ||
| .container { | ||
| width: max-content; | ||
| } | ||
| </style> | ||
|
|
||
| <div class="container"> | ||
| <ion-note hue="${hue}">Default</ion-note> | ||
| <ion-note hue="${hue}" color="danger">Danger</ion-note> | ||
| </div> | ||
| `, | ||
| config | ||
| ); | ||
|
|
||
| const container = page.locator('.container'); | ||
|
|
||
| await expect(container).toHaveScreenshot(screenshot(`note-hue-${hue}`)); | ||
| }); | ||
| }); | ||
| }); | ||
| }); |
Binary file added
BIN
+1.64 KB
.../note.e2e.ts-snapshots/note-hue-bold-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.9 KB
...note.e2e.ts-snapshots/note-hue-bold-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.9 KB
.../note.e2e.ts-snapshots/note-hue-bold-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.94 KB
...te/test/hue/note.e2e.ts-snapshots/note-hue-bold-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.27 KB
...e/test/hue/note.e2e.ts-snapshots/note-hue-bold-ios-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.36 KB
...te/test/hue/note.e2e.ts-snapshots/note-hue-bold-ios-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.62 KB
...ote/test/hue/note.e2e.ts-snapshots/note-hue-bold-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.91 KB
...te/test/hue/note.e2e.ts-snapshots/note-hue-bold-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.89 KB
...ote/test/hue/note.e2e.ts-snapshots/note-hue-bold-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.64 KB
...ote.e2e.ts-snapshots/note-hue-subtle-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.9 KB
...te.e2e.ts-snapshots/note-hue-subtle-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.9 KB
...ote.e2e.ts-snapshots/note-hue-subtle-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.94 KB
.../test/hue/note.e2e.ts-snapshots/note-hue-subtle-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.27 KB
...test/hue/note.e2e.ts-snapshots/note-hue-subtle-ios-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.36 KB
.../test/hue/note.e2e.ts-snapshots/note-hue-subtle-ios-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.62 KB
...e/test/hue/note.e2e.ts-snapshots/note-hue-subtle-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.91 KB
.../test/hue/note.e2e.ts-snapshots/note-hue-subtle-md-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+1.89 KB
...e/test/hue/note.e2e.ts-snapshots/note-hue-subtle-md-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Moved to the hue tests