Skip to content

Commit 6bf7dc1

Browse files
committedOct 23, 2024
fix(files): Adjust NavigationQuota for Nextcloud 30 design
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 7b2a614 commit 6bf7dc1

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed
 

‎apps/files/src/components/NavigationQuota.vue

+8-5
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,18 @@ export default {
167167
// User storage stats display
168168
.app-navigation-entry__settings-quota {
169169
// Align title with progress and icon
170-
&--not-unlimited::v-deep .app-navigation-entry__name {
171-
margin-top: -6px;
170+
--app-navigation-quota-margin: calc((var(--default-clickable-area) - 24px) / 2); // 20px icon size and 4px progress bar
171+
172+
&--not-unlimited :deep(.app-navigation-entry__name) {
173+
line-height: 1;
174+
margin-top: var(--app-navigation-quota-margin);
172175
}
173176

174177
progress {
175178
position: absolute;
176-
bottom: 12px;
177-
margin-left: 44px;
178-
width: calc(100% - 44px - 22px);
179+
bottom: var(--app-navigation-quota-margin);
180+
margin-inline-start: var(--default-clickable-area);
181+
width: calc(100% - (1.5 * var(--default-clickable-area)));
179182
}
180183
}
181184
</style>

‎apps/files/src/views/Navigation.cy.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,9 @@ describe('Quota rendering', () => {
216216

217217
cy.get('[data-cy-files-navigation-settings-quota]').should('be.visible')
218218
cy.get('[data-cy-files-navigation-settings-quota]').should('contain.text', '1 GB of 5 GB used')
219-
cy.get('[data-cy-files-navigation-settings-quota] progress').should('be.visible')
220-
cy.get('[data-cy-files-navigation-settings-quota] progress').should('have.attr', 'value', '20')
219+
cy.get('[data-cy-files-navigation-settings-quota] progress')
220+
.should('exist')
221+
.and('have.attr', 'value', '20')
221222
})
222223

223224
it('Reached quota', () => {
@@ -237,7 +238,8 @@ describe('Quota rendering', () => {
237238

238239
cy.get('[data-cy-files-navigation-settings-quota]').should('be.visible')
239240
cy.get('[data-cy-files-navigation-settings-quota]').should('contain.text', '5 GB of 1 GB used')
240-
cy.get('[data-cy-files-navigation-settings-quota] progress').should('be.visible')
241-
cy.get('[data-cy-files-navigation-settings-quota] progress').should('have.attr', 'value', '100') // progress max is 100
241+
cy.get('[data-cy-files-navigation-settings-quota] progress')
242+
.should('exist')
243+
.and('have.attr', 'value', '100') // progress max is 100
242244
})
243245
})

‎cypress/support/component.ts

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
*/
55
import 'cypress-axe'
66

7+
// styles
8+
import '../../apps/theming/css/default.css'
9+
import '../../core/css/server.css'
10+
711
/* eslint-disable */
812
import { mount } from '@cypress/vue2'
913

0 commit comments

Comments
 (0)