[pull] develop from penpot:develop#1042
Open
pull[bot] wants to merge 5768 commits intoMonogramm:developfrom
Open
[pull] develop from penpot:develop#1042pull[bot] wants to merge 5768 commits intoMonogramm:developfrom
pull[bot] wants to merge 5768 commits intoMonogramm:developfrom
Conversation
57c8838 to
058c20c
Compare
Add indexed-access-with-default in fill_test.cljc to cover the two-arity (nth fills i default) form on both valid and out-of-range indices, directly exercising the CLJS Fills -nth path fixed in 593cf125. Add segment-content->selrect-multi-line in path_data_test.cljc to cover content->selrect on a subpath with multiple consecutive line-to commands where move-p diverges from from-p, confirming the bounding box matches both the expected coordinates and the reference implementation; this guards the calculate-extremities fix in bb5a04c7. Add types-uniform-spread? in colors_test.cljc to cover app.common.types.color/uniform-spread?, which had no dedicated tests. Exercises the uniform case (via uniform-spread), the two-stop edge case, wrong-offset detection, and wrong-color detection. Signed-off-by: Andrey Antukh <niwi@niwi.nz>
The five functions interpolate-color, offset-spread, uniform-spread?, uniform-spread, and interpolate-gradient duplicated the canonical implementations in app.common.types.color. The copies in colors.cljc also contained two bugs: a division-by-zero in offset-spread when num=1, and a crash on nil idx in interpolate-gradient. All production callers already use app.common.types.color. The duplicate tests that exercised the old copies are removed; their coverage is absorbed into expanded tests under the types-* suite, including a new nil-idx guard test and a single-stop no-crash test. Signed-off-by: Andrey Antukh <niwi@niwi.nz>
Tests that exercise app.common.types.color were living inside common-tests.colors-test alongside the app.common.colors tests. Move them to common-tests.types.color-test so the test namespace mirrors the source namespace structure, consistent with the rest of the types/ test suite. The [app.common.types.color :as colors] require is removed from colors_test.cljc; the new file is registered in runner.cljc. Signed-off-by: Andrey Antukh <niwi@niwi.nz>
* ✨ Add delete and duplicate buttons to typography dialog Add delete and duplicate action buttons to the expanded typography editing panel, allowing users to quickly manage typographies without needing to close the panel and use the context menu. Fixes #5270 * ♻️ Use DS icon-button for typography dialog actions Address review feedback: replace raw `:button`/`:div` elements and deprecated-icon usage with the design system `icon-button*` and non-deprecated icons (`i/add`, `i/delete`, `i/tick`). * ♻️ Only show typography delete/duplicate buttons in assets sidebar `typography-entry` is reused from the right sidebar text options panel, where the delete and duplicate actions don't make sense. Add an `is-asset?` opt-in prop and gate the `on-delete`/`on-duplicate` handlers behind it, so the buttons only appear when the entry is rendered from the assets sidebar. * ♻️ Move typography delete/duplicate handlers next to their use site Refine the previous opt-in: instead of plumbing on-delete/on-duplicate function props through typography-entry, build them directly inside typography-advanced-options where they're actually rendered. The component now takes :file-id and :is-asset? and gates the action buttons on a single `show-actions?` flag. --------- Signed-off-by: eureka0928 <meobius123@gmail.com>
* 🔧 Validate only after propagation in tests * 💄 Enhance some component sync traces * 🔧 Add fake uuid generator for debugging * 🐛 Remove old feature of advancing references when reset changes Since long time ago, we only allow to reset changes in the top copy shape. In this case the near and the remote shapes are the same, so the advance-ref has no effect. * 🐛 Fix some bugs and add validations, repair and migrations Also added several utilities to debug and to create scripts that processes files * 🐛 Fix misplaced parenthesis passing propagate-fn to wrong function The :propagate-fn keyword argument was incorrectly placed inside the ths/get-shape call instead of being passed to tho/reset-overrides. This caused reset-overrides to never propagate component changes, making the test not validate what it intended. * 🐛 Accept and forward :include-deleted? in find-near-match Callers were passing :include-deleted? true but the parameter was not in the destructuring, so it was silently ignored and the function always hardcoded true. This made the API misleading and would cause incorrect behavior if called with :include-deleted? false. * 💄 Use set/union alias instead of fully-qualified clojure.set/union The namespace already requires [clojure.set :as set], so use the alias for consistency. * 🐛 Add tests for reset-overrides with and without propagate-fn Add two focused tests to comp_reset_test to cover the propagate-fn path in reset-overrides: - test-reset-with-propagation-updates-copies: verifies that resetting an override on a nested copy inside a main and supplying propagate-fn causes the canonical color to appear in all downstream copies. - test-reset-without-propagation-does-not-update-copies: regression guard for the misplaced-parenthesis bug; confirms that omitting propagate-fn leaves copies with the overridden value because the component sync never runs. --------- Co-authored-by: Andrey Antukh <niwi@niwi.nz>
Signed-off-by: Clayton <claytonlin1110@gmail.com>
The patch-object function was calling (dissoc object key value) when handling nil values. Since dissoc treats each argument after the map as a key to remove, this was also removing nil as a key from the map. The correct call is (dissoc object key).
The deep-mapm function was applying the mapping function twice on leaf entries (non-map, non-vector values): once when destructuring the entry, and again on the already-transformed result in the else branch. Now mfn is applied exactly once per entry.
The index-of-pred function used (nil? c) to detect end-of-collection, which caused premature termination when the collection contained nil values. Rewrite using (seq coll) / (next s) pattern to correctly distinguish between nil elements and end-of-sequence.
Replace (empty? items) + (rest items) with (seq items) + (next items) in enumerate. The seq/next pattern is idiomatic Clojure and avoids the overhead of empty? which internally calls seq and then negates.
The 3-arity of safe-subvec called (count v) in a let binding before checking (some? v). While (count nil) returns 0 in Clojure and does not crash, the nil guard was dead code. Restructure to check (some? v) first with an outer when, then compute size inside the guarded block.
The docstring claimed the function removes nil values in addition to the specified object, but the implementation only removes elements equal to the given object. Fix the docstring in both data.cljc and the local copy in files/changes.cljc.
The :else branch of diff-attr was calling (get m1 key) and (get m2 key) again, but v1 and v2 were already bound to those exact values. Reuse the existing bindings to avoid the extra lookups.
format-precision already returns a string, so wrapping its result in an additional (str ...) call was unnecessary.
* ✨ Add clipboard:read/write permissions to plugin system (#6980) * 🔧 Fix prettier formatting in clipboard permission files --------- Co-authored-by: wdeveloper16 <wdeveloer16@protonmail.com> Co-authored-by: Andrey Antukh <niwi@niwi.nz>
…9120) The viewer-side `obfuscate-email` helper used by `anonymize-member` when building share-link bundles called `clojure.string/split` on the raw email input and then on the extracted domain. Two failure modes: 1. When the stored email had no `@` (legacy data, LDAP-sourced UIDs, direct DB inserts, or fixtures that bypassed `::sm/email`), destructuring left `domain` bound to `nil` and the follow-up `(str/split nil "." 2)` raised `NullPointerException`. Because `obfuscate-email` runs inside `get-view-only-bundle`, the exception aborted the whole RPC response for share-link viewers, not just the field. 2. When the stored email used a single-label domain (`alice@localhost`), `(str/split "localhost" "." 2)` returned `["localhost"]`; destructuring bound `rest` to `nil` and the final `(str name "@****." rest)` produced a dangling-dot output `"****@****."` (nil coerces to empty in `str`). Guard both split calls with `(or x "")` so the chain is nil-safe, and emit the trailing `.<tld>` segment only when `rest` is present. Add three `deftest` groups covering the happy path, dotless domains, and malformed inputs (nil / empty / no-`@`), plus a CHANGES.md entry under the 2.17.0 Unreleased bugs-fixed section. Signed-off-by: Andrey Antukh <niwi@niwi.nz> Co-authored-by: Andrey Antukh <niwi@niwi.nz>
When a text element has a line-height coming from a design token, the value may be a number (e.g. 1.5) and fails frontend data validation expecting a string. Normalize line-height before creating the typography style so the operation succeeds without throwing an assertion error. Signed-off-by: juan-flores077 <toptalent399@gmail.com>
…9129) The plugin parser's parse-point returned a plain `{:x … :y …}` map, but shape interaction schemas (for example schema:open-overlay-interaction) require the attribute to be a `::gpt/point` record. `(instance? Point {:x 0 :y 0})` is false, so validation silently rejected plugin `addInteraction` calls that passed `manualPositionLocation`; only a console warning was produced. Change parse-point to return a `gpt/point` record via `gpt/point`. All three call sites (parser.cljs:open-overlay, plugins/page.cljs, plugins/comments.cljs) continue to work because Point records support the same `:x`/`:y` access plain maps do. Add a unit test that covers nil input and verifies the returned value satisfies `gpt/point?`. Github #8409 Signed-off-by: FairyPigDev <luislee3108@gmail.com> Signed-off-by: Andrey Antukh <niwi@niwi.nz> Co-authored-by: Andrey Antukh <niwi@niwi.nz>
* ✨ Show detailed messages on file import errors Signed-off-by: jsdevninja <topit89807@gmail.com> * ✨ Fix test * ✨ Fix build error --------- Signed-off-by: jsdevninja <topit89807@gmail.com>
…#9110) * ✨ Remove the need to navigate to page for deletion operation * 🐛 Fix multiple selection with applied-tokens on stroke-color * 🐛 Fix button position on page header --------- Co-authored-by: Andrey Antukh <niwi@niwi.nz>
🐛 Fix text.cljs error from staging merge
* ✨ Add nitrate api endpoints to get and cancel org invitations * ✨ MR changes
* 🐛 Fix CI * 🐛 Fix theme modal height
Closes #9108. The `case` expression in `get-info` (`backend/src/app/auth/oidc.clj`) dispatched on `:token` and `:userinfo` keywords, but the provider map's `:user-info-source` value is a string — both from config (the malli schema in `app.config` pins it to one of `"token"`, `"userinfo"`, `"auto"`) and from the hard-coded Google / GitHub provider maps (which already write `"userinfo"`). Strings never equal keywords in Clojure `case`, so every call fell through to the auto-fallback that prefers ID-token claims and only hits the UserInfo endpoint when claims are empty. The net effect: setting `PENPOT_OIDC_USER_INFO_SOURCE=userinfo` did nothing, and OIDC flows whose IdP requires the UserInfo endpoint (so claims come back empty/partial) failed with "incomplete user info". - Extract a pure helper `select-user-info-source` that maps the raw config string to a dispatch keyword (`:token`, `:userinfo`, `:auto`), falling back to `:auto` for unknown / missing / accidentally-keyword values - Rewrite `get-info`'s `case` to dispatch on the helper's output so the arms unambiguously match the normalised keyword - Add vitest-style deftests in `auth_oidc_test.clj` pinning the three valid strings, the nil / "auto" / unknown fallback, and the reverse regression (a keyword input must not slip through as if it were the matching string) - Add a CHANGES.md entry under the 2.17.0 Unreleased `:bug: Bugs fixed` section linking back to #9108 Signed-off-by: Andrey Antukh <niwi@niwi.nz> Co-authored-by: Andrey Antukh <niwi@niwi.nz>
* 🐛 Fix colorpicker eyedropper on gradients tab * 🐛 Fix gradient test deleting opacity input
The submenu opened by hovering Help & Learning in the user account menu rendered with a vertical offset, making it appear visually disconnected from its parent row and aligned instead with the Community Signed-off-by: Juan Flores <112629487+juan-flores077@users.noreply.github.com>
…ges (#9091) The "Update Settings" button in Your Account > Settings and Notifications was always enabled, even when the form had no changes, and clicking it emitted a success notification despite no data being modified. Disable the submit button when the current form data equals its initial state, so it activates only when there are actual changes to persist. Signed-off-by: moorsecopers99 <patellscott18@gmail.com> Signed-off-by: Andrey Antukh <niwi@niwi.nz> Co-authored-by: Andrey Antukh <niwi@niwi.nz>
* ⬆️ Update devenv dependencies * ✨ Fix formatting issues * 📎 Fix linter issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )