From eb27482f8ce52394c5c772482bc721bf56be1e9c Mon Sep 17 00:00:00 2001 From: Jan Heuermann Date: Tue, 21 Nov 2023 13:48:15 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Remove=20=E2=80=9CCancel=E2=80=9D=20button?= =?UTF-8?q?=20from=20loading=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-elements/change-hostname-dialog.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/templates/custom-elements/change-hostname-dialog.html b/app/templates/custom-elements/change-hostname-dialog.html index ed67901bb..716cbb58b 100644 --- a/app/templates/custom-elements/change-hostname-dialog.html +++ b/app/templates/custom-elements/change-hostname-dialog.html @@ -39,7 +39,6 @@

Retrieving Current Hostname

-
@@ -133,7 +132,10 @@

Changing Hostname

PROMPT: "prompt", CHANGING: "changing", }; - statesWithoutDialogClose = new Set([this.states.CHANGING]); + statesWithoutDialogClose = new Set([ + this.states.CHANGING, + this.states.INITIALIZING, + ]); connectedCallback() { this.attachShadow({ mode: "open" }).appendChild( @@ -144,9 +146,6 @@

Changing Hostname

hostnameInput: this.shadowRoot.getElementById("hostname-input"), changeAndRestart: this.shadowRoot.getElementById("change-and-restart"), - cancelInitialization: this.shadowRoot.getElementById( - "cancel-initialization" - ), cancelHostnameChange: this.shadowRoot.getElementById( "cancel-hostname-change" ), @@ -164,9 +163,6 @@

Changing Hostname

this.elements.changeAndRestart.click(); } }); - this.elements.cancelInitialization.addEventListener("click", () => { - this.dispatchEvent(new DialogClosedEvent()); - }); this.elements.cancelHostnameChange.addEventListener("click", () => { this.dispatchEvent(new DialogClosedEvent()); }); From a1aa0249bc64c8dd1ee4c75e7ea0daa982bb2d22 Mon Sep 17 00:00:00 2001 From: Jan Heuermann Date: Tue, 21 Nov 2023 19:09:02 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Consolidate=20button=20wording=20in=20dialo?= =?UTF-8?q?gs=20(=E2=80=9CClose=E2=80=9D/=E2=80=9CBack=E2=80=9D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../change-hostname-dialog.html | 2 +- .../custom-elements/feature-pro-dialog.html | 2 +- .../custom-elements/paste-dialog.html | 2 +- .../custom-elements/shutdown-dialog.html | 2 +- .../custom-elements/update-dialog.html | 4 +- .../update-prompt-automatic.html | 2 +- .../video-settings-dialog.html | 2 +- app/templates/styleguide.html | 103 ++++++++++++++---- 8 files changed, 90 insertions(+), 29 deletions(-) diff --git a/app/templates/custom-elements/change-hostname-dialog.html b/app/templates/custom-elements/change-hostname-dialog.html index 716cbb58b..04258bf47 100644 --- a/app/templates/custom-elements/change-hostname-dialog.html +++ b/app/templates/custom-elements/change-hostname-dialog.html @@ -65,7 +65,7 @@

Change Hostname

- +
diff --git a/app/templates/custom-elements/feature-pro-dialog.html b/app/templates/custom-elements/feature-pro-dialog.html index 551ea1112..a8bf3cf52 100644 --- a/app/templates/custom-elements/feature-pro-dialog.html +++ b/app/templates/custom-elements/feature-pro-dialog.html @@ -14,7 +14,7 @@

This Feature is Available in TinyPilot Pro

> Learn More - +
diff --git a/app/templates/custom-elements/paste-dialog.html b/app/templates/custom-elements/paste-dialog.html index 5ec22488d..c9cc67923 100644 --- a/app/templates/custom-elements/paste-dialog.html +++ b/app/templates/custom-elements/paste-dialog.html @@ -28,7 +28,7 @@

Paste Text

spellcheck="false" > - + -

Overlay with Feature

-
- - - +
+

Overlay with Feature Panel

+
+ + +
+

+ This overlay style is used for more comprehensive, non-linear + features. +

+

+ In the bottom row, the overlay should contain a single button, which + is labelled “Close” and terminates the dialog. +

+

+ The overlay may contain “secondary” actions that advance the overlay + into a different state. The corresponding buttons shouldn’t be + primary ones, and they shouldn’t appear in the bottom row. +

+
-
- When the user can carry out “secondary” actions within the overlay - that don’t terminate the dialog itself, the blue action buttons should - be used for that. They also shouldn’t appear at the bottom. +
+

Secondary State

+

+ The secondary state should have buttons in the bottom row, which + follow the same rules as in the “Overlay with Primary Action”, + except that …: +

+
    +
  • + The buttons take the user back to the initial overlay state + instead of terminating the overlay. +
  • +
  • + The rightmost button is labelled “Back” instead of “Close”. We + deliberately don’t say “Cancel”, as that would make it unclear + whether the button terminates the overlay. +
  • +
+ +
- @@ -480,10 +545,6 @@

Primary Actions

dialog. These primary actions should either advance the dialog into a different state, or they should terminate the dialog altogether.

-

- If there is a primary button for closing or canceling the dialog, it - should always be the rightmost one. -

Progress Indicator