From 73a0d3483b7c42ab0a6247721073b81a01f7b258 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Mon, 6 Feb 2023 20:42:47 +0330 Subject: [PATCH] feat: debug all renders --- ui/demo-pwa/src/page-card.ts | 2 +- ui/demo-pwa/src/page-chat.ts | 2 +- ui/icon/src/icon.ts | 2 +- ui/pwa-helper/src/pwa-element.ts | 2 +- ui/ui-kit/src/button/icon-button.ts | 1 + ui/ui-kit/src/chat/chat-avatar.ts | 2 +- ui/ui-kit/src/chat/chat-bubble.ts | 2 +- ui/ui-kit/src/chat/chat-footer.ts | 1 + ui/ui-kit/src/chat/chat-list.ts | 2 +- ui/ui-kit/src/chat/chat-message.ts | 2 +- ui/ui-kit/src/chat/chat-text-input.ts | 1 + ui/ui-kit/src/chat/chat.ts | 2 +- ui/ui-kit/src/snackbar/element.ts | 1 + uniquely/flight-finder-pwa/src/component/job-add-form.ts | 1 + uniquely/flight-finder-pwa/src/component/job-item.ts | 1 + .../flight-finder-pwa/src/component/page-flight-finder.ts | 1 + uniquely/soffit-pwa/src/lottery-box.ts | 2 +- uniquely/soffit-pwa/src/lottery-form.ts | 4 ++-- uniquely/soffit-pwa/src/page-home.ts | 2 +- uniquely/soffit-pwa/src/supply-chain-box.ts | 2 +- uniquely/soffit-pwa/src/supply-chain-form.ts | 2 +- uniquely/soffit-pwa/src/tech-dep/radio-group.ts | 2 +- 22 files changed, 23 insertions(+), 16 deletions(-) diff --git a/ui/demo-pwa/src/page-card.ts b/ui/demo-pwa/src/page-card.ts index ba811fbd8..3f339fc57 100644 --- a/ui/demo-pwa/src/page-card.ts +++ b/ui/demo-pwa/src/page-card.ts @@ -55,7 +55,7 @@ export class AlwatrPageCard extends AlwatrSmartElement { `; override render(): unknown { - super.render(); + this._logger.logMethod('render'); return html` `; } } diff --git a/ui/icon/src/icon.ts b/ui/icon/src/icon.ts index 426fab8de..01d1edefa 100644 --- a/ui/icon/src/icon.ts +++ b/ui/icon/src/icon.ts @@ -76,7 +76,7 @@ export class AlwatrIcon extends DirectionMixin(SignalMixin(AlwatrDummyElement)) protected _icon?: HTMLTemplateResult; override render(): unknown { - super.render(); + this._logger.logMethod('render'); return this._icon; } diff --git a/ui/pwa-helper/src/pwa-element.ts b/ui/pwa-helper/src/pwa-element.ts index 207ae1d56..f89730105 100644 --- a/ui/pwa-helper/src/pwa-element.ts +++ b/ui/pwa-helper/src/pwa-element.ts @@ -54,7 +54,7 @@ export class AlwatrPwaElement extends AlwatrSmartElement { } override render(): unknown { - super.render(); + this._logger.logMethod('render'); return html`
${cache(routerOutlet(this._routesConfig))}
`; } diff --git a/ui/ui-kit/src/button/icon-button.ts b/ui/ui-kit/src/button/icon-button.ts index 928c6103a..26297911e 100644 --- a/ui/ui-kit/src/button/icon-button.ts +++ b/ui/ui-kit/src/button/icon-button.ts @@ -70,6 +70,7 @@ export class AlwatrStandardIconButton extends AlwatrSurface { } override render(): unknown { + this._logger.logMethod('render'); return html``; } } diff --git a/ui/ui-kit/src/chat/chat-bubble.ts b/ui/ui-kit/src/chat/chat-bubble.ts index 2aec3b3f4..687b9856e 100644 --- a/ui/ui-kit/src/chat/chat-bubble.ts +++ b/ui/ui-kit/src/chat/chat-bubble.ts @@ -46,7 +46,7 @@ export class AlwatrChatBubble extends DirectionMixin(SignalMixin(AlwatrDummyElem text?: string; override render(): unknown { - super.render(); + this._logger.logMethod('render'); return html`${this.text ?? '...'}`; } } diff --git a/ui/ui-kit/src/chat/chat-footer.ts b/ui/ui-kit/src/chat/chat-footer.ts index 769248aff..bb893265c 100644 --- a/ui/ui-kit/src/chat/chat-footer.ts +++ b/ui/ui-kit/src/chat/chat-footer.ts @@ -34,6 +34,7 @@ export class AlwatrChatFooter extends AlwatrDummyElement { `; override render(): unknown { + this._logger.logMethod('render'); return html` diff --git a/ui/ui-kit/src/chat/chat-list.ts b/ui/ui-kit/src/chat/chat-list.ts index ccad3a830..9e3be6ca5 100644 --- a/ui/ui-kit/src/chat/chat-list.ts +++ b/ui/ui-kit/src/chat/chat-list.ts @@ -72,7 +72,7 @@ export class AlwatrChatList extends AlwatrDummyElement { currentUser?: string; override render(): unknown { - super.render(); + this._logger.logMethod('render'); if (this.storage == null) return nothing; return html`${map( this.storage.data, diff --git a/ui/ui-kit/src/chat/chat-message.ts b/ui/ui-kit/src/chat/chat-message.ts index 64cc83c88..24e8f6112 100644 --- a/ui/ui-kit/src/chat/chat-message.ts +++ b/ui/ui-kit/src/chat/chat-message.ts @@ -73,7 +73,7 @@ export class AlwatrChatMessage extends DirectionMixin(SignalMixin(AlwatrDummyEle self = false; override render(): unknown { - super.render(); + this._logger.logMethod('render'); if (this.message == null || this.message.type !== 'text') return nothing; const bubble = html` diff --git a/ui/ui-kit/src/snackbar/element.ts b/ui/ui-kit/src/snackbar/element.ts index 7af3aa1d7..9c1a8d282 100644 --- a/ui/ui-kit/src/snackbar/element.ts +++ b/ui/ui-kit/src/snackbar/element.ts @@ -119,6 +119,7 @@ export class AlwatrSnackbar extends AlwatrSurface { } override render(): unknown { + this._logger.logMethod('render'); return html`${this.message}${when( this.actionLabel, () => html`${this.actionLabel}`, diff --git a/uniquely/flight-finder-pwa/src/component/job-add-form.ts b/uniquely/flight-finder-pwa/src/component/job-add-form.ts index bd531d2ef..4ba797cb7 100644 --- a/uniquely/flight-finder-pwa/src/component/job-add-form.ts +++ b/uniquely/flight-finder-pwa/src/component/job-add-form.ts @@ -74,6 +74,7 @@ export class JobAddForm extends AlwatrSmartElement { }; override render(): unknown { + this._logger.logMethod('render'); return html` diff --git a/uniquely/flight-finder-pwa/src/component/job-item.ts b/uniquely/flight-finder-pwa/src/component/job-item.ts index 17e83d05e..78ce1736f 100644 --- a/uniquely/flight-finder-pwa/src/component/job-item.ts +++ b/uniquely/flight-finder-pwa/src/component/job-item.ts @@ -99,6 +99,7 @@ export class JobItem extends AlwatrSmartElement { static jobDeleteEventTrigger = eventTrigger.bind('job-delete'); override render(): unknown { + this._logger.logMethod('render'); if (this.job == null || this.job.detail == null) return nothing; return html` diff --git a/uniquely/flight-finder-pwa/src/component/page-flight-finder.ts b/uniquely/flight-finder-pwa/src/component/page-flight-finder.ts index 39114a9a2..af0952155 100644 --- a/uniquely/flight-finder-pwa/src/component/page-flight-finder.ts +++ b/uniquely/flight-finder-pwa/src/component/page-flight-finder.ts @@ -84,6 +84,7 @@ export class PageFlightFinder extends AlwatrSmartElement { setInterval(this.__updateTimer, 3_000); } override render(): unknown { + this._logger.logMethod('render'); return html` diff --git a/uniquely/soffit-pwa/src/lottery-box.ts b/uniquely/soffit-pwa/src/lottery-box.ts index d4309b887..ebce6b878 100644 --- a/uniquely/soffit-pwa/src/lottery-box.ts +++ b/uniquely/soffit-pwa/src/lottery-box.ts @@ -52,7 +52,7 @@ export class AlwatrLotteryBox extends LocalizeMixin(AlwatrSmartElement) { protected _box: AlwatrIconBox | null = null; override render(): unknown { - super.render(); + this._logger.logMethod('render'); return html` ${this._boxContentTemplate()} `; diff --git a/uniquely/soffit-pwa/src/lottery-form.ts b/uniquely/soffit-pwa/src/lottery-form.ts index e79b57e50..cfaf18485 100644 --- a/uniquely/soffit-pwa/src/lottery-form.ts +++ b/uniquely/soffit-pwa/src/lottery-form.ts @@ -1,4 +1,4 @@ -import {customElement, css, html, property, AlwatrSmartElement, state, LocalizeMixin} from '@alwatr/element'; +import {customElement, css, html, property, AlwatrSmartElement, LocalizeMixin} from '@alwatr/element'; import {message} from '@alwatr/i18n'; import {commandTrigger} from '@alwatr/signal'; @@ -109,7 +109,7 @@ export class AlwatrLotteryForm extends LocalizeMixin(AlwatrSmartElement) { } override render(): unknown { - super.render(); + this._logger.logMethod('render'); return html` SOFFIT Logo
${this._menuTemplate()}
diff --git a/uniquely/soffit-pwa/src/supply-chain-box.ts b/uniquely/soffit-pwa/src/supply-chain-box.ts index b0023d69c..d5941e5d6 100644 --- a/uniquely/soffit-pwa/src/supply-chain-box.ts +++ b/uniquely/soffit-pwa/src/supply-chain-box.ts @@ -1,4 +1,4 @@ -import {customElement, html, state} from '@alwatr/element'; +import {customElement, html} from '@alwatr/element'; import {message} from '@alwatr/i18n'; import {AlwatrLotteryBox} from './lottery-box.js'; diff --git a/uniquely/soffit-pwa/src/supply-chain-form.ts b/uniquely/soffit-pwa/src/supply-chain-form.ts index e262e7fa9..bdf1c867a 100644 --- a/uniquely/soffit-pwa/src/supply-chain-form.ts +++ b/uniquely/soffit-pwa/src/supply-chain-form.ts @@ -23,7 +23,7 @@ export class AlwatrSupplyChainForm extends AlwatrLotteryForm { static override formId = 'supply-chain'; override render(): unknown { - super.render(); + this._logger.logMethod('render'); return html` ${this.options?.title}