From 7174022153afb88e57f82ca93135b57e63436712 Mon Sep 17 00:00:00 2001 From: Sartxi Date: Tue, 11 Jun 2024 14:45:50 -0600 Subject: [PATCH 1/2] foe locui block that displays the message to re-run --- libs/blocks/locui/locui.css | 9 +++++++++ libs/blocks/locui/locui.js | 13 +++++++++++++ libs/utils/utils.js | 1 + 3 files changed, 23 insertions(+) create mode 100644 libs/blocks/locui/locui.css create mode 100644 libs/blocks/locui/locui.js diff --git a/libs/blocks/locui/locui.css b/libs/blocks/locui/locui.css new file mode 100644 index 0000000000..85bc22aea5 --- /dev/null +++ b/libs/blocks/locui/locui.css @@ -0,0 +1,9 @@ +.locui.container { + margin: 0 auto; + margin-top: 10vh; + max-width: 700px; + border-radius: 10px; + border: 10px solid #eee; + padding: 10px 30px 30px; + text-align: center; +} \ No newline at end of file diff --git a/libs/blocks/locui/locui.js b/libs/blocks/locui/locui.js new file mode 100644 index 0000000000..4824e647cd --- /dev/null +++ b/libs/blocks/locui/locui.js @@ -0,0 +1,13 @@ +import { createTag } from '../../utils/utils.js'; + +export default function init(el) { + el.classList.add('container'); + const heading = createTag('h2', null, 'Missing project details'); + const text = createTag('p', null, 'After authentication, unfortunately the project details were cleared upon redirect. To get back to your project, please return to the excel and run the project again.'); + const learnmore = createTag('a', { + class: 'con-button', + href: 'https://milo.adobe.com/docs/authoring/localization#:~:text=at%20render%20time.-,Troubleshooting,-Error%20matrix', + target: '_blank', + }, 'Learn More'); + el.append(heading, text, learnmore); +} diff --git a/libs/utils/utils.js b/libs/utils/utils.js index ed41f1ad0d..a70602485f 100644 --- a/libs/utils/utils.js +++ b/libs/utils/utils.js @@ -41,6 +41,7 @@ const MILO_BLOCKS = [ 'icon-block', 'iframe', 'instagram', + 'locui', 'marketo', 'marquee', 'marquee-anchors', From ff940e134d9e54183748f6e6bee2244a6acdaf7b Mon Sep 17 00:00:00 2001 From: Sartxi Date: Tue, 11 Jun 2024 15:24:00 -0600 Subject: [PATCH 2/2] update message --- libs/blocks/locui/locui.css | 3 +-- libs/blocks/locui/locui.js | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libs/blocks/locui/locui.css b/libs/blocks/locui/locui.css index 85bc22aea5..2c9de0b76a 100644 --- a/libs/blocks/locui/locui.css +++ b/libs/blocks/locui/locui.css @@ -5,5 +5,4 @@ border-radius: 10px; border: 10px solid #eee; padding: 10px 30px 30px; - text-align: center; -} \ No newline at end of file +} diff --git a/libs/blocks/locui/locui.js b/libs/blocks/locui/locui.js index 4824e647cd..2c9acdac1b 100644 --- a/libs/blocks/locui/locui.js +++ b/libs/blocks/locui/locui.js @@ -3,11 +3,14 @@ import { createTag } from '../../utils/utils.js'; export default function init(el) { el.classList.add('container'); const heading = createTag('h2', null, 'Missing project details'); - const text = createTag('p', null, 'After authentication, unfortunately the project details were cleared upon redirect. To get back to your project, please return to the excel and run the project again.'); + const paragraph = createTag('p', null, 'The project details were removed after you logged in. To resolve this:'); + const steps = createTag('ol', null); + const stepList = ['Close this window or tab.', 'Open your project Excel file.', 'Click "Localize..." in Sidekick again.']; + stepList.forEach((step) => steps.append(createTag('li', null, step))); const learnmore = createTag('a', { class: 'con-button', href: 'https://milo.adobe.com/docs/authoring/localization#:~:text=at%20render%20time.-,Troubleshooting,-Error%20matrix', target: '_blank', }, 'Learn More'); - el.append(heading, text, learnmore); + el.append(heading, paragraph, steps, learnmore); }