Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 493f662

Browse files
feat: don't display help first time the editor is accessed (testusers behavior feedback)
1 parent 209e715 commit 493f662

File tree

4 files changed

+3
-51
lines changed

4 files changed

+3
-51
lines changed

studio/src/app/components/editor/actions/app-editor-actions/app-editor-actions.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, Element, Event, EventEmitter, h, Listen, Method, Prop} from '@stencil/core';
1+
import {Component, Element, Event, EventEmitter, h, Listen, Prop} from '@stencil/core';
22
import {OverlayEventDetail} from '@ionic/core';
33

44
import {get, set} from 'idb-keyval';
@@ -49,18 +49,6 @@ export class AppEditorActions {
4949
this.anonymousService = AnonymousService.getInstance();
5050
}
5151

52-
@Method()
53-
displayHelp(): Promise<void> {
54-
return new Promise<void>(async (resolve) => {
55-
const help: HTMLElement = this.el.querySelector('app-help-action');
56-
if (help) {
57-
await (help as any).displayHelp();
58-
}
59-
60-
resolve();
61-
});
62-
}
63-
6452
async onActionOpenSlideAdd($event: CustomEvent) {
6553
if (!$event || !$event.detail) {
6654
return;

studio/src/app/components/editor/actions/app-help-action/app-help-action.tsx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import {Component, h, Element, Method} from '@stencil/core';
2-
3-
import {get, set} from 'idb-keyval';
1+
import {Component, h, Element} from '@stencil/core';
42

53
import {IonControllerUtils} from '../../../../utils/core/ion-controller-utils';
64

@@ -11,30 +9,13 @@ export class AppHelpAction {
119

1210
@Element() el: HTMLElement;
1311

14-
@Method()
15-
async displayHelp() {
16-
const helpDisplayedOnce: boolean = await get<boolean>('deckdeckgo_display_help');
17-
18-
if (!helpDisplayedOnce) {
19-
const button: HTMLIonTabButtonElement = this.el.querySelector('ion-tab-button.get-help-action');
20-
21-
if (button) {
22-
button.click();
23-
}
24-
}
25-
}
26-
2712
private async openGetHelp() {
2813
const popover: HTMLIonPopoverElement = await IonControllerUtils.createPopover({
2914
component: 'app-get-help',
3015
mode: 'ios',
3116
cssClass: 'info'
3217
});
3318

34-
popover.onDidDismiss().then(async () => {
35-
await set('deckdeckgo_display_help', true);
36-
});
37-
3819
await popover.present();
3920
}
4021

studio/src/app/pages/editor/app-editor/app-editor.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ export class AppEditor {
133133
this.slidesEditable = true;
134134

135135
await this.contentEditable(slide);
136-
137-
await this.showHelp();
138136
});
139137

140138
this.fullscreen = DeckDeckGoUtils.isFullscreen();
@@ -453,18 +451,6 @@ export class AppEditor {
453451
});
454452
}
455453

456-
private showHelp(): Promise<void> {
457-
return new Promise<void>(async (resolve) => {
458-
const actions: HTMLElement = this.el.querySelector('app-editor-actions');
459-
460-
if (actions) {
461-
await (actions as any).displayHelp();
462-
}
463-
464-
resolve();
465-
});
466-
}
467-
468454
private stickyToolbarActivated($event: CustomEvent) {
469455
this.hideFooterActions = $event ? $event.detail : false;
470456
this.hideNavigation = $event ? DeckDeckGoUtils.isIOS() && $event.detail : false;

studio/src/components.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export namespace Components {
4343
'deckId': string;
4444
}
4545
interface AppEditorActions {
46-
'displayHelp': () => Promise<void>;
4746
'fullscreen': boolean;
4847
'hideFooterActions': boolean;
4948
'slides': any[];
@@ -68,9 +67,7 @@ export namespace Components {
6867
interface AppFullscreenInfo {}
6968
interface AppGetHelp {}
7069
interface AppGif {}
71-
interface AppHelpAction {
72-
'displayHelp': () => Promise<void>;
73-
}
70+
interface AppHelpAction {}
7471
interface AppHome {}
7572
interface AppImage {
7673
'deckOrSlide': boolean;

0 commit comments

Comments
 (0)