Skip to content
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

fix(ui): improve test experience in dev-mode #2395

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/happy-ducks-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lion/ui': patch
---

improve test experience in dev-mode by limiting verbose warnings
6 changes: 6 additions & 0 deletions packages/ui/components/calendar/src/LionCalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
* @private
Expand Down
6 changes: 6 additions & 0 deletions packages/ui/components/form-core/src/FormControlMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ const FormControlMixinImplementation = superclass =>
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() {
super();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ const SyncUpdatableMixinImplementation = superclass =>
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
* @param {string} name
Expand Down
6 changes: 6 additions & 0 deletions packages/ui/components/icon/src/LionIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ export class LionIcon extends LitElement {
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 */
update(changedProperties) {
super.update(changedProperties);
Expand Down
7 changes: 7 additions & 0 deletions packages/ui/components/overlays/src/OverlayMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
return /** @type {HTMLElement | undefined} */ (
Array.from(this.children).find(child => child.slot === 'invoker')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ export class LionProgressIndicator extends LocalizeMixin(LitElement) {
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
* based on value, min & max.
Expand Down
6 changes: 6 additions & 0 deletions packages/ui/components/steps/src/LionStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,10 @@ export class LionStep extends LitElement {
const result = this.condition(data);
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') || [];
}
6 changes: 6 additions & 0 deletions packages/ui/components/steps/src/LionSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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} oldCurrent
Expand Down
6 changes: 6 additions & 0 deletions packages/ui/components/tabs/src/LionTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
__setupSlots() {
if (this.shadowRoot) {
Expand Down
6 changes: 6 additions & 0 deletions packages/ui/components/tooltip/src/LionTooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ export class LionTooltip extends ArrowMixin(OverlayMixin(LitElement)) {
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 */
// eslint-disable-next-line class-methods-use-this
_defineOverlayConfig() {
Expand Down