Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Alejandro Alonso 2026-08-12 15:11:31 +02:00
commit 201b51e8c5
4 changed files with 30 additions and 11 deletions

View File

@ -480,7 +480,8 @@
[:li {:class (stl/css-case :grid-item true [:li {:class (stl/css-case :grid-item true
:project-thumbnail true :project-thumbnail true
:library-item library-view?)} :library-item library-view?)}
[:div {:class (stl/css-case :is-selected selected?) [:div {:class (stl/css-case :is-selected selected?
:grid-item-button true)
:ref node-ref :ref node-ref
:role "button" :role "button"
:title (:name file) :title (:name file)

View File

@ -180,6 +180,12 @@ $thumbnail-default-height: px2rem(168);
} }
} }
.grid-item-button {
inline-size: 100%;
block-size: 100%;
padding: 0 px2rem(6);
}
.project-thumbnail-actions { .project-thumbnail-actions {
align-items: center; align-items: center;
display: flex; display: flex;
@ -328,7 +334,7 @@ $thumbnail-default-height: px2rem(168);
// LIBRARY // LIBRARY
.library-thumbnail { .library-thumbnail {
border-radius: $br-4; border-radius: $br-8;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
background-color: var(--color-background-tertiary); background-color: var(--color-background-tertiary);

View File

@ -19,6 +19,7 @@
[app.main.data.team :as dtm] [app.main.data.team :as dtm]
[app.main.refs :as refs] [app.main.refs :as refs]
[app.main.repo :as rp] [app.main.repo :as rp]
[app.main.router :as rt]
[app.main.store :as st] [app.main.store :as st]
[app.main.ui.alert] [app.main.ui.alert]
[app.main.ui.components.dropdown :refer [dropdown]] [app.main.ui.components.dropdown :refer [dropdown]]
@ -87,6 +88,7 @@
route (mf/deref refs/route) route (mf/deref refs/route)
invite-email (-> route :query-params :invite-email) invite-email (-> route :query-params :invite-email)
team-id (:id team)
members-section? (= section :dashboard-team-members) members-section? (= section :dashboard-team-members)
settings-section? (= section :dashboard-team-settings) settings-section? (= section :dashboard-team-settings)
@ -101,15 +103,20 @@
on-invite-member on-invite-member
(mf/use-fn (mf/use-fn
(mf/deps team invite-email) (mf/deps team-id invite-email)
(fn [] (fn []
(st/emit! (dtm/check-and-invite-members {:team-id (:id team) (st/emit! (dtm/check-and-invite-members {:team-id team-id
:origin :team :origin :team
:invite-email invite-email}))))] :invite-email invite-email}))))]
(mf/with-effect [team invite-email] ;; Depend on `team-id` (stable) rather than `team` (a map whose
(when invite-email ;; reference changes on every teams/members fetch) and clear
(on-invite-member))) ;; `invite-email` from the URL once consumed, so this can't
;; keep re-triggering `check-and-invite-members` in a loop.
(mf/with-effect [team-id invite-email]
(when (and team-id invite-email)
(on-invite-member)
(st/emit! (rt/nav (get-in route [:data :name]) {:team-id team-id} {::rt/replace true}))))
[:header {:class (stl/css :dashboard-header :team) :data-testid "dashboard-header"} [:header {:class (stl/css :dashboard-header :team) :data-testid "dashboard-header"}
[:div {:class (stl/css :dashboard-title)} [:div {:class (stl/css :dashboard-title)}

View File

@ -353,10 +353,15 @@
:text-direction (sr/untranslate-text-direction (text-editor-get-style-property text-direction-state text-direction-value)) :text-direction (sr/untranslate-text-direction (text-editor-get-style-property text-direction-state text-direction-value))
:text-decoration (sr/untranslate-text-decoration (text-editor-get-style-property text-decoration-state text-decoration-value)) :text-decoration (sr/untranslate-text-decoration (text-editor-get-style-property text-decoration-state text-decoration-value))
:text-transform (sr/untranslate-text-transform (text-editor-get-style-property text-transform-state text-transform-value)) :text-transform (sr/untranslate-text-transform (text-editor-get-style-property text-transform-state text-transform-value))
:line-height (text-editor-get-style-property line-height-state line-height-value) ;; WASM reports size/weight as numbers, but the rest of Penpot (and the backend schema) expects strings.
:letter-spacing (text-editor-get-style-property letter-spacing-state letter-spacing-value) :line-height (let [height (text-editor-get-style-property line-height-state line-height-value)]
:font-size (text-editor-get-style-property font-size-state font-size-value) (if (= height :multiple) height (str height)))
:font-weight (text-editor-get-style-property font-weight-state font-weight-value) :letter-spacing (let [spacing (text-editor-get-style-property letter-spacing-state letter-spacing-value)]
(if (= spacing :multiple) spacing (str spacing)))
:font-size (let [size (text-editor-get-style-property font-size-state font-size-value)]
(if (= size :multiple) size (str size)))
:font-weight (let [weight (text-editor-get-style-property font-weight-state font-weight-value)]
(if (= weight :multiple) weight (str weight)))
:font-style font-style-value :font-style font-style-value
:font-family (text-editor-get-style-property font-family-id-state font-id) :font-family (text-editor-get-style-property font-family-id-state font-id)
:font-id (text-editor-get-style-property font-family-id-state font-id) :font-id (text-editor-get-style-property font-family-id-state font-id)