Skip to content

Commit

Permalink
fix: Revert existing rich workspace styling and make cypress tests mo…
Browse files Browse the repository at this point in the history
…re stable

Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Feb 1, 2023
1 parent 91d7794 commit 0f94194
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/workspace.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('Workspace', function() {
cy.visit(`apps/files?dir=/${encodeURIComponent(currentFolder)}`)
cy.get('.files-fileList').should('not.contain', 'Readme.md')

cy.get('.files-controls').within(() => {
cy.get('.files-controls').first().within(() => {
cy.get('.button.new').click()
cy.get('.newFileMenu a.menuitem[data-action="rich-workspace-init"]').click()
cy.wait('@addDescription')
Expand All @@ -87,8 +87,8 @@ describe('Workspace', function() {
it('formats text', function() {
cy.visit(`apps/files?dir=/${encodeURIComponent(currentFolder)}`)
cy.openWorkspace()
.type('Format me', { force: true })
.type('{selectall}', { force: true })
.type('Format me')
.type('{selectall}')
;[
['bold', 'strong'],
['italic', 'em'],
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ Cypress.Commands.add('getMenuEntry', (name) => {
Cypress.Commands.add('getSubmenuEntry', { prevSubject: 'optional' }, (subject, parent, name) => {
return (subject ? cy.wrap(subject) : cy.getMenu())
.getActionEntry(parent)
.click({force: true})
.click()
.then(() => cy.getActionSubEntry(name))
})

Expand Down Expand Up @@ -401,7 +401,7 @@ Cypress.Commands.add('createDescription', () => {
.as('addDescription')

cy.get('.files-fileList').should('not.contain', 'Readme.md')
cy.get('.files-controls').within(() => {
cy.get('.files-controls').first().within(() => {
cy.get('.button.new').click()
cy.get('.newFileMenu a.menuitem[data-action="rich-workspace-init"]').click()
})
Expand Down
14 changes: 7 additions & 7 deletions src/views/RichWorkspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,42 +219,42 @@ 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);
opacity: 1;
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;
}

Expand Down

0 comments on commit 0f94194

Please sign in to comment.