-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat(#578): add DruxtDevelTemplate component * feat(#578): update missing template message * chore(#578): update template formatting * chore(#578): fix broken test * feat(#578): update missing template message * chore: update entity mixin * feat(#578): update missing default slot message * chore(#578): validate path * chore(#578): update test coverage * chore(#578): add rate limiter * chore: fix breaking test * chore(#578): add test coverage for template tool * chore(#578): update ci * chore(#578): update slot message and description * feat(#578): added support for devel template tool * chore(#578): update template string validation * chore(#578): add conditional defaults * feat(#578): add template support to block region * feat(#578): add support for template tool * feat(#578): update debug value * feat(#578): add support for template tool * feat(#578): add support for the template tool * feat(#547): add support for the template tool * chore(#578): fix router slots
- Loading branch information
Showing
40 changed files
with
536 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt-views": minor | ||
--- | ||
|
||
feat(#578): updated components to support the DruxtDevelTemplate tool. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt": minor | ||
--- | ||
|
||
feat(#578): added DruxtDevelTemplate component to simplify template creation in development mode. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt-site": minor | ||
--- | ||
|
||
feat(#578): updated component to support the DruxtDevelTemplate tool. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt-entity": minor | ||
--- | ||
|
||
feat(#578): updated missing schema/vue component message with DruxtDevelTemplate tool. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt-menu": minor | ||
--- | ||
|
||
feat(#578): updated components to support the DruxtDevelTemplate tool. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt-router": minor | ||
--- | ||
|
||
feat(#578): updated component to support the DruxtDevelTemplate tool. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt": minor | ||
--- | ||
|
||
feat(#578): updated missing default slot message with DruxtDevelTemplate tool. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt-breadcrumb": minor | ||
--- | ||
|
||
feat(#578): updated component to support the DruxtDevelTemplate tool. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt-blocks": minor | ||
--- | ||
|
||
feat(#578): updated missing vue component message with DruxtDevelTemplate tool. |
This file contains 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
36 changes: 36 additions & 0 deletions
36
examples/druxt-site/test/cypress/e2e/nuxt/druxt-devel-template.cy.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* global cy, it */ | ||
|
||
it('DruxtDevelTemplate tool', () => { | ||
// Given I visit the homepage. | ||
cy.visit('/') | ||
|
||
// Umami Search block. | ||
const searchBlock = '[data-fetch-key^="DruxtBlock:dc9cc806-d5d5-4187-af7a-f9d5b13fea8b:0"]' | ||
|
||
// I see a DruxtDebug component. | ||
cy.get(searchBlock) | ||
.find('details summary') | ||
.first() | ||
.should('contain.text', "[DruxtBlock] Missing Vue template for the 'umami_search' block") | ||
.click() | ||
|
||
// It has 5 theme component options. | ||
cy.get(searchBlock) | ||
.find('select option') | ||
.should('have.length', 5) | ||
|
||
// I create the DruxtBlockSearchFormBlock component | ||
cy.get(searchBlock) | ||
.find('select') | ||
.select('DruxtBlockSearchFormBlock') | ||
cy.get(searchBlock) | ||
.find('button') | ||
.click() | ||
|
||
// cy.wait(5000) | ||
// cy.get(searchBlock) | ||
// .find('details summary') | ||
// .first() | ||
// .should('contain.text', "[DruxtBlockSearchFormBlock] Debug") | ||
// .click() | ||
}) |
File renamed without changes.
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<template> | ||
<div> | ||
<select v-model="option"> | ||
<option | ||
v-for="(label, key) of options" | ||
:key="key" | ||
v-text="label" | ||
/> | ||
</select> | ||
<button @click="onClick"> | ||
Create | ||
</button> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data: () => ({ | ||
option: undefined, | ||
}), | ||
computed: { | ||
module: ({ $parent }) => ($parent.component || {}).options | ||
? $parent | ||
: ($parent.$parent || {}).$parent || {}, | ||
options: ({ module }) => (module.component || {}).options || [] | ||
}, | ||
created() { | ||
this.option = this.options[0] | ||
}, | ||
methods: { | ||
onClick() { | ||
this.$axios({ | ||
url: '/_druxt/template/add', | ||
baseURL: '/', | ||
method: 'post', | ||
data: { | ||
path: this.option, | ||
settings: { | ||
component: this.module.$options._componentTag, | ||
props: Object.entries(this.module.component.propsData || {}).map(([key, value]) => ({ key, type: typeof value })), | ||
...((this.module.$options.druxt || {}).template || {}), | ||
} | ||
} | ||
}) | ||
} | ||
} | ||
} | ||
</script> |
This file contains 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
This file contains 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
Oops, something went wrong.