0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00

Merge pull request #4860 from penpot/palba-testab-template-order

🎉 Test A/B for templates order and names
This commit is contained in:
Alejandro 2024-07-09 12:48:37 +02:00 committed by GitHub
commit 74622919f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 2 deletions

View file

@ -30,4 +30,10 @@
:file-uri "https://github.com/penpot/penpot-files/raw/binary-files/Open-Color-Scheme.penpot"}
{:id "flex-layout-playground"
:name "Flex Layout Playground"
:file-uri "https://github.com/penpot/penpot-files/raw/binary-files/Flex-Layout-Playground.penpot"}]
:file-uri "https://github.com/penpot/penpot-files/raw/binary-files/Flex-Layout-Playground.penpot"}
{:id "prototype-examples"
:name "Prototipe template"
:file-uri "https://github.com/penpot/penpot-files/raw/binary-files/prototype-examples.penpot"}
{:id "penpot-design-system"
:name "Design system example"
:file-uri "https://github.com/penpot/penpot-files/raw/binary-files/Penpot-Design-system.penpot"}]

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

View file

@ -299,7 +299,19 @@
(ptk/reify ::libraries-fetched
ptk/UpdateEvent
(update [_ state]
(assoc state :builtin-templates libraries))))
(let [templates-a-b-test? (cf/external-feature-flag "dashboard-01" "test")
remove-ids (if templates-a-b-test?
#{"wireframing-kit" "prototype-examples" "plants-app" "penpot-design-system"}
#{"prototype-examples" "penpot-design-system"})
libraries (cond->> libraries
:always
(remove #(contains? remove-ids (:id %)))
templates-a-b-test?
(concat [{:id "wireframing-kit", :name "Wireframe library"}
{:id "prototype-examples", :name "Prototype template"}
{:id "plants-app", :name "UI mockup example"}
{:id "penpot-design-system", :name "Design system example"}]))]
(assoc state :builtin-templates libraries)))))
(defn fetch-builtin-templates
[]