From 90f857c697f143a8f0f1ead1c9b34e73071c1e9c Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 25 Nov 2026 00:59:43 +0100 Subject: [PATCH] :lipstick: Draw the reading options box only in its dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reading options of the whole text, in the Furigana group, sit among the other rows of the language view and need no box. The box now marks them only when the ⋮ button of a selection opens them below its reading input. AI-assisted-by: claude-opus-5-5 --- .../sidebar/options/menus/text_cjk_controls.cljs | 13 ++++++++----- .../sidebar/options/menus/text_cjk_controls.scss | 6 +++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text_cjk_controls.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text_cjk_controls.cljs index b0926fad89..23306fde62 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text_cjk_controls.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text_cjk_controls.cljs @@ -545,16 +545,18 @@ (mf/defc ruby-presentation-grid* "Size and side, then alignment and overhang of the readings, two to a - row in a light box. Side names both writing modes, so it reads the same - in horizontal and vertical text." - [{:keys [values on-change on-blur class]}] + row. `boxed` draws them in a light box, to set them apart from the rows + around them when a button opens them. Side names both writing modes, so + it reads the same in horizontal and vertical text." + [{:keys [values on-change on-blur class boxed]}] (let [props (mf/props {:values values :on-change on-change :on-blur on-blur}) options (mf/with-memo [] {:ruby-size (ruby-size-options tr) :ruby-side (ruby-side-options tr) :ruby-align (ruby-align-options tr) :ruby-overhang (ruby-overhang-options tr)})] - [:div {:class [class (stl/css :ruby-presentation-grid)] + [:div {:class [class (stl/css-case :ruby-presentation-grid true + :ruby-presentation-grid-boxed boxed)] :data-testid "ruby-presentation-options"} [:> ruby-presentation-cell* (mf/spread-props props {:attr :ruby-size :label (tr "workspace.options.text-options.ruby-size") @@ -591,4 +593,5 @@ (when ^boolean open? [:> ruby-presentation-grid* {:values values :on-change on-change - :on-blur on-blur}])])) + :on-blur on-blur + :boxed true}])])) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text_cjk_controls.scss b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text_cjk_controls.scss index aad451fb4e..6f02fec7e3 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text_cjk_controls.scss +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text_cjk_controls.scss @@ -123,11 +123,15 @@ color: var(--color-foreground-error); } -// The reading options, two to a row in a light box. +// The reading options, two to a row. .ruby-presentation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-s) var(--sp-xs); +} + +// In a light box when a button opens them below the reading input. +.ruby-presentation-grid-boxed { padding: var(--sp-s); border: $b-1 solid var(--color-background-quaternary); border-radius: $br-8;