Only show loading for slow flow steps to avoid flickering (#26131)

This commit is contained in:
Petar Petrov 2025-07-10 18:59:07 +03:00 committed by GitHub
parent 1ded254e5a
commit 9134132ba9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -438,7 +438,10 @@ class DataEntryFlowDialog extends LitElement {
return;
}
this._loading = "loading_step";
const delayedLoading = setTimeout(() => {
// only show loading for slow steps to avoid flickering
this._loading = "loading_step";
}, 250);
let _step: DataEntryFlowStep;
try {
_step = await step;
@ -452,6 +455,7 @@ class DataEntryFlowDialog extends LitElement {
});
return;
} finally {
clearTimeout(delayedLoading);
this._loading = undefined;
}