From 74a83466ae5d3c2044c6c9462a70e0c95370e333 Mon Sep 17 00:00:00 2001 From: Maxwell Mwandigha Date: Tue, 7 Jan 2025 17:23:24 +0300 Subject: [PATCH 1/4] Delay for dynamic steps to ensure DOM updates before highlighting --- .../components/onboarding/onboarding.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts b/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts index 6224c4ab73..f11a0d569c 100644 --- a/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts +++ b/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts @@ -57,12 +57,12 @@ export class OnboardingComponent implements AfterViewInit { this.router.navigate(['/settings']); } - // if (this.onboardingSteps[data.order].dynamic) { - // setTimeout(() => { - // this.customTourService.updateHighlightedElements(); - // this.isHidden = false; - // }, 1000); - // } + if (this.onboardingSteps[data.order].dynamic) { + setTimeout(() => { + this.customTourService.updateHighlightedElements(); + this.isHidden = false; + }, 1000); + } }, }); From 2eb985c64f86f6c799e1bb276f0af06854e62212 Mon Sep 17 00:00:00 2001 From: Maxwell Mwandigha Date: Wed, 8 Jan 2025 19:19:26 +0300 Subject: [PATCH 2/4] Slight cleanup --- .../onboarding/onboarding.component.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts b/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts index f11a0d569c..141de4929c 100644 --- a/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts +++ b/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts @@ -97,14 +97,14 @@ export class OnboardingComponent implements AfterViewInit { next: () => this.initOnboarding(), }); - this.eventBusService.on(EventType.FeedPostsLoaded).subscribe({ - next: () => { - setTimeout(() => { - this.customTourService.updateHighlightedElements(); - this.isHidden = false; - }, 100); - }, - }); + // this.eventBusService.on(EventType.FeedPostsLoaded).subscribe({ + // next: () => { + // setTimeout(() => { + // this.customTourService.updateHighlightedElements(); + // this.isHidden = false; + // }, 100); + // }, + // }); this.sessionService.isFiltersVisible$.pipe(untilDestroyed(this)).subscribe({ next: (isFiltersVisible) => { From 71b3e6f34e865ac3d45241820190e5e273e4fdec Mon Sep 17 00:00:00 2001 From: Maxwell Mwandigha Date: Wed, 8 Jan 2025 20:04:11 +0300 Subject: [PATCH 3/4] test --- .../src/app/shared/components/onboarding/onboarding.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts b/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts index 141de4929c..7349baeb7c 100644 --- a/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts +++ b/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts @@ -104,6 +104,7 @@ export class OnboardingComponent implements AfterViewInit { // this.isHidden = false; // }, 100); // }, + // // }); this.sessionService.isFiltersVisible$.pipe(untilDestroyed(this)).subscribe({ From 939c3ddb4c55b86cdce111c0182a70a7482a1f51 Mon Sep 17 00:00:00 2001 From: Maxwell Mwandigha Date: Wed, 8 Jan 2025 20:30:33 +0300 Subject: [PATCH 4/4] Removing unused code --- .../components/onboarding/onboarding.component.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts b/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts index 7349baeb7c..15af404e16 100644 --- a/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts +++ b/apps/web-mzima-client/src/app/shared/components/onboarding/onboarding.component.ts @@ -97,16 +97,6 @@ export class OnboardingComponent implements AfterViewInit { next: () => this.initOnboarding(), }); - // this.eventBusService.on(EventType.FeedPostsLoaded).subscribe({ - // next: () => { - // setTimeout(() => { - // this.customTourService.updateHighlightedElements(); - // this.isHidden = false; - // }, 100); - // }, - // - // }); - this.sessionService.isFiltersVisible$.pipe(untilDestroyed(this)).subscribe({ next: (isFiltersVisible) => { setTimeout(() => {