Skip to content

Commit

Permalink
Merge pull request #6411 from nextcloud/feat/menubar_block_submenu
Browse files Browse the repository at this point in the history
feat: restructure menubar #2
  • Loading branch information
mejo- authored Sep 25, 2024
2 parents 24c32ec + 943bf21 commit 190cc2c
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 122 deletions.
12 changes: 6 additions & 6 deletions cypress/e2e/workspace.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ describe('Workspace', function() {
const actionName = `callout-${type}`

// enable callout
cy.getSubmenuEntry('callouts', actionName).click()
cy.getSubmenuEntry('blocks', actionName).click()

// check content
cy.getContent()
.find(`.callout.callout--${type}`)
.should('contain', 'Callout')

// disable
cy.getSubmenuEntry('callouts', actionName)
cy.getSubmenuEntry('blocks', actionName)
.should('have.class', 'is-active')
.click()
})
Expand All @@ -212,19 +212,19 @@ describe('Workspace', function() {
const [first, ...rest] = types

// enable callout
cy.getSubmenuEntry('callouts', `callout-${first}`)
cy.getSubmenuEntry('blocks', `callout-${first}`)
.click()

cy.wrap(rest).each(type => {
const actionName = `callout-${type}`
cy.getSubmenuEntry('callouts', actionName).click()
cy.getSubmenuEntry('blocks', actionName).click()
cy.getContent().find(`.callout.callout--${type}`)
.should('contain', 'Callout')
})

cy.getSubmenuEntry('callouts', `callout-${rest.at(-1)}`)
cy.getSubmenuEntry('blocks', `callout-${rest.at(-1)}`)
.click()
cy.getMenuEntry('callouts')
cy.getMenuEntry('blocks')
.should('not.have.class', 'is-active')
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/ActionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default {
},
labelWithSelected() {
if (this.currentChild) {
// TRANSLATORS: examples - Headings, "Heading 1" is selected - Callouts, "Info" is selected
// TRANSLATORS: examples - Headings, "Heading 1" is selected - Blocks, "Info callout" is selected
return t('text', '{menuItemName}, "{selectedSubMenuItemName}" is selected', {
menuItemName: this.actionEntry.label,
selectedSubMenuItemName: this.currentChild.label,
Expand Down
Loading

0 comments on commit 190cc2c

Please sign in to comment.