From 2ed4295eb6da2f679d57015765164d3f50c1b1f2 Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Wed, 6 Dec 2023 12:15:21 -0600 Subject: [PATCH 01/41] wip moblile learn-more fix --- src/mobile/pages/pages.stache | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mobile/pages/pages.stache b/src/mobile/pages/pages.stache index 5e491823..987a3900 100644 --- a/src/mobile/pages/pages.stache +++ b/src/mobile/pages/pages.stache @@ -52,7 +52,13 @@ {{#for(button of currentPage.buttons)}} From cfc8ffe1ad1aec52326195676f0f72336d6661f4 Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Wed, 6 Dec 2023 13:58:40 -0600 Subject: [PATCH 02/41] fix bad char --- src/mobile/pages/pages.stache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mobile/pages/pages.stache b/src/mobile/pages/pages.stache index 987a3900..5116e7d5 100644 --- a/src/mobile/pages/pages.stache +++ b/src/mobile/pages/pages.stache @@ -54,7 +54,7 @@ From 233ba121628af8e27a5a9f0271b1214307a8f4b4 Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Wed, 6 Dec 2023 16:03:36 -0600 Subject: [PATCH 05/41] fix typo --- src/mobile/pages/pages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mobile/pages/pages.js b/src/mobile/pages/pages.js index 4f42b85b..9c4857e3 100644 --- a/src/mobile/pages/pages.js +++ b/src/mobile/pages/pages.js @@ -8,7 +8,7 @@ import Preview from '~/src/models/preview' import { analytics } from '~/src/util/analytics' import stache from 'can-stache' import '~/src/mobile/util/helpers' -import { ViewerStepsVM.fireLearnMoreModal } from '../../desktop/steps/steps''~/src/desktop/steps/steps' +import { ViewerStepsVM.fireLearnMoreModal } from '~/src/desktop/steps/steps' stache.registerPartial('assemble-form', assembleFormTpl) stache.registerPartial('save-answers-form', saveAnswersFormTpl) From c3fb1bccb0a751c1c270361f3d6f51022cfe8b6d Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Wed, 6 Dec 2023 16:08:01 -0600 Subject: [PATCH 06/41] fix ref --- src/mobile/pages/pages.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mobile/pages/pages.js b/src/mobile/pages/pages.js index 9c4857e3..e44c8335 100644 --- a/src/mobile/pages/pages.js +++ b/src/mobile/pages/pages.js @@ -8,7 +8,7 @@ import Preview from '~/src/models/preview' import { analytics } from '~/src/util/analytics' import stache from 'can-stache' import '~/src/mobile/util/helpers' -import { ViewerStepsVM.fireLearnMoreModal } from '~/src/desktop/steps/steps' +import ViewerStepsVM from '~/src/desktop/steps/steps' stache.registerPartial('assemble-form', assembleFormTpl) stache.registerPartial('save-answers-form', saveAnswersFormTpl) @@ -48,6 +48,7 @@ export default Component.extend({ } }, + fireLearnMoreModal : ViewerStepsVM.fireLearnMoreModal, events: { 'a click': function (el, ev) { if (el.href && el.href.toLowerCase().indexOf('popup') === 0) { From 62b0a1a133795d8381fe667b20ede38c5ee07c5a Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Wed, 6 Dec 2023 16:37:44 -0600 Subject: [PATCH 07/41] event test --- src/mobile/pages/pages.js | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/mobile/pages/pages.js b/src/mobile/pages/pages.js index e44c8335..cd549d5e 100644 --- a/src/mobile/pages/pages.js +++ b/src/mobile/pages/pages.js @@ -48,7 +48,6 @@ export default Component.extend({ } }, - fireLearnMoreModal : ViewerStepsVM.fireLearnMoreModal, events: { 'a click': function (el, ev) { if (el.href && el.href.toLowerCase().indexOf('popup') === 0) { @@ -86,6 +85,32 @@ export default Component.extend({ } }, + 'a.learn-more click':fireLearnMoreModal () { + const pages = this.interview.pages + const pageName = this.appState.page + + if (pages && pageName) { + const page = pages.find(pageName) + + // piwik tracking of learn-more clicks + if (window._paq) { + analytics.trackCustomEvent('Learn-More', 'from: ' + pageName, page.learn) + } + + this.appState.modalContent = { + // name undefined prevents stache warnings + title: page.learn, + text: page.help, + imageURL: (page.helpImageURL || '').trim(), + altText: page.helpAltText, + mediaLabel: page.helpMediaLabel, + audioURL: (page.helpAudioURL || '').trim(), + videoURL: (page.helpVideoURL || '').trim(), + helpReader: page.helpReader + } + } + }, + 'button.open-preview click': function (el, ev) { ev.preventDefault() From b07d245507ae3d9ff305ca31bebca8beabdaaaa3 Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Wed, 6 Dec 2023 16:39:21 -0600 Subject: [PATCH 08/41] eventify --- src/mobile/pages/pages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mobile/pages/pages.js b/src/mobile/pages/pages.js index cd549d5e..2ec8b000 100644 --- a/src/mobile/pages/pages.js +++ b/src/mobile/pages/pages.js @@ -85,7 +85,7 @@ export default Component.extend({ } }, - 'a.learn-more click':fireLearnMoreModal () { + 'a.learn-more click': function fireLearnMoreModal () { const pages = this.interview.pages const pageName = this.appState.page From 11affc8dec0d5dabb9096488b90fcbfa753e2f3e Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Wed, 6 Dec 2023 16:44:22 -0600 Subject: [PATCH 09/41] fix vm ref --- src/mobile/pages/pages.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mobile/pages/pages.js b/src/mobile/pages/pages.js index 2ec8b000..e9aef9f8 100644 --- a/src/mobile/pages/pages.js +++ b/src/mobile/pages/pages.js @@ -86,8 +86,9 @@ export default Component.extend({ }, 'a.learn-more click': function fireLearnMoreModal () { - const pages = this.interview.pages - const pageName = this.appState.page + const pages = this.viewModel.interview.pages + const pageName = this.viewModel.currentPage.name + // this.appState.page if (pages && pageName) { const page = pages.find(pageName) From 5d70ace7ee324ac2052bd06a0528aa544cbf663a Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Wed, 6 Dec 2023 16:48:33 -0600 Subject: [PATCH 10/41] fix apstate ref --- src/mobile/pages/pages.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mobile/pages/pages.js b/src/mobile/pages/pages.js index e9aef9f8..cfd2b692 100644 --- a/src/mobile/pages/pages.js +++ b/src/mobile/pages/pages.js @@ -86,9 +86,10 @@ export default Component.extend({ }, 'a.learn-more click': function fireLearnMoreModal () { + const vm = this.viewModel const pages = this.viewModel.interview.pages const pageName = this.viewModel.currentPage.name - // this.appState.page + // vm.appState.page if (pages && pageName) { const page = pages.find(pageName) @@ -98,7 +99,7 @@ export default Component.extend({ analytics.trackCustomEvent('Learn-More', 'from: ' + pageName, page.learn) } - this.appState.modalContent = { + vm.appState.modalContent = { // name undefined prevents stache warnings title: page.learn, text: page.help, From 5f3912c47ecebab26211135ce66cdfdd79600a49 Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Mon, 11 Dec 2023 10:05:32 -0600 Subject: [PATCH 11/41] fix aui-action --- src/mobile/pages/pages.stache | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mobile/pages/pages.stache b/src/mobile/pages/pages.stache index a85bff49..c2895379 100644 --- a/src/mobile/pages/pages.stache +++ b/src/mobile/pages/pages.stache @@ -56,8 +56,9 @@ on:click="fireLearnMoreModal()" on:keydown="keydownFireClickHandler(scope.event, ../../../desktop/steps/fireLearnMoreModal)" class="learn-more" - aria-label="{{{ parseText(currentPage.learn) }}}">{{{ parseText(currentPage.learn) }}} - aui-action="help" + aria-label="{{{ parseText(currentPage.learn) }}}" + aui-action="help"> + {{{ parseText(currentPage.learn) }}}

From 8e72e7564513cf527f271103989788ee80e64977 Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Mon, 11 Dec 2023 11:56:57 -0600 Subject: [PATCH 12/41] add note to maybe refactor --- src/mobile/pages/pages.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mobile/pages/pages.js b/src/mobile/pages/pages.js index cfd2b692..a4ca0cbc 100644 --- a/src/mobile/pages/pages.js +++ b/src/mobile/pages/pages.js @@ -86,6 +86,9 @@ export default Component.extend({ }, 'a.learn-more click': function fireLearnMoreModal () { + // this is almost a line for line duplicate + // of src/desktop/steps.js + // should probably refactor const vm = this.viewModel const pages = this.viewModel.interview.pages const pageName = this.viewModel.currentPage.name From b18c0e160a25334dadd190cdcad9c97a5058e001 Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Mon, 11 Dec 2023 11:59:16 -0600 Subject: [PATCH 13/41] update package.json for version number --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 54c87260..c3716c70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@caliorg/a2jviewer", - "version": "8.1.6", + "version": "8.1.7-0", "description": "A2J Viewer standalone and preview app.", "main": "a2jviewer/app", "scripts": { From 346526865968562a137bb9ed11bc939488b29cea Mon Sep 17 00:00:00 2001 From: Tobias Nteireho Date: Mon, 11 Dec 2023 12:03:50 -0600 Subject: [PATCH 14/41] make learn more act more linky --- src/mobile/pages/pages.stache | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mobile/pages/pages.stache b/src/mobile/pages/pages.stache index c2895379..2c18e2e9 100644 --- a/src/mobile/pages/pages.stache +++ b/src/mobile/pages/pages.stache @@ -53,6 +53,7 @@