fix(ui): improve test experience in dev-mode
This commit is contained in:
parent
7c2b4692d3
commit
1626dbd460
12 changed files with 74 additions and 0 deletions
5
.changeset/happy-ducks-wink.md
Normal file
5
.changeset/happy-ducks-wink.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@lion/ui': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
improve test experience in dev-mode by limiting verbose warnings
|
||||||
|
|
@ -369,6 +369,12 @@ export class LionCalendar extends LocalizeMixin(LitElement) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* // TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,13 @@ const DisabledWithTabIndexMixinImplementation = superclass =>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* // TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
// @ts-expect-error
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number} value
|
* @param {number} value
|
||||||
* @private
|
* @private
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,12 @@ const FormControlMixinImplementation = superclass =>
|
||||||
return /** @type {LionValidationFeedback} */ (this.__getDirectSlotChild('feedback'));
|
return /** @type {LionValidationFeedback} */ (this.__getDirectSlotChild('feedback'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,13 @@ const SyncUpdatableMixinImplementation = superclass =>
|
||||||
this.__SyncUpdatableNamespace.connected = false;
|
this.__SyncUpdatableNamespace.connected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* // TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
// @ts-expect-error
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the propertyAccessor.`hasChanged` compatible in synchronous updates
|
* Makes the propertyAccessor.`hasChanged` compatible in synchronous updates
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,12 @@ export class LionIcon extends LitElement {
|
||||||
this.__svg = nothing;
|
this.__svg = nothing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
|
|
||||||
/** @param {import('lit').PropertyValues} changedProperties */
|
/** @param {import('lit').PropertyValues} changedProperties */
|
||||||
update(changedProperties) {
|
update(changedProperties) {
|
||||||
super.update(changedProperties);
|
super.update(changedProperties);
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,13 @@ export const OverlayMixinImplementation = superclass =>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* // TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
// @ts-expect-error
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
|
|
||||||
get _overlayInvokerNode() {
|
get _overlayInvokerNode() {
|
||||||
return /** @type {HTMLElement | undefined} */ (
|
return /** @type {HTMLElement | undefined} */ (
|
||||||
Array.from(this.children).find(child => child.slot === 'invoker')
|
Array.from(this.children).find(child => child.slot === 'invoker')
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,12 @@ export class LionProgressIndicator extends LocalizeMixin(LitElement) {
|
||||||
return !this.hasAttribute('value');
|
return !this.hasAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* // TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In case of a determinate progress-indicator it returns the progress percentage
|
* In case of a determinate progress-indicator it returns the progress percentage
|
||||||
* based on value, min & max.
|
* based on value, min & max.
|
||||||
|
|
|
||||||
|
|
@ -115,4 +115,10 @@ export class LionStep extends LitElement {
|
||||||
const result = this.condition(data);
|
const result = this.condition(data);
|
||||||
return this.invertCondition ? !result : result;
|
return this.invertCondition ? !result : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* // TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,12 @@ export class LionSteps extends LitElement {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* // TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number} newCurrent
|
* @param {number} newCurrent
|
||||||
* @param {number} oldCurrent
|
* @param {number} oldCurrent
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,12 @@ export class LionTabs extends LitElement {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* // TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
|
|
||||||
/** @private */
|
/** @private */
|
||||||
__setupSlots() {
|
__setupSlots() {
|
||||||
if (this.shadowRoot) {
|
if (this.shadowRoot) {
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,12 @@ export class LionTooltip extends ArrowMixin(OverlayMixin(LitElement)) {
|
||||||
this.invokerRelation = 'description';
|
this.invokerRelation = 'description';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* // TODO: check if this is a false positive or if we can improve
|
||||||
|
* @configure ReactiveElement
|
||||||
|
*/
|
||||||
|
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
||||||
|
|
||||||
/** @protected */
|
/** @protected */
|
||||||
// eslint-disable-next-line class-methods-use-this
|
// eslint-disable-next-line class-methods-use-this
|
||||||
_defineOverlayConfig() {
|
_defineOverlayConfig() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue