Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poc of live access on demand (not reactive, but up to date on demand) #4513

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -137,7 +137,8 @@ export default {
],
provide () {
return {
originalDoc: this.originalDoc
originalDoc: this.originalDoc,
liveOriginalDoc: this.docFields
};
},
props: {
Expand Down
Expand Up @@ -26,6 +26,7 @@ export default {
default: null
}
},

data() {
return {
docFields: {
Expand Down
Expand Up @@ -36,6 +36,7 @@
:size="iconSize"
class="apos-input-icon"
/>
<button @click="summarizeLiveDoc">Summarize Live Doc</button>

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected 1 line break after opening tag (`<button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected 1 line break before closing tag (`</button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (18, 5)

Expected 1 line break after opening tag (`<button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (18, 5)

Expected 1 line break before closing tag (`</button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected 1 line break after opening tag (`<button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected 1 line break before closing tag (`</button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected 1 line break after opening tag (`<button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected 1 line break before closing tag (`</button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected 1 line break after opening tag (`<button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected 1 line break before closing tag (`</button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (20, 5)

Expected 1 line break after opening tag (`<button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (20, 5)

Expected 1 line break before closing tag (`</button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected 1 line break after opening tag (`<button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected 1 line break before closing tag (`</button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected 1 line break after opening tag (`<button>`), but no line breaks found

Check warning on line 39 in modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected 1 line break before closing tag (`</button>`), but no line breaks found
</div>
</template>
</AposInputWrapper>
Expand Down
4 changes: 4 additions & 0 deletions modules/@apostrophecms/schema/ui/apos/logic/AposInputSlug.js
Expand Up @@ -17,6 +17,7 @@ export default {
originalSlugPartsLength: null
};
},
inject: [ 'liveOriginalDoc' ],
computed: {
tabindex () {
return this.field.disableFocus ? '-1' : '0';
Expand Down Expand Up @@ -98,6 +99,9 @@ export default {
this.originalSlugPartsLength = this.next.split('/').length;
},
methods: {
summarizeLiveDoc() {
console.log(`The title is: ${this.liveOriginalDoc.data.title}`);
},
async watchNext() {
this.next = this.slugify(this.next);
this.validateAndEmit();
Expand Down