-
Notifications
You must be signed in to change notification settings - Fork 257
feat(validation): lifecycle placement of dev warnings #6561
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
Open
miwha-adobe
wants to merge
9
commits into
ruben/feat-dev-warning-validation-components
from
miwha/feat-dev-warning-refactors
Open
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5b6600a
feat(validation): warn on invalid enum values instead of overriding
miwha-adobe 2603a2a
refactor(alert-banner): return `nothing` instead of empty templates i…
miwha-adobe 3dbd430
Merge branch 'ruben/feat-dev-warning-validation-components' of https:…
miwha-adobe 3c78374
refactor(dev-validation): move enum warnings to the pre-render phase
miwha-adobe 369a189
refactor(dev-validation): defer enum fallback removal to a POC branch
miwha-adobe 9069214
refactor(alert-banner): drop out-of-scope 1st-gen renderIcon change
miwha-adobe e34c64b
Merge branch 'ruben/feat-dev-warning-validation-components' of https:…
miwha-adobe 8b98b90
feat(dev-warning): revalidate aria-based warnings via AttributeObserv…
miwha-adobe c4cdbce
Merge branch 'ruben/feat-dev-warning-validation-components' of https:…
miwha-adobe 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 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
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 |
|---|---|---|
|
|
@@ -471,10 +471,7 @@ export abstract class TooltipBase | |
| if (this.disabled && this.open) { | ||
| this.open = false; | ||
| } | ||
| } | ||
|
|
||
| protected override updated(changedProperties: PropertyValues): void { | ||
| super.updated(changedProperties); | ||
| if (changedProperties.has('variant')) { | ||
| const constructor = this.constructor as typeof TooltipBase; | ||
| validateEnum(this, { | ||
|
Contributor
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. Not a bug: I see Tooltip and ProgressCircle fold the validateEnum check in |
||
|
|
@@ -493,6 +490,10 @@ export abstract class TooltipBase | |
| url: 'https://spectrum-web-components.adobe.com/?path=/docs/components-tooltip--docs', | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| protected override updated(changedProperties: PropertyValues): void { | ||
| super.updated(changedProperties); | ||
| if (changedProperties.has('offset')) { | ||
| this.style.setProperty( | ||
| '--_swc-tooltip-animation-distance', | ||
|
|
||
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
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 believe this is duplicating what is below (lines 241-248)
https://github.com/adobe/spectrum-web-components/pull/6561/changes#diff-2194b94b4d869a61170a29cb27f1ce8c70cad533d6e1f21ea90d8be4687cb2b9R241-R248