Skip to content

Commit 12e7f41

Browse files
authored
Merge pull request #33568 from nextcloud/poc/redesign
⚗️ Proof of concept: Redesign app-content
2 parents 2020c15 + 00b3089 commit 12e7f41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+774
-474
lines changed

apps/comments/tests/js/filespluginSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('OCA.Comments.FilesPlugin tests', function() {
2626
var testFiles;
2727

2828
beforeEach(function() {
29-
var $content = $('<div id="content"></div>');
29+
var $content = $('<div id="app-content"></div>');
3030
$('#testArea').append($content);
3131
// dummy file list
3232
var $div = $(
@@ -36,7 +36,7 @@ describe('OCA.Comments.FilesPlugin tests', function() {
3636
'<tbody class="files-fileList"></tbody>' +
3737
'</table>' +
3838
'</div>');
39-
$('#content').append($div);
39+
$('#app-content').append($div);
4040

4141
fileList = new OCA.Files.FileList($div);
4242
OCA.Comments.FilesPlugin.attach(fileList);

apps/dashboard/src/DashboardApp.vue

+30-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div id="app-dashboard" :style="backgroundStyle">
2+
<div id="app-dashboard">
33
<h2>{{ greeting.text }}</h2>
44
<ul class="statuses">
55
<div v-for="status in sortedRegisteredStatus"
@@ -172,7 +172,7 @@ export default {
172172
}
173173
174174
return {
175-
backgroundImage: this.background === 'default' ? 'var(--image-main-background)' : `url(${this.backgroundImage})`,
175+
backgroundImage: this.background === 'default' ? 'var(--image-main-background)' : `url('${this.backgroundImage}')`,
176176
}
177177
},
178178
@@ -365,10 +365,18 @@ export default {
365365
if (isBackgroundBright) {
366366
document.querySelector('#header').style.setProperty('--primary-invert-if-bright', 'invert(100%)')
367367
document.querySelector('#header').style.setProperty('--color-primary-text', '#000000')
368+
// document.body.removeAttribute('data-theme-dark')
369+
// document.body.setAttribute('data-theme-light', 'true')
368370
} else {
369-
document.querySelector('#header').style.removeProperty('--primary-invert-if-bright')
370-
document.querySelector('#header').style.removeProperty('--color-primary-text')
371+
document.querySelector('#header').style.setProperty('--primary-invert-if-bright', 'no')
372+
document.querySelector('#header').style.setProperty('--color-primary-text', '#ffffff')
373+
// document.body.removeAttribute('data-theme-light')
374+
// document.body.setAttribute('data-theme-dark', 'true')
371375
}
376+
377+
document.documentElement.style.setProperty('--image-main-background', this.backgroundStyle.backgroundImage)
378+
document.querySelector('#header').style.setProperty('--image-main-background', this.backgroundStyle.backgroundImage)
379+
document.querySelector('body').style.setProperty('--image-main-background', this.backgroundStyle.backgroundImage)
372380
},
373381
updateSkipLink() {
374382
// Make sure "Skip to main content" link points to the app content
@@ -426,7 +434,6 @@ export default {
426434
background-position: center center;
427435
background-repeat: no-repeat;
428436
background-attachment: fixed;
429-
background-color: var(--color-primary);
430437
431438
> h2 {
432439
color: var(--color-primary-text);
@@ -675,3 +682,21 @@ export default {
675682
}
676683
}
677684
</style>
685+
<style>
686+
html, body {
687+
overflow: auto;
688+
position: static;
689+
height: auto;
690+
background-attachment: fixed;
691+
}
692+
693+
#body-user #header {
694+
position: fixed;
695+
}
696+
697+
#content {
698+
height: auto;
699+
overflow: auto;
700+
position: static !important;;
701+
}
702+
</style>

apps/files/css/files.css

+48-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files/css/files.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files/css/files.scss

+50-10
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
thead {
6969
position: -webkit-sticky;
7070
position: sticky;
71-
// header + breadcrumbs
72-
top: variables.$header-height;
71+
// breadcrumbs
72+
top: 44px;
7373
// under breadcrumbs, over file list
7474
z-index: 60;
7575
display: block;
@@ -307,12 +307,6 @@ table th.column-last, table td.column-last {
307307
position: relative;
308308
/* this can not be just width, both need to be set … table styling */
309309
min-width: 130px;
310-
max-width: 130px;
311-
}
312-
313-
#app-content-files thead,
314-
#app-content-trashbin thead {
315-
top: 94px;
316310
}
317311

318312
#app-content-recent,
@@ -323,7 +317,9 @@ table th.column-last, table td.column-last {
323317
#app-content-sharinglinks,
324318
#app-content-deletedshares,
325319
#app-content-pendingshares {
326-
margin-top: 22px;
320+
thead {
321+
top: 0;
322+
}
327323
}
328324

329325
table.multiselect thead th {
@@ -814,6 +810,49 @@ table.dragshadow td.size {
814810
}
815811
}
816812

813+
814+
.files-controls {
815+
box-sizing: border-box;
816+
position: -webkit-sticky;
817+
position: sticky;
818+
height: 54px;
819+
padding: 0;
820+
margin: 0;
821+
background-color: var(--color-main-background-translucent);
822+
z-index: 62; /* must be above the filelist sticky header and texteditor menubar */
823+
-webkit-user-select: none;
824+
-moz-user-select: none;
825+
-ms-user-select: none;
826+
user-select: none;
827+
display: flex;
828+
top: 0;
829+
830+
.actions {
831+
> div,
832+
& {
833+
> .button, button {
834+
box-sizing: border-box;
835+
display: inline-block;
836+
display: flex;
837+
height: 44px;
838+
width: 44px;
839+
padding: 9px; // width - border - icon width = 18px
840+
align-items: center;
841+
justify-content: center;
842+
}
843+
.button.hidden {
844+
display: none;
845+
}
846+
}
847+
}
848+
}
849+
850+
/* position controls for apps with app-navigation */
851+
852+
.viewer-mode #app-navigation + #app-content .files-controls {
853+
left: 0;
854+
}
855+
817856
.files-filestable .filename .action .icon,
818857
.files-filestable .selectedActions a .icon,
819858
.files-filestable .filename .favorite-mark .icon,
@@ -1197,7 +1236,8 @@ table.dragshadow td.size {
11971236
padding: 22px;
11981237
opacity: .5;
11991238
position: fixed;
1200-
right: 0;
1239+
right: calc(var(--default-grid-baseline) * 4);
1240+
top: calc(var(--header-height) + var(--default-grid-baseline));
12011241
z-index: 100;
12021242

12031243
&:hover,

0 commit comments

Comments
 (0)