0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

Merge pull request #4784 from penpot/azazeln28-refactor-component-thumbnails-as-configurable

♻️ Refactor component thumbnails as configurable
This commit is contained in:
Andrey Antukh 2024-06-20 17:58:45 +02:00 committed by GitHub
commit afb23bcebe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View file

@ -69,7 +69,8 @@
:enable-onboarding-questions
:enable-onboarding-newsletter
:enable-dashboard-templates-section
:enable-google-fonts-provider])
:enable-google-fonts-provider
:enable-component-thumbnails])
(defn- parse-flags
[global]

View file

@ -24,6 +24,7 @@
[app.common.types.shape.layout :as ctl]
[app.common.types.typography :as ctt]
[app.common.uuid :as uuid]
[app.config :as cf]
[app.main.data.changes :as dch]
[app.main.data.comments :as dc]
[app.main.data.events :as ev]
@ -1203,7 +1204,7 @@
(rx/debounce 5000)
(rx/tap #(log/trc :hint "buffer initialized")))]
(when components-v2?
(when (and components-v2? (contains? cf/flags :component-thumbnails))
(->> (rx/merge
changes-s

View file

@ -14,6 +14,7 @@
[app.common.types.component :as ctk]
[app.common.types.container :as ctn]
[app.common.types.file :as ctf]
[app.config :as cf]
[app.main.data.modal :as modal]
[app.main.data.workspace :as dw]
[app.main.data.workspace.libraries :as dwl]
@ -287,7 +288,7 @@
(when (< @retry 3)
(inc retry))))]
(if (some? thumbnail-uri)
(if (and (some? thumbnail-uri) (contains? cf/flags :component-thumbnails))
[:& component-svg-thumbnail
{:thumbnail-uri thumbnail-uri
:class class