-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat(notice): add component tokens #11042
Merged
+93
−28
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6c9e39d
feat(notice): add component tokens
Elijbet 8c92ce1
Merge branch 'dev' into elijbet/7180-notice-design-tokens
Elijbet ab8dc73
var corrections
Elijbet 2e63733
WIP: themed test
Elijbet 9e5dbc1
Merge branch 'dev' into elijbet/7180-notice-design-tokens
Elijbet 499d69a
correct token names and deprecation note
Elijbet 6ff44a2
fix
Elijbet 1890095
remove deprecation note - out of scope
Elijbet c880295
custom-theme adjustments
Elijbet 56ab464
chore(themed): disable animations for consistent assertion results
jcfranco 6cfc959
Merge branch 'jcfranco/ensure-theming-tests-have-no-transitions' into…
Elijbet 943ca4e
rework tests so that states don't affect each other
Elijbet 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
There are no files selected for viewing
This file contains 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 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 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 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,15 @@ | ||
import { html } from "../../support/formatting"; | ||
|
||
export const notice = ({ kind, message, title }: { kind: string; message: string; title: string }): string => | ||
html`<calcite-notice kind=${kind} scale="s" open closable> | ||
<div slot="title">${title}</div> | ||
<div slot="message">${message}</div> | ||
${kind === "danger" ? html`<calcite-link slot="link" title="my action">Retry</calcite-link>` : null} | ||
</calcite-notice>`; | ||
export const noticeTokens = { | ||
calciteNoticeBackgroundColor: "", | ||
calciteNoticeCloseBackgroundColorFocus: "", | ||
calciteNoticeCloseBackgroundColorPress: "", | ||
calciteNoticeCloseTextColorHover: "", | ||
calciteNoticeCloseTextColor: "", | ||
calciteNoticeContentTextColor: "", | ||
}; | ||
|
||
export const notices = html`${notice({ | ||
kind: "danger", | ||
message: "There was an error while performing the task.", | ||
title: "Something failed", | ||
})} | ||
${notice({ | ||
kind: "success", | ||
message: "That thing you wanted to do worked as expected", | ||
title: "Something worked", | ||
})}`; | ||
export const notice = html`<calcite-notice kind="success" scale="s" open closable> | ||
<div slot="title">Something worked</div> | ||
<div slot="message">That thing you wanted to do worked as expected</div> | ||
</calcite-notice>`; |
This file contains 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
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.
I wonder if we can evaluate this for removal. Not sure why we'd need this, vs. the user being able to set this.
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.
Yeah WDYT @alisonailea?
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 agree we could set this for removal
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.
@DitwanP @geospatialem is there any specific process/term we need for deprecation and removal for this or just [Deprecated] note for now is enough?
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 think the [Deprecated] note is enough.
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.
@Elijbet We have a new
deprecate
conventional commit, so would recommend we use that approach for the deprecation so users are aware of the deprecation via our changelog.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 will create a follow-up PR for this.