diff --git a/cypress/snapshots/base/AppNavigationItem.cy.ts/NcAppNavigationItem-primary-on-active-entry-menu-active.png b/cypress/snapshots/base/AppNavigationItem.cy.ts/NcAppNavigationItem-primary-on-active-entry-menu-active.png new file mode 100644 index 0000000000..c3d11a4ac4 Binary files /dev/null and b/cypress/snapshots/base/AppNavigationItem.cy.ts/NcAppNavigationItem-primary-on-active-entry-menu-active.png differ diff --git a/cypress/snapshots/base/AppNavigationItem.cy.ts/NcAppNavigationItem-primary-on-active-entry.png b/cypress/snapshots/base/AppNavigationItem.cy.ts/NcAppNavigationItem-primary-on-active-entry.png new file mode 100644 index 0000000000..2d4cdf5428 Binary files /dev/null and b/cypress/snapshots/base/AppNavigationItem.cy.ts/NcAppNavigationItem-primary-on-active-entry.png differ diff --git a/cypress/snapshots/base/AppNavigationItem.cy.ts/NcAppNavigationItem-tertiary-non-active-entry.png b/cypress/snapshots/base/AppNavigationItem.cy.ts/NcAppNavigationItem-tertiary-non-active-entry.png new file mode 100644 index 0000000000..ad36205d68 Binary files /dev/null and b/cypress/snapshots/base/AppNavigationItem.cy.ts/NcAppNavigationItem-tertiary-non-active-entry.png differ diff --git a/cypress/visual/AppNavigationItem.cy.ts b/cypress/visual/AppNavigationItem.cy.ts index 893ac589fb..7f10f036b2 100644 --- a/cypress/visual/AppNavigationItem.cy.ts +++ b/cypress/visual/AppNavigationItem.cy.ts @@ -7,7 +7,13 @@ import NcAppNavigationItem from '../../src/components/NcAppNavigationItem/NcAppN describe('NcAppNavigationItem', () => { describe('With router link', () => { const RouterComponent = defineComponent({ - template: '
', + template: ` +
+ + + + +
`, components: { NcAppNavigationItem }, }) @@ -41,5 +47,20 @@ describe('NcAppNavigationItem', () => { cy.contains('.app-navigation-entry', 'Home').find('.app-navigation-entry__actions').click() cy.get('.app-navigation-entry--editing').compareSnapshot('NcAppNavigationItem-primary-on-active-route-menu-active') }) + + // Entries without router + + it('has tertiary styling on non active entry', () => { + cy.contains('.app-navigation-entry', 'Bar').compareSnapshot('NcAppNavigationItem-tertiary-non-active-entry') + }) + + it('has primary styling on active entry', () => { + cy.contains('.app-navigation-entry', 'Back').compareSnapshot('NcAppNavigationItem-primary-on-active-entry') + }) + + it('has primary button styling on active entry with editing=true', () => { + cy.contains('.app-navigation-entry', 'Back').find('.app-navigation-entry__actions').click() + cy.get('.app-navigation-entry--editing').compareSnapshot('NcAppNavigationItem-primary-on-active-entry-menu-active') + }) }) }) diff --git a/src/assets/NcAppNavigationItem.scss b/src/assets/NcAppNavigationItem.scss index 79dbfcc6c6..985bc87962 100644 --- a/src/assets/NcAppNavigationItem.scss +++ b/src/assets/NcAppNavigationItem.scss @@ -34,7 +34,7 @@ } // overwrite active text color - .app-navigation-entry-link, .app-navigation-entry-button { + .app-navigation-entry-link { color: var(--color-primary-element-text) !important; } } @@ -68,14 +68,12 @@ display: none; } - &:not(.app-navigation-entry--editing) { - .app-navigation-entry-link, .app-navigation-entry-button { - padding-right: $icon-margin; - } + &:not(.app-navigation-entry--editing) .app-navigation-entry-link { + padding-right: $icon-margin; } // Main entry link - .app-navigation-entry-link, .app-navigation-entry-button { + .app-navigation-entry-link { z-index: 100; /* above the bullet to allow click*/ display: flex; overflow: hidden; diff --git a/src/components/NcAppNavigationCaption/NcAppNavigationCaption.vue b/src/components/NcAppNavigationCaption/NcAppNavigationCaption.vue index 9fbdd26d54..75eb16a2cd 100644 --- a/src/components/NcAppNavigationCaption/NcAppNavigationCaption.vue +++ b/src/components/NcAppNavigationCaption/NcAppNavigationCaption.vue @@ -1,7 +1,7 @@ ```vue