mirror of
https://github.com/penpot/penpot.git
synced 2025-07-27 15:07:17 +02:00
✨ Allow variants with no properties
This commit is contained in:
parent
25ef1800d0
commit
7cd0e28c3b
2 changed files with 1 additions and 11 deletions
|
@ -602,11 +602,6 @@
|
||||||
(log/error :hint "Variant error code, we don't want to auto repair it for now" :code (:code error))
|
(log/error :hint "Variant error code, we don't want to auto repair it for now" :code (:code error))
|
||||||
file)
|
file)
|
||||||
|
|
||||||
(defmethod repair-error :variant-no-properties
|
|
||||||
[_ error file _]
|
|
||||||
(log/error :hint "Variant error code, we don't want to auto repair it for now" :code (:code error))
|
|
||||||
file)
|
|
||||||
|
|
||||||
(defmethod repair-error :variant-bad-variant-name
|
(defmethod repair-error :variant-bad-variant-name
|
||||||
[_ error file _]
|
[_ error file _]
|
||||||
(log/error :hint "Variant error code, we don't want to auto repair it for now" :code (:code error))
|
(log/error :hint "Variant error code, we don't want to auto repair it for now" :code (:code error))
|
||||||
|
|
|
@ -68,7 +68,6 @@
|
||||||
:variant-bad-name
|
:variant-bad-name
|
||||||
:variant-bad-variant-name
|
:variant-bad-variant-name
|
||||||
:variant-component-bad-name
|
:variant-component-bad-name
|
||||||
:variant-no-properties
|
|
||||||
:variant-component-bad-id})
|
:variant-component-bad-id})
|
||||||
|
|
||||||
(def ^:private schema:error
|
(def ^:private schema:error
|
||||||
|
@ -589,11 +588,7 @@
|
||||||
(when-not (ctk/is-variant? main-component)
|
(when-not (ctk/is-variant? main-component)
|
||||||
(report-error :not-a-variant
|
(report-error :not-a-variant
|
||||||
(str/ffmt "Shape % should be a variant" (:id main-component))
|
(str/ffmt "Shape % should be a variant" (:id main-component))
|
||||||
main-component file component-page))
|
main-component file component-page))))
|
||||||
(when (< (count (:variant-properties component)) 1)
|
|
||||||
(report-error :variant-no-properties
|
|
||||||
(str/ffmt "Component variant % should have properties" (:id main-component))
|
|
||||||
main-component file nil))))
|
|
||||||
|
|
||||||
(defn- check-component
|
(defn- check-component
|
||||||
"Validate semantic coherence of a component. Report all errors found."
|
"Validate semantic coherence of a component. Report all errors found."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue