mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
@@ -61,6 +61,7 @@
|
|||||||
- Keep color data when copying from info tab into CSS [Taiga #11144](https://tree.taiga.io/project/penpot/issue/11144)
|
- Keep color data when copying from info tab into CSS [Taiga #11144](https://tree.taiga.io/project/penpot/issue/11144)
|
||||||
- Update HSL values to modern syntax as defined in W3C CSS Color Module Level 4 [Taiga #11144](https://tree.taiga.io/project/penpot/issue/11144)
|
- Update HSL values to modern syntax as defined in W3C CSS Color Module Level 4 [Taiga #11144](https://tree.taiga.io/project/penpot/issue/11144)
|
||||||
- Fix main component receives focus and is selected when using 'Show Main Component' [Taiga #11402](https://tree.taiga.io/project/penpot/issue/11402)
|
- Fix main component receives focus and is selected when using 'Show Main Component' [Taiga #11402](https://tree.taiga.io/project/penpot/issue/11402)
|
||||||
|
- Fix UI theme selection from main menu [Taiga #11567](https://tree.taiga.io/project/penpot/issue/11567)
|
||||||
- Fix duplicating pages with mainInstance shapes nested inside groups [Taiga #10774](https://tree.taiga.io/project/penpot/issue/10774)
|
- Fix duplicating pages with mainInstance shapes nested inside groups [Taiga #10774](https://tree.taiga.io/project/penpot/issue/10774)
|
||||||
- Fix ESC key not closing Add/Manage Libraries modal [Taiga #11523](https://tree.taiga.io/project/penpot/issue/11523)
|
- Fix ESC key not closing Add/Manage Libraries modal [Taiga #11523](https://tree.taiga.io/project/penpot/issue/11523)
|
||||||
- Fix copying a shadow color from info tab [Taiga #11211](https://tree.taiga.io/project/penpot/issue/11211)
|
- Fix copying a shadow color from info tab [Taiga #11211](https://tree.taiga.io/project/penpot/issue/11211)
|
||||||
@@ -73,15 +74,16 @@
|
|||||||
- Fix the context menu always closes after any action [Taiga #11624](https://tree.taiga.io/project/penpot/issue/11624)
|
- Fix the context menu always closes after any action [Taiga #11624](https://tree.taiga.io/project/penpot/issue/11624)
|
||||||
- Fix X & Y position do not sincronize with tokens [Taiga #11617](https://tree.taiga.io/project/penpot/issue/11617)
|
- Fix X & Y position do not sincronize with tokens [Taiga #11617](https://tree.taiga.io/project/penpot/issue/11617)
|
||||||
- Fix tooltip position after first time [Taiga #11688](https://tree.taiga.io/project/penpot/issue/11688)
|
- Fix tooltip position after first time [Taiga #11688](https://tree.taiga.io/project/penpot/issue/11688)
|
||||||
|
- 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)
|
||||||
|
|
||||||
## 2.8.1 (Unreleased)
|
## 2.8.1
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
- Fix unexpected exception on processing old texts [Github #6889](https://github.com/penpot/penpot/pull/6889)
|
- Fix unexpected exception on processing old texts [Github #6889](https://github.com/penpot/penpot/pull/6889)
|
||||||
- Fix UI theme selection from main menu [Taiga #11567](https://tree.taiga.io/project/penpot/issue/11567)
|
|
||||||
- Add missing migration information to file snapshots [Github #686](https://github.com/penpot/penpot/pull/6864)
|
|
||||||
- Fix error on inspect tab when selecting multiple shapes [Taiga #11655](https://tree.taiga.io/project/penpot/issue/11655)
|
- Fix error on inspect tab when selecting multiple shapes [Taiga #11655](https://tree.taiga.io/project/penpot/issue/11655)
|
||||||
|
- Fix missing package for the penport_exporter Docker image [GitHub #7205](https://github.com/penpot/penpot/issues/7025)
|
||||||
|
|
||||||
## 2.8.0
|
## 2.8.0
|
||||||
|
|
||||||
|
|||||||
20
common/src/app/common/types/stroke.cljc
Normal file
20
common/src/app/common/types/stroke.cljc
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
;;
|
||||||
|
;; Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
|
(ns app.common.types.stroke
|
||||||
|
(:require
|
||||||
|
[app.common.colors :as clr]))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; SCHEMAS
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(def default-stroke
|
||||||
|
{:stroke-alignment :inner
|
||||||
|
:stroke-style :solid
|
||||||
|
:stroke-color clr/black
|
||||||
|
:stroke-opacity 1
|
||||||
|
:stroke-width 1})
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
[app.common.files.tokens :as cft]
|
[app.common.files.tokens :as cft]
|
||||||
[app.common.types.shape.layout :as ctsl]
|
[app.common.types.shape.layout :as ctsl]
|
||||||
[app.common.types.shape.radius :as ctsr]
|
[app.common.types.shape.radius :as ctsr]
|
||||||
|
[app.common.types.stroke :as cts]
|
||||||
[app.common.types.text :as txt]
|
[app.common.types.text :as txt]
|
||||||
[app.common.types.token :as ctt]
|
[app.common.types.token :as ctt]
|
||||||
[app.common.types.tokens-lib :as ctob]
|
[app.common.types.tokens-lib :as ctob]
|
||||||
@@ -93,8 +94,10 @@
|
|||||||
(when (number? value)
|
(when (number? value)
|
||||||
(dwsh/update-shapes shape-ids
|
(dwsh/update-shapes shape-ids
|
||||||
(fn [shape]
|
(fn [shape]
|
||||||
(when (seq (:strokes shape))
|
(if (seq (:strokes shape))
|
||||||
(assoc-in shape [:strokes 0 :stroke-width] value)))
|
(assoc-in shape [:strokes 0 :stroke-width] value)
|
||||||
|
(let [stroke (assoc cts/default-stroke :stroke-width value)]
|
||||||
|
(assoc shape :strokes [stroke]))))
|
||||||
{:reg-objects? true
|
{:reg-objects? true
|
||||||
:ignore-touched true
|
:ignore-touched true
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
|
|||||||
@@ -101,5 +101,5 @@
|
|||||||
@extend .button-secondary;
|
@extend .button-secondary;
|
||||||
@include uppercaseTitleTipography;
|
@include uppercaseTitleTipography;
|
||||||
height: $s-32;
|
height: $s-32;
|
||||||
width: $s-252;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
(:require
|
(:require
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
[app.common.types.color :as clr]
|
[app.common.types.stroke :as cts]
|
||||||
[app.main.data.workspace :as udw]
|
[app.main.data.workspace :as udw]
|
||||||
[app.main.data.workspace.colors :as dc]
|
[app.main.data.workspace.colors :as dc]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
@@ -157,11 +157,7 @@
|
|||||||
on-add-stroke
|
on-add-stroke
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(st/emit! (udw/trigger-bounding-box-cloaking ids))
|
(st/emit! (udw/trigger-bounding-box-cloaking ids))
|
||||||
(st/emit! (dc/add-stroke ids {:stroke-alignment :inner
|
(st/emit! (dc/add-stroke ids cts/default-stroke))
|
||||||
:stroke-style :solid
|
|
||||||
:stroke-color clr/black
|
|
||||||
:stroke-opacity 1
|
|
||||||
:stroke-width 1}))
|
|
||||||
(when (not (some? (seq strokes))) (open-content)))
|
(when (not (some? (seq strokes))) (open-content)))
|
||||||
|
|
||||||
disable-drag (mf/use-state false)
|
disable-drag (mf/use-state false)
|
||||||
|
|||||||
@@ -452,9 +452,9 @@
|
|||||||
(t/testing "token got applied to rect with stroke and shape stroke got updated"
|
(t/testing "token got applied to rect with stroke and shape stroke got updated"
|
||||||
(t/is (= (:stroke-width (:applied-tokens rect-with-stroke')) (:name token-target')))
|
(t/is (= (:stroke-width (:applied-tokens rect-with-stroke')) (:name token-target')))
|
||||||
(t/is (= (get-in rect-with-stroke' [:strokes 0 :stroke-width]) 10)))
|
(t/is (= (get-in rect-with-stroke' [:strokes 0 :stroke-width]) 10)))
|
||||||
(t/testing "token got applied to rect without stroke but shape didnt get updated"
|
(t/testing "token got applied to rect without stroke and shape stroke got updated"
|
||||||
(t/is (= (:stroke-width (:applied-tokens rect-without-stroke')) (:name token-target')))
|
(t/is (= (:stroke-width (:applied-tokens rect-without-stroke')) (:name token-target')))
|
||||||
(t/is (empty? (:strokes rect-without-stroke')))))))))))
|
(t/is (= (get-in rect-without-stroke' [:strokes 0 :stroke-width]) 10))))))))))
|
||||||
|
|
||||||
(t/deftest test-apply-font-size
|
(t/deftest test-apply-font-size
|
||||||
(t/testing "applies font-size token and updates the text font-size"
|
(t/testing "applies font-size token and updates the text font-size"
|
||||||
|
|||||||
Reference in New Issue
Block a user