From 1d4d2e5a90b19c0901b22be06a2c00dfff188ced Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Mon, 26 Dec 2022 15:33:08 +0100 Subject: [PATCH] fix: merge conflicts --- cypress/e2e/workspace.spec.js | 8 ++++---- src/helpers/files.js | 10 ++-------- src/views/RichWorkspace.vue | 14 +++++++------- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/cypress/e2e/workspace.spec.js b/cypress/e2e/workspace.spec.js index 71d13c29cda..7adfb95494b 100644 --- a/cypress/e2e/workspace.spec.js +++ b/cypress/e2e/workspace.spec.js @@ -66,6 +66,10 @@ describe('Workspace', function() { }) it('adds a Readme.md', function() { + const url = '**/remote.php/dav/files/**' + cy.intercept({ method: 'PUT', url }) + .as('addDescription') + cy.visit(`apps/files?dir=/${encodeURIComponent(currentFolder)}`) cy.get('.files-fileList').should('not.contain', 'Readme.md') @@ -217,12 +221,8 @@ describe('Workspace', function() { const types = ['info', 'warn', 'error', 'success'] beforeEach(function() { -<<<<<<< HEAD cy.visit(`apps/files?dir=/${encodeURIComponent(currentFolder)}`) - cy.openWorkspace().type('Callout') -======= cy.openWorkspace().type('Callout', {force: true}) ->>>>>>> 161e4c7fe (fix: cypress errors and lint issues) }) // eslint-disable-next-line cypress/no-async-tests it('create callout', () => { diff --git a/src/helpers/files.js b/src/helpers/files.js index f8b3304aea7..a4a65ac0bc9 100644 --- a/src/helpers/files.js +++ b/src/helpers/files.js @@ -155,10 +155,11 @@ const newRichWorkspaceFileMenuPlugin = { templateName: descriptionFile, iconClass: 'icon-rename', fileType: 'file', - useInput: descriptionFile, + useInput: false, actionHandler() { return window.FileList .createFile(descriptionFile, { scrollTo: false, animate: false }) + .then(() => emit('Text::showRichWorkspace')) }, shouldShow() { if (fileList.findFile(descriptionFile)) return false @@ -218,13 +219,6 @@ const FilesWorkspacePlugin = { fileList.$el.on('changeDirectory', data => { vm.path = data.dir.toString() }) - fileList.$table.on('DOMSubtreeModified', () => { - if (fileList.findFile(descriptionFile)) { - emit('Text::showRichWorkspace') - } else { - emit('Text::hideRichWorkspace') - } - }) }) }, } diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index d2b8d8adfc8..1d1bdcb3bea 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -219,7 +219,7 @@ export default { color: var(--color-text-maxcontrast); } - #rich-workspace div[contenteditable=false] { + #rich-workspace:deep(div[contenteditable=false]) { width: 100%; padding: 0px; background-color: var(--color-main-background); @@ -227,34 +227,34 @@ export default { border: none; } - #rich-workspace .text-editor { + #rich-workspace:deep(.text-editor) { height: 100%; position: unset !important; top: auto !important; } - #rich-workspace .text-editor__wrapper { + #rich-workspace:deep(.text-editor__wrapper) { position: unset !important; overflow: visible; } - #rich-workspace .text-editor__main { + #rich-workspace:deep(.text-editor__main) { overflow: visible !important; } - #rich-workspace .content-wrapper { + #rich-workspace:deep(.content-wrapper) { overflow: scroll !important; max-height: calc(40vh - 50px); padding-left: 10px; padding-bottom: 10px; } - #rich-workspace .text-editor__wrapper .ProseMirror { + #rich-workspace:deep(.text-editor__wrapper .ProseMirror) { padding: 0px; margin: 0; } - #rich-workspace .editor__content { + #rich-workspace:deep(.editor__content) { margin: 0; }