From 9c8b442a469c878afd3bd3866922d1aafb286408 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Thu, 12 Jun 2025 12:13:43 +0200 Subject: [PATCH] feat: Render emojis panel before actually loading the emojis, b=no-bug, c=common, workspaces --- src/zen/common/emojis/ZenEmojiPicker.mjs | 7 +++++-- src/zen/common/styles/zen-single-components.css | 1 + src/zen/workspaces/ZenWorkspaceCreation.mjs | 5 +---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/zen/common/emojis/ZenEmojiPicker.mjs b/src/zen/common/emojis/ZenEmojiPicker.mjs index 3f428683a..f7fa9d4e8 100644 --- a/src/zen/common/emojis/ZenEmojiPicker.mjs +++ b/src/zen/common/emojis/ZenEmojiPicker.mjs @@ -81,7 +81,8 @@ } } - #onPopupShowing(event) { + // note: It's async on purpose so we can render the popup before processing the emojis + async #onPopupShowing(event) { if (event.target !== this.#panel) return; this.searchInput.value = ''; const emojiList = this.emojiList; @@ -95,7 +96,9 @@ }); emojiList.appendChild(item); } - this.searchInput.focus(); + setTimeout(() => { + this.searchInput.focus(); + }, 500); } #onPopupHidden(event) { diff --git a/src/zen/common/styles/zen-single-components.css b/src/zen/common/styles/zen-single-components.css index 058c21890..cf72b1af5 100644 --- a/src/zen/common/styles/zen-single-components.css +++ b/src/zen/common/styles/zen-single-components.css @@ -74,6 +74,7 @@ body > #confetti { .zen-emojis-picker-emoji { appearance: none; font-size: 14px; + padding: 0px !important; & image { display: none; } diff --git a/src/zen/workspaces/ZenWorkspaceCreation.mjs b/src/zen/workspaces/ZenWorkspaceCreation.mjs index c013769e0..b9b46706f 100644 --- a/src/zen/workspaces/ZenWorkspaceCreation.mjs +++ b/src/zen/workspaces/ZenWorkspaceCreation.mjs @@ -186,6 +186,7 @@ } ) .then(() => { + this.inputName.focus(); gZenWorkspaces.workspaceElement(this.workspaceId).hidden = false; this.resolveInitialized(); }); @@ -199,10 +200,6 @@ workspace.containerTabId = this.currentProfile; await gZenWorkspaces.saveWorkspace(workspace); - if (gZenVerticalTabsManager._canReplaceNewTab) { - BrowserCommands.openTab(); - } - await this.#cleanup(); await gZenWorkspaces._organizeWorkspaceStripLocations(workspace, true);