-
Notifications
You must be signed in to change notification settings - Fork 111
feat: bring back cypress command createDescription through UI #4965
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
Changes from all commits
24a03ac
d0dbe4f
391380e
2cfa5e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,8 +21,7 @@ | |
| --> | ||
|
|
||
| <template> | ||
| <div v-if="enabled" | ||
| v-show="hasRichWorkspace" | ||
| <div v-if="enabled && file !== null" | ||
| id="rich-workspace" | ||
| :class="{'focus': focus, 'dark': darkTheme }"> | ||
| <RichTextReader v-if="!loaded || !ready" :content="content" class="rich-workspace--preview" /> | ||
|
|
@@ -108,11 +107,12 @@ export default { | |
| }, | ||
| }, | ||
| mounted() { | ||
| if (this.enabled) { | ||
| if (this.enabled && this.hasRichWorkspace) { | ||
| this.getFileInfo() | ||
| } | ||
| subscribe('Text::showRichWorkspace', this.showRichWorkspace) | ||
| subscribe('Text::hideRichWorkspace', this.hideRichWorkspace) | ||
| subscribe('files:node:created', this.onFileCreated) | ||
| subscribe('files:node:deleted', this.onFileDeleted) | ||
| subscribe('files:node:renamed', this.onFileRenamed) | ||
|
|
||
|
|
@@ -122,6 +122,7 @@ export default { | |
| beforeDestroy() { | ||
| unsubscribe('Text::showRichWorkspace', this.showRichWorkspace) | ||
| unsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace) | ||
| unsubscribe('files:node:created', this.onFileCreated) | ||
| unsubscribe('files:node:deleted', this.onFileDeleted) | ||
| unsubscribe('files:node:renamed', this.onFileRenamed) | ||
|
|
||
|
|
@@ -144,9 +145,10 @@ export default { | |
| }) | ||
| }, | ||
| getFileInfo(autofocus) { | ||
| if (!this.hasRichWorkspace) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you elaborate a bit why this change is needed? as far as I see this would no longer check on each folder change on if the folder has a rich workspace
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I checked,
|
||
| if (!this.enabled) { | ||
| return | ||
| } | ||
| this.file = null | ||
| this.ready = false | ||
| this.loaded = true | ||
| this.autofocus = false | ||
|
|
@@ -208,6 +210,11 @@ export default { | |
| // schedule to normal behaviour | ||
| this.$_timeoutAutohide = setTimeout(this.onTimeoutAutohide, 7000) // 7s | ||
| }, | ||
| onFileCreated(node) { | ||
| if (SUPPORTED_STATIC_FILENAMES.includes(node.basename)) { | ||
| this.showRichWorkspace() | ||
| } | ||
| }, | ||
| onFileDeleted(node) { | ||
| if (node.path === this.file.path) { | ||
| this.hideRichWorkspace() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea to move that over here π