diff --git a/CHANGES.md b/CHANGES.md index 394294470c..10df49f45d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -82,6 +82,7 @@ - Fix export button width on inspect tab [Taiga #11394](https://tree.taiga.io/project/penpot/issue/11394) - Fix stroke width token application [Taiga #11724](https://tree.taiga.io/project/penpot/issue/11724) - Fix number token application on shape [Taiga #11331](https://tree.taiga.io/project/penpot/task/11331) +- Fix auto height is fixed in the HTML inspect tab for text elements [Taiga #11680](https://tree.taiga.io/project/penpot/task/11680) ## 2.8.1 diff --git a/backend/src/app/rpc/commands/files_thumbnails.clj b/backend/src/app/rpc/commands/files_thumbnails.clj index 5b9ae88573..3acac54d46 100644 --- a/backend/src/app/rpc/commands/files_thumbnails.clj +++ b/backend/src/app/rpc/commands/files_thumbnails.clj @@ -185,7 +185,7 @@ [:map {:title "PartialFile"} [:id ::sm/uuid] [:revn {:min 0} ::sm/int] - [:page :any]]) + [:page [:map-of :keyword ::sm/any]]]) (sv/defmethod ::get-file-data-for-thumbnail "Retrieves the data for generate the thumbnail of the file. Used diff --git a/common/src/app/common/files/changes.cljc b/common/src/app/common/files/changes.cljc index 612f040cf7..afd1128e8a 100644 --- a/common/src/app/common/files/changes.cljc +++ b/common/src/app/common/files/changes.cljc @@ -419,7 +419,14 @@ [:type [:= :set-token-set]] [:set-name :string] [:group? :boolean] - [:token-set [:maybe [:fn ctob/token-set?]]]]] + + ;; FIXME: we should not pass private types as part of changes + ;; protocol, the changes protocol should reflect a + ;; method/protocol for perform surgical operations on file data, + ;; this has nothing todo with internal types of a file data + ;; structure. + [:token-set {:gen/gen (sg/generator ctob/schema:token-set)} + [:maybe [:fn ctob/token-set?]]]]] [:set-token [:map {:title "SetTokenChange"} diff --git a/common/src/app/common/types/tokens_lib.cljc b/common/src/app/common/types/tokens_lib.cljc index afbb104484..8cf5b946fa 100644 --- a/common/src/app/common/types/tokens_lib.cljc +++ b/common/src/app/common/types/tokens_lib.cljc @@ -228,6 +228,10 @@ :modified-at modified-at :tokens tokens}) + #?@(:clj + [json/JSONWriter + (-write [this writter options] (json/-write (datafy this) writter options))]) + INamedItem (get-name [_] name) @@ -363,7 +367,9 @@ (declare make-token-set) (def schema:token-set - (sm/required-keys schema:token-set-attrs)) + [:schema {:gen/gen (->> (sg/generator schema:token-set-attrs) + (sg/fmap #(make-token-set %)))} + (sm/required-keys schema:token-set-attrs)]) (sm/register! ::token-set schema:token-set) ;; need to register for the recursive schema of token-sets diff --git a/frontend/src/app/main/ui/releases/v2_9.cljs b/frontend/src/app/main/ui/releases/v2_9.cljs index 47f4183117..600df72665 100644 --- a/frontend/src/app/main/ui/releases/v2_9.cljs +++ b/frontend/src/app/main/ui/releases/v2_9.cljs @@ -74,42 +74,12 @@ [:& c/navigation-bullets {:slide slide :navigate navigate - :total 3}] + :total 2}] [:button {:on-click next :class (stl/css :next-btn)} "Continue"]]]]]] 1 - [:div {:class (stl/css-case :modal-overlay true)} - [:div.animated {:class klass} - [:div {:class (stl/css :modal-container)} - [:img {:src "images/features/2.9-overrides.gif" - :class (stl/css :start-image) - :border "0" - :alt "Component text overrides"}] - - [:div {:class (stl/css :modal-content)} - [:div {:class (stl/css :modal-header)} - [:h1 {:class (stl/css :modal-title)} - "Component text overrides"]] - - [:div {:class (stl/css :feature)} - [:p {:class (stl/css :feature-content)} - "You can now edit the text content independently from its properties—such as color, effects, font size, or weight—allowing you to update the wording while preserving the styling."] - - [:p {:class (stl/css :feature-content)} - "This change (inspired by community feedback) greatly improves consistency, predictability, and control when working with texts in components."]] - - [:div {:class (stl/css :navigation)} - [:& c/navigation-bullets - {:slide slide - :navigate navigate - :total 3}] - - [:button {:on-click next - :class (stl/css :next-btn)} "Continue"]]]]]] - - 2 [:div {:class (stl/css-case :modal-overlay true)} [:div.animated {:class klass} [:div {:class (stl/css :modal-container)} @@ -135,7 +105,7 @@ [:& c/navigation-bullets {:slide slide :navigate navigate - :total 3}] + :total 2}] [:button {:on-click finish :class (stl/css :next-btn)} "Let's go"]]]]]]))) diff --git a/frontend/src/app/main/ui/settings/subscription.cljs b/frontend/src/app/main/ui/settings/subscription.cljs index 982b88c214..9c62837345 100644 --- a/frontend/src/app/main/ui/settings/subscription.cljs +++ b/frontend/src/app/main/ui/settings/subscription.cljs @@ -150,7 +150,16 @@ :class (stl/css :input-field)}]] [:div {:class (stl/css :editors-cost)} [:span {:class (stl/css :modal-text-small)} - (tr "subscription.settings.management.dialog.price-month" (or (get-in @form [:clean-data :min-members]) 0))] + (when (> (get-in @form [:clean-data :min-members]) 25) + [:> i18n/tr-html* + {:class (stl/css :modal-text-cap) + :tag-name "span" + :content (tr "subscription.settings.management.dialog.price-month" "175")}]) + [:> i18n/tr-html* + {:class (stl/css-case :text-strikethrough (> (get-in @form [:clean-data :min-members]) 25)) + :tag-name "span" + :content (tr "subscription.settings.management.dialog.price-month" + (* 7 (or (get-in @form [:clean-data :min-members]) 0)))}]] [:span {:class (stl/css :modal-text-small)} (tr "subscription.settings.management.dialog.payment-explanation")]]] diff --git a/frontend/src/app/main/ui/settings/subscription.scss b/frontend/src/app/main/ui/settings/subscription.scss index b69ea7a115..43b8df9804 100644 --- a/frontend/src/app/main/ui/settings/subscription.scss +++ b/frontend/src/app/main/ui/settings/subscription.scss @@ -199,6 +199,20 @@ @include t.use-typography("body-small"); } +.modal-text-cap { + margin-inline-end: var(--sp-s); +} + +.text-strikethrough { + text-decoration: line-through; +} + +.modal-text-small strong, +.text-strikethrough strong, +.modal-text-cap strong { + font-weight: $fw700; +} + .modal-content, .modal-end { color: var(--color-foreground-secondary); diff --git a/frontend/src/app/util/code_gen/style_css_values.cljs b/frontend/src/app/util/code_gen/style_css_values.cljs index c084286799..13ee25bc83 100644 --- a/frontend/src/app/util/code_gen/style_css_values.cljs +++ b/frontend/src/app/util/code_gen/style_css_values.cljs @@ -116,13 +116,17 @@ (let [root? (contains? (:root-shapes options) (:id shape))] (if (and root? (ctl/any-layout? shape)) :fill - (get-shape-size shape objects :width)))) + ;; Don't set fixed width for auto-width text shapes + (when-not (and (cfh/text-shape? shape) (= (:grow-type shape) :auto-width)) + (get-shape-size shape objects :width))))) (defmethod get-value :height [_ shape objects options] (let [root? (contains? (:root-shapes options) (:id shape))] (when-not (and root? (ctl/any-layout? shape)) - (get-shape-size shape objects :height)))) + ;; Don't set fixed height for auto-height text shapes + (when-not (and (cfh/text-shape? shape) (= (:grow-type shape) :auto-height)) + (get-shape-size shape objects :height))))) (defmethod get-value :flex-grow [_ shape _ options] diff --git a/frontend/translations/en.po b/frontend/translations/en.po index 9fca23c57e..8543980822 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -4465,8 +4465,10 @@ msgid "subscription.settings.management.dialog.payment-explanation" msgstr "(No payment will be made now)" #: src/app/main/ui/settings/subscription.cljs:124 +#, markdown msgid "subscription.settings.management.dialog.price-month" -msgstr "$7 per editor/month x %s" +msgstr "" +"**$%s** per month" #: src/app/main/ui/settings/subscription.cljs:112 msgid "subscription.settings.management.dialog.select-editors" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index f37fe5a0c5..5e65fc17f2 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -4474,8 +4474,10 @@ msgid "subscription.settings.management.dialog.payment-explanation" msgstr "(Ahora no se efectuará ningún pago)" #: src/app/main/ui/settings/subscription.cljs:124 +#, markdown msgid "subscription.settings.management.dialog.price-month" -msgstr "$7 por editor/mes x %s" +msgstr "" +"**$%s** por mes" #: src/app/main/ui/settings/subscription.cljs:112 msgid "subscription.settings.management.dialog.select-editors"