From 4146e44948c5f2e56a82fe5f677810a4f98cc1b8 Mon Sep 17 00:00:00 2001 From: Pluto Date: Sat, 25 Oct 2025 17:32:47 +0530 Subject: [PATCH 01/37] refactor: improve image gallery UI --- .../BrowserScripts/RemoteFunctions.js | 112 ++++++++++-------- 1 file changed, 63 insertions(+), 49 deletions(-) diff --git a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js index f4bb2aa50b..5658067fc3 100644 --- a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js +++ b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js @@ -1343,7 +1343,7 @@ function RemoteFunctions(config = {}) { `, selectImageFromComputer: ` - + `, @@ -1355,13 +1355,13 @@ function RemoteFunctions(config = {}) { `, folderSettings: ` - + `, close: ` - + `, @@ -1370,6 +1370,12 @@ function RemoteFunctions(config = {}) { + `, + + search: ` + + + ` }; @@ -2261,7 +2267,7 @@ function RemoteFunctions(config = {}) { .phoenix-ribbon-container { width: 100% !important; - height: 156px !important; + height: 164px !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; position: relative !important; } @@ -2272,19 +2278,19 @@ function RemoteFunctions(config = {}) { overflow: hidden !important; scroll-behavior: smooth !important; padding: 6px !important; - top: 30px !important; + top: 36px !important; } .phoenix-ribbon-row { display: flex !important; - gap: 2px !important; + gap: 4px !important; } .phoenix-ribbon-thumb { flex: 0 0 auto !important; width: 112px !important; height: 112px !important; - border-radius: 14px !important; + border-radius: 4px !important; overflow: hidden !important; position: relative !important; cursor: pointer !important; @@ -2395,70 +2401,68 @@ function RemoteFunctions(config = {}) { } .phoenix-ribbon-search { - display: flex !important; - align-items: stretch !important; - border-radius: 6px !important; margin-left: 8px !important; - border: 1px solid rgba(255,255,255,0.14) !important; - } - - .phoenix-ribbon-search:hover { - border: 1px solid rgba(0, 0, 0, 0.24) !important; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important; - } - - .phoenix-ribbon-search:focus-within { - border: 1px solid rgba(0, 0, 0, 0.24) !important; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important; + flex: 1 !important; + max-width: 200px !important; + position: relative !important; } .phoenix-ribbon-search input { - background: transparent !important; - border: none !important; + width: 100% !important; + height: 27px !important; + padding: 5px 32px 5px 5px !important; + box-sizing: border-box !important; + background: #555555 !important; + border: 1px solid #202020 !important; + border-radius: 3px !important; + color: #fff !important; + font-size: 13px !important; outline: none !important; - color: #c5c5c5 !important; - width: 150px !important; - padding: 4px 8px !important; - border-radius: 4px 0 0 4px !important; - transition: background 0.2s ease !important; - } - - .phoenix-ribbon-search input:focus { - background: rgba(255, 255, 255, 0.03) !important; } .phoenix-ribbon-search input::placeholder { - color: #a0a0a0 !important; - opacity: 0.7 !important; + color: #b4b4b4 !important; } .phoenix-ribbon-search input::-webkit-input-placeholder { - color: #a0a0a0 !important; - opacity: 0.7 !important; + color: #b4b4b4 !important; } .phoenix-ribbon-search input::-moz-placeholder { - color: #a0a0a0 !important; - opacity: 0.7 !important; + color: #b4b4b4 !important; + } + + .phoenix-ribbon-search input:focus { + border: 1px solid #2893ef !important; + box-shadow: 0 0 0 1px #94ceff !important; } .phoenix-ribbon-search-btn { + position: absolute !important; + right: 2px !important; + top: 50% !important; + transform: translateY(-50%) !important; background: transparent !important; border: 1px solid transparent !important; - border-left: 1px solid gray !important; color: #a0a0a0 !important; + border-radius: 2px !important; cursor: pointer !important; - padding: 2px 6px !important; - border-radius: 0 4px 4px 0 !important; - font-size: 12px !important; - font-weight: 500 !important; + padding: 4px !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; transition: all 0.2s ease !important; - margin-left: 0 !important; + height: 25px !important; + width: 25px !important; } - .phoenix-ribbon-search-btn:hover { - border: 1px solid rgba(0, 0, 0, 0.24) !important; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important; + .phoenix-ribbon-search-btn:hover:not(:disabled) { + background: rgba(255, 255, 255, 0.1) !important; + } + + .phoenix-ribbon-search-btn:disabled { + opacity: 0.3 !important; + cursor: not-allowed !important; } .phoenix-ribbon-select { @@ -2645,7 +2649,9 @@ function RemoteFunctions(config = {}) {
@@ -2664,7 +2664,7 @@ function RemoteFunctions(config = {}) { -
diff --git a/src/LiveDevelopment/main.js b/src/LiveDevelopment/main.js index c5ac3a6a8b..061c186ec3 100644 --- a/src/LiveDevelopment/main.js +++ b/src/LiveDevelopment/main.js @@ -89,7 +89,8 @@ define(function main(require, exports, module) { imageGalleryLoadingInitial: Strings.LIVE_DEV_IMAGE_GALLERY_LOADING_INITIAL, imageGalleryLoadingMore: Strings.LIVE_DEV_IMAGE_GALLERY_LOADING_MORE, imageGalleryNoImages: Strings.LIVE_DEV_IMAGE_GALLERY_NO_IMAGES, - imageGalleryLoadError: Strings.LIVE_DEV_IMAGE_GALLERY_LOAD_ERROR + imageGalleryLoadError: Strings.LIVE_DEV_IMAGE_GALLERY_LOAD_ERROR, + imageGalleryClose: Strings.LIVE_DEV_IMAGE_GALLERY_CLOSE } }; // Status labels/styles are ordered: error, not connected, progress1, progress2, connected. diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index e6c14a3ada..94cd36c4c0 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -199,6 +199,7 @@ define({ "LIVE_DEV_IMAGE_GALLERY_LOADING_MORE": "Loading...", "LIVE_DEV_IMAGE_GALLERY_NO_IMAGES": "No images found", "LIVE_DEV_IMAGE_GALLERY_LOAD_ERROR": "Failed to load images", + "LIVE_DEV_IMAGE_GALLERY_CLOSE": "Close", "LIVE_DEV_IMAGE_FOLDER_DIALOG_TITLE": "Select Folder to Save Image", "LIVE_DEV_IMAGE_FOLDER_DIALOG_DESCRIPTION": "Choose where to download the image:", "LIVE_DEV_IMAGE_FOLDER_DIALOG_PLACEHOLDER": "Type folder path (e.g., assets/images/)", From 6b49fe16e1b0d405e3a1c90c2004976ee5751609 Mon Sep 17 00:00:00 2001 From: Pluto Date: Sat, 25 Oct 2025 20:45:45 +0530 Subject: [PATCH 03/37] refactor: use ellipsis char instead of three dots --- src/nls/root/strings.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index 94cd36c4c0..2022a08e7a 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -193,10 +193,10 @@ define({ "LIVE_DEV_IMAGE_GALLERY_USE_IMAGE": "Use this image", "LIVE_DEV_IMAGE_GALLERY_SELECT_FROM_COMPUTER": "Select image from computer", "LIVE_DEV_IMAGE_GALLERY_SELECT_DOWNLOAD_FOLDER": "Choose image download folder", - "LIVE_DEV_IMAGE_GALLERY_SEARCH_PLACEHOLDER": "Search images...", + "LIVE_DEV_IMAGE_GALLERY_SEARCH_PLACEHOLDER": "Search images\u2026", "LIVE_DEV_IMAGE_GALLERY_SEARCH_BUTTON": "Search", - "LIVE_DEV_IMAGE_GALLERY_LOADING_INITIAL": "Loading images...", - "LIVE_DEV_IMAGE_GALLERY_LOADING_MORE": "Loading...", + "LIVE_DEV_IMAGE_GALLERY_LOADING_INITIAL": "Loading images\u2026", + "LIVE_DEV_IMAGE_GALLERY_LOADING_MORE": "Loading\u2026", "LIVE_DEV_IMAGE_GALLERY_NO_IMAGES": "No images found", "LIVE_DEV_IMAGE_GALLERY_LOAD_ERROR": "Failed to load images", "LIVE_DEV_IMAGE_GALLERY_CLOSE": "Close", From 81eb0f5fe06cdeb1e700448c368abfa3cb111228 Mon Sep 17 00:00:00 2001 From: Pluto Date: Sat, 25 Oct 2025 20:55:48 +0530 Subject: [PATCH 04/37] fix: image gallery nav buttons styling --- .../BrowserScripts/RemoteFunctions.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js index dda2693cce..bc772e4c01 100644 --- a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js +++ b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js @@ -2283,7 +2283,7 @@ function RemoteFunctions(config = {}) { .phoenix-ribbon-row { display: flex !important; - gap: 4px !important; + gap: 5px !important; } .phoenix-ribbon-thumb { @@ -2314,8 +2314,7 @@ function RemoteFunctions(config = {}) { .phoenix-ribbon-nav { position: absolute !important; - top: 58% !important; - transform: translateY(-50%) !important; + top: 50% !important; border-radius: 12px !important; border: 1px solid rgba(255,255,255,0.14) !important; color: #eaeaf0 !important; @@ -2326,26 +2325,26 @@ function RemoteFunctions(config = {}) { user-select: none !important; transition: all 0.2s ease !important; z-index: 2147483647 !important; - padding: 2px 12px 6px 12px !important; + padding: 0 12px 6px 12px !important; } .phoenix-ribbon-nav:hover { background: rgba(21,25,36,0.85) !important; border-color: rgba(255,255,255,0.25) !important; - transform: translateY(-50%) scale(1.05) !important; + transform: scale(1.05) !important; box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important; } .phoenix-ribbon-nav:active { - transform: translateY(-50%) scale(0.95) !important; + transform: scale(0.95) !important; } .phoenix-ribbon-nav.left { - left: 18px !important; + left: 15px !important; } .phoenix-ribbon-nav.right { - right: 18px !important; + right: 15px !important; } .phoenix-ribbon-loading { From 15d209bc24246aac35c97d9cd79c085078da1099 Mon Sep 17 00:00:00 2001 From: Pluto Date: Sat, 25 Oct 2025 21:49:10 +0530 Subject: [PATCH 05/37] fix: image flicker issue --- .../BrowserScripts/RemoteFunctions.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js index bc772e4c01..b1163af918 100644 --- a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js +++ b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js @@ -2926,6 +2926,7 @@ function RemoteFunctions(config = {}) { _attachEventHandlers: function() { const ribbonContainer = this._shadow.querySelector('.phoenix-image-ribbon'); + const ribbonStrip = this._shadow.querySelector('.phoenix-ribbon-strip'); const searchInput = this._shadow.querySelector('.phoenix-ribbon-search input'); const searchButton = this._shadow.querySelector('.phoenix-ribbon-search-btn'); const closeButton = this._shadow.querySelector('.phoenix-ribbon-close'); @@ -3021,6 +3022,13 @@ function RemoteFunctions(config = {}) { }); } + // Restore original image when mouse leaves the entire ribbon strip + if (ribbonStrip) { + ribbonStrip.addEventListener('mouseleave', () => { + this.element.src = this._originalImageSrc; + }); + } + // Prevent clicks anywhere inside the ribbon from bubbling up if (ribbonContainer) { ribbonContainer.addEventListener('click', (e) => { @@ -3069,11 +3077,6 @@ function RemoteFunctions(config = {}) { this.element.src = image.url || image.thumb_url; }); - // show original image when hover ends - thumbDiv.addEventListener('mouseleave', () => { - this.element.src = this._originalImageSrc; - }); - // attribution overlay, we show this only in the image ribbon gallery const attribution = window.document.createElement('div'); attribution.className = 'phoenix-ribbon-attribution'; From c4e7553c9c562b3c95f6fc5d95600164e6eb950a Mon Sep 17 00:00:00 2001 From: Pluto Date: Sun, 2 Nov 2025 16:40:33 +0530 Subject: [PATCH 06/37] refactor: modern image gallery UI --- .../BrowserScripts/RemoteFunctions.js | 594 ++++++++---------- 1 file changed, 277 insertions(+), 317 deletions(-) diff --git a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js index b1163af918..9099a0eeeb 100644 --- a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js +++ b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js @@ -1356,9 +1356,9 @@ function RemoteFunctions(config = {}) { folderSettings: ` - + - `, + `, close: ` @@ -2252,389 +2252,338 @@ function RemoteFunctions(config = {}) { this._shadow.innerHTML = ` -
-
-
-
- -
- - -
+ + +