diff --git a/cypress/e2e/pages.spec.js b/cypress/e2e/pages.spec.js index 641921026..0ed13c255 100644 --- a/cypress/e2e/pages.spec.js +++ b/cypress/e2e/pages.spec.js @@ -269,6 +269,35 @@ describe('Page', function() { }) }) + describe('Full width view', function() { + it('Allows to toggle persistent full-width view', function() { + cy.visit('/apps/collectives/Our%20Garden/Day%202') + cy.get('#titleform').should('have.css', 'max-width', '100%') + cy.get('#read-only-editor').invoke('outerWidth').should('eq', 670) + + // Set full width mode + cy.get('#titleform .action-item__menutoggle') + .click() + cy.contains('li.action', 'Full width') + .click() + cy.get('#titleform').should('have.css', 'max-width', 'none') + cy.get('#read-only-editor').invoke('outerWidth').should('be.greaterThan', 700) + + // Reload to check persistence with browser storage + cy.reload() + cy.get('#titleform').should('have.css', 'max-width', 'none') + cy.get('#read-only-editor').invoke('outerWidth').should('be.greaterThan', 700) + + // Unset full width mode + cy.get('#titleform .action-item__menutoggle') + .click() + cy.contains('li.action', 'Full width') + .click() + cy.get('#titleform').should('have.css', 'max-width', '100%') + cy.get('#read-only-editor').invoke('outerWidth').should('eq', 670) + }) + }) + describe('Using the search providers to search for a page', function() { it('Search for page title', function() { cy.get('.unified-search a').click() diff --git a/package-lock.json b/package-lock.json index 98fe817c8..4338e275d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "dependencies": { "@nextcloud/auth": "^2.1.0", "@nextcloud/axios": "^2.4.0", + "@nextcloud/browser-storage": "^0.2.0", "@nextcloud/dialogs": "^4.1.0", "@nextcloud/event-bus": "^3.1.0", "@nextcloud/files": "^3.0.0-beta.21", diff --git a/package.json b/package.json index a6e14c3d7..cf466e777 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "dependencies": { "@nextcloud/auth": "^2.1.0", "@nextcloud/axios": "^2.4.0", + "@nextcloud/browser-storage": "^0.2.0", "@nextcloud/dialogs": "^4.1.0", "@nextcloud/event-bus": "^3.1.0", "@nextcloud/files": "^3.0.0-beta.21", diff --git a/src/components/Collective.vue b/src/components/Collective.vue index 72fc37bce..b3109ef28 100644 --- a/src/components/Collective.vue +++ b/src/components/Collective.vue @@ -202,9 +202,7 @@ export default { .page-title { position: sticky; top: 0; - padding: 8px 0px 2px 8px; - margin: auto; - max-width: 670px; + padding: 8px 8px 2px 8px; display: flex; align-items: center; background-color: var(--color-main-background); diff --git a/src/components/Page.vue b/src/components/Page.vue index 3614be17a..cc04e8a0f 100644 --- a/src/components/Page.vue +++ b/src/components/Page.vue @@ -1,6 +1,6 @@ {{ setEmojiString }} + + {{ editTemplateString }} - + {{ t('collectives', 'Move page') }} + + @@ -68,8 +102,6 @@ {{ deletePageString }} - - @@ -41,8 +49,6 @@ export default { height: 44px; padding: 3px 8px 3px 14px; display: flex; - max-width: 670px; - margin: auto; flex-wrap: nowrap; align-items: center; overflow: hidden; diff --git a/src/components/Page/RichText.vue b/src/components/Page/RichText.vue index ec4a4b66a..b64947b20 100644 --- a/src/components/Page/RichText.vue +++ b/src/components/Page/RichText.vue @@ -251,11 +251,6 @@ export default {