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:
commit
74622919f6
3 changed files with 20 additions and 2 deletions
|
@ -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 |
|
@ -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
|
||||
[]
|
||||
|
|
Loading…
Reference in a new issue