From 44c926cbab45c34e9085984ee5401343c8a28b12 Mon Sep 17 00:00:00 2001 From: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> Date: Sun, 2 Aug 2026 19:36:57 +0530 Subject: [PATCH 1/2] fix: plugin page ui for keywords and note --- src/pages/plugin/plugin.scss | 173 +++++++++++++++++++++++++------- src/pages/plugin/plugin.view.js | 33 +++--- 2 files changed, 155 insertions(+), 51 deletions(-) diff --git a/src/pages/plugin/plugin.scss b/src/pages/plugin/plugin.scss index 7c79840f69..36b076662a 100644 --- a/src/pages/plugin/plugin.scss +++ b/src/pages/plugin/plugin.scss @@ -24,6 +24,8 @@ } .plugin-info { + min-width: 0; + .title-wrapper { display: flex; align-items: center; @@ -135,6 +137,27 @@ } } + .keywords { + display: flex; + flex-wrap: wrap; + gap: 6px; + margin-top: 14px; + + .keyword { + max-width: 100%; + padding: 5px 9px; + overflow-wrap: anywhere; + border: 1px solid var(--link-text-color); + border-color: color-mix(in srgb, var(--link-text-color) 25%, transparent); + border-radius: 999px; + background: var(--popup-background-color); + background: color-mix(in srgb, var(--link-text-color) 10%, transparent); + color: var(--link-text-color); + font-size: 12px; + line-height: 1.25; + } + } + .legacy-editor-warning { display: inline-flex; align-items: center; @@ -158,12 +181,14 @@ } .action-buttons { - grid-column: 1/-1; display: flex; flex-wrap: wrap; + justify-content: flex-end; + align-items: flex-start; gap: 8px; + width: max-content; + max-width: min(260px, 30vw); - .info:not(.icon), .error { display: flex; color: rgb(255, 185, 92); @@ -176,16 +201,11 @@ } } - .info:not(.icon) { - color: inherit; - align-items: start; - text-align: left; - gap: 5px; - opacity: 0.8; - width: 100%; - } - .btn { + flex: 0 1 auto; + justify-content: center; + min-width: 112px; + min-height: 40px; padding: 8px 16px; border-radius: 6px; border: none; @@ -225,8 +245,37 @@ } } + .plugin-action-details { + grid-column: 2 / -1; + display: flex; + flex-wrap: wrap; + align-items: flex-start; + justify-content: space-between; + gap: 8px 20px; + min-width: 0; + margin-top: -8px; + + .info:not(.icon) { + display: flex; + flex: 1 1 320px; + align-items: flex-start; + gap: 5px; + min-width: 0; + color: inherit; + font-size: 0.8rem; + line-height: 1.4; + text-align: left; + opacity: 0.72; + + .icon { + flex: 0 0 auto; + } + } + } + .more-info-small { - text-align: center; + flex: 0 0 auto; + text-align: right; font-style: italic; font-size: 0.8rem; opacity: 0.8; @@ -255,28 +304,6 @@ padding: 0 0 24px; #overview { - .keywords { - display: flex; - gap: 6px; - flex-wrap: wrap; - margin-top: 16px; - position: relative; - - .keyword { - background: var(--popup-background-color); - background: color-mix(in srgb, - var(--link-text-color) 10%, - transparent); - color: var(--link-text-color); - padding: 6px 10px; - border-radius: 12px; - font-size: 13px; - transition: all 0.2s; - border: 1px solid var(--link-text-color); - border: 1px solid color-mix(in srgb, var(--link-text-color) 25%, transparent); - } - } - pre { margin: 16px 0; border-radius: 8px; @@ -463,9 +490,35 @@ justify-content: center; } - .btn { - flex: 1; + .plugin-info { + width: 100%; + } + + .plugin-header .action-buttons { + grid-column: 1; justify-content: center; + width: min(100%, 420px); + max-width: none; + + .btn { + flex: 1 1 140px; + width: auto; + } + } + + .plugin-header .plugin-action-details { + grid-column: 1; + width: 100%; + margin-top: -4px; + + .info:not(.icon) { + flex-basis: 100%; + } + + .more-info-small { + width: 100%; + text-align: center; + } } .tabs { @@ -474,6 +527,52 @@ padding: 0 24px; } } + + @media (max-width: 420px) { + padding-inline: 16px; + + .plugin-header { + gap: 16px; + + .plugin-icon { + width: 72px; + height: 72px; + border-radius: 14px; + } + + .plugin-info { + .title-wrapper { + gap: 8px; + + .plugin-name { + width: 100%; + font-size: 22px; + overflow-wrap: anywhere; + } + + .source-indicator { + position: static; + } + } + + .plugin-meta, + .metrics-row { + column-gap: 12px; + row-gap: 8px; + } + } + + .action-buttons .btn { + flex-basis: 100%; + } + } + + #plugin-tab .options { + margin-inline: -16px; + padding-inline: 8px; + font-size: 0.9rem; + } + } } .reviews-container { @@ -593,4 +692,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/pages/plugin/plugin.view.js b/src/pages/plugin/plugin.view.js index 10e7c76de4..89a8637713 100644 --- a/src/pages/plugin/plugin.view.js +++ b/src/pages/plugin/plugin.view.js @@ -80,6 +80,7 @@ export default (props) => { if (votesUp || votesDown) { rating = `${Math.round((votesUp / (votesUp + votesDown)) * 100)}%`; } + const showPurchaseWarning = !helpers.shouldAllowExternalPurchase(); const formatUpdatedDate = (dateString) => { if (!dateString) return null; @@ -173,20 +174,31 @@ export default (props) => { ) : null} + {Array.isArray(keywords) && keywords.length ? ( +