From dd91ac5ab96542fa870ac317f76032d9b2ce526d Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Tue, 5 Dec 2023 11:23:17 +0100 Subject: [PATCH 01/28] Bugfix: Gridview whitespace autosize --- .../web-app-files/src/components/FilesList/ResourceTiles.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue index 32c5fb00c20..369452cfae9 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue @@ -398,12 +398,12 @@ export default defineComponent({ .oc-tiles { column-gap: 1rem; display: grid; - grid-template-columns: repeat(auto-fill, minmax(auto, var(--oc-size-tiles-default))); + grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); justify-content: flex-start; row-gap: 1rem; &.resizableTiles { - grid-template-columns: repeat(auto-fill, minmax(auto, var(--oc-size-tiles-resize-step))); + grid-template-columns: repeat(auto-fit, minmax(var(--oc-size-tiles-resize-step), 1fr)); } @media only screen and (max-width: 640px) { From def728cf0922af8bb673a9a5adcb45403b67baa5 Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Tue, 5 Dec 2023 13:56:28 +0100 Subject: [PATCH 02/28] Fix large scale --- packages/web-pkg/src/components/ViewOptions.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-pkg/src/components/ViewOptions.vue b/packages/web-pkg/src/components/ViewOptions.vue index 9f564008a6b..b9a041f1ccf 100644 --- a/packages/web-pkg/src/components/ViewOptions.vue +++ b/packages/web-pkg/src/components/ViewOptions.vue @@ -169,7 +169,7 @@ export default defineComponent({ const setTilesViewSize = () => { const rootStyle = (document.querySelector(':root') as HTMLElement).style const currentSize = rootStyle.getPropertyValue('--oc-size-tiles-resize-step') - const newSize = `${(unref(viewSizeQuery) as any) * 12}rem` + const newSize = `${(unref(viewSizeQuery) as any) * 6}rem` if (!currentSize || currentSize !== newSize) { rootStyle.setProperty(`--oc-size-tiles-resize-step`, newSize) } From b74e34f597049768f4b4e3287874ec8c0ad4b155 Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Tue, 5 Dec 2023 14:20:16 +0100 Subject: [PATCH 03/28] Fix viewoption sizes --- .../web-app-files/src/components/FilesList/ResourceTiles.vue | 2 +- packages/web-pkg/src/components/ViewOptions.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue index 369452cfae9..b017a6d49ac 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue @@ -398,7 +398,7 @@ export default defineComponent({ .oc-tiles { column-gap: 1rem; display: grid; - grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); justify-content: flex-start; row-gap: 1rem; diff --git a/packages/web-pkg/src/components/ViewOptions.vue b/packages/web-pkg/src/components/ViewOptions.vue index b9a041f1ccf..04ca4f881e8 100644 --- a/packages/web-pkg/src/components/ViewOptions.vue +++ b/packages/web-pkg/src/components/ViewOptions.vue @@ -169,7 +169,7 @@ export default defineComponent({ const setTilesViewSize = () => { const rootStyle = (document.querySelector(':root') as HTMLElement).style const currentSize = rootStyle.getPropertyValue('--oc-size-tiles-resize-step') - const newSize = `${(unref(viewSizeQuery) as any) * 6}rem` + const newSize = `${(unref(viewSizeQuery) as any) * 10}rem` if (!currentSize || currentSize !== newSize) { rootStyle.setProperty(`--oc-size-tiles-resize-step`, newSize) } From f338af74b1c477f26427947cc13e15bfe6afc528 Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Tue, 5 Dec 2023 14:22:20 +0100 Subject: [PATCH 04/28] Add changelog --- changelog/unreleased/bugfix-tiles-view-whitespace | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 changelog/unreleased/bugfix-tiles-view-whitespace diff --git a/changelog/unreleased/bugfix-tiles-view-whitespace b/changelog/unreleased/bugfix-tiles-view-whitespace new file mode 100644 index 00000000000..75b7300dfd3 --- /dev/null +++ b/changelog/unreleased/bugfix-tiles-view-whitespace @@ -0,0 +1,8 @@ +Bugfix: Tilesview has whitespace + +We've fixed a bug that caused the tiles-view to have whitespace +on the right side of the screen which is not optimal for efficiant +space management. + +https://github.com/owncloud/web/pull/10118 +https://github.com/owncloud/web/issues/10040 From ca5843334f78951813680beacb11f2403e3c71ec Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Tue, 5 Dec 2023 16:05:20 +0100 Subject: [PATCH 05/28] Update unittests --- packages/web-pkg/tests/unit/components/ViewOptions.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-pkg/tests/unit/components/ViewOptions.spec.ts b/packages/web-pkg/tests/unit/components/ViewOptions.spec.ts index f07f3eeba68..25ea68c1f55 100644 --- a/packages/web-pkg/tests/unit/components/ViewOptions.spec.ts +++ b/packages/web-pkg/tests/unit/components/ViewOptions.spec.ts @@ -117,7 +117,7 @@ describe('ViewOptions component', () => { }) const rootStyle = (document.querySelector(':root') as HTMLElement).style expect(rootStyle.getPropertyValue('--oc-size-tiles-resize-step')).toEqual( - `${tileSize * 12}rem` + `${tileSize * 10}rem` ) }) }) From c8be4efdad71945292335c8fd61d877a0a51bea5 Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Fri, 8 Dec 2023 14:30:32 +0100 Subject: [PATCH 06/28] WIP --- .../src/components/FilesList/ResourceTiles.vue | 7 +++++-- packages/web-pkg/src/components/ViewOptions.vue | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue index b017a6d49ac..c544abbadd2 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue @@ -398,12 +398,15 @@ export default defineComponent({ .oc-tiles { column-gap: 1rem; display: grid; - grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(220px, var(--oc-size-tiles-resize-step2))); justify-content: flex-start; row-gap: 1rem; &.resizableTiles { - grid-template-columns: repeat(auto-fit, minmax(var(--oc-size-tiles-resize-step), 1fr)); + grid-template-columns: repeat( + auto-fit, + minmax(var(--oc-size-tiles-resize-step), var(--oc-size-tiles-resize-step2)) + ); } @media only screen and (max-width: 640px) { diff --git a/packages/web-pkg/src/components/ViewOptions.vue b/packages/web-pkg/src/components/ViewOptions.vue index 04ca4f881e8..e3e8011f1bd 100644 --- a/packages/web-pkg/src/components/ViewOptions.vue +++ b/packages/web-pkg/src/components/ViewOptions.vue @@ -170,8 +170,10 @@ export default defineComponent({ const rootStyle = (document.querySelector(':root') as HTMLElement).style const currentSize = rootStyle.getPropertyValue('--oc-size-tiles-resize-step') const newSize = `${(unref(viewSizeQuery) as any) * 10}rem` + const newSize2 = `${((unref(viewSizeQuery) as any) * 1) / 10}fr` if (!currentSize || currentSize !== newSize) { rootStyle.setProperty(`--oc-size-tiles-resize-step`, newSize) + rootStyle.setProperty(`--oc-size-tiles-resize-step2`, newSize2) } } From 2a1934cec2c8bdcca5350f572d721754e5095e4d Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Mon, 11 Dec 2023 15:40:34 +0100 Subject: [PATCH 07/28] Solution? --- .../src/components/FilesList/ResourceTiles.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue index c544abbadd2..05c6eae6959 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue @@ -398,15 +398,15 @@ export default defineComponent({ .oc-tiles { column-gap: 1rem; display: grid; - grid-template-columns: repeat(auto-fit, minmax(220px, var(--oc-size-tiles-resize-step2))); + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); justify-content: flex-start; row-gap: 1rem; &.resizableTiles { - grid-template-columns: repeat( - auto-fit, - minmax(var(--oc-size-tiles-resize-step), var(--oc-size-tiles-resize-step2)) - ); + grid-template-columns: repeat(auto-fit, minmax(var(--oc-size-tiles-resize-step), 1fr)); + .oc-tiles-item { + max-width: calc(var(--oc-size-tiles-resize-step) * 2); + } } @media only screen and (max-width: 640px) { From bb517fd4f4c4894d4561b3caefc6b6807fe771e3 Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Tue, 12 Dec 2023 12:39:59 +0100 Subject: [PATCH 08/28] WIP --- .../components/FilesList/ResourceTiles.vue | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue index 05c6eae6959..7991f81bdf6 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue @@ -85,6 +85,22 @@ + @@ -308,7 +324,6 @@ export default defineComponent({ } return sizeMap[props.viewSize] ?? 'xlarge' }) - onBeforeUpdate(() => { tileRefs.value = { tiles: [], @@ -404,9 +419,6 @@ export default defineComponent({ &.resizableTiles { grid-template-columns: repeat(auto-fit, minmax(var(--oc-size-tiles-resize-step), 1fr)); - .oc-tiles-item { - max-width: calc(var(--oc-size-tiles-resize-step) * 2); - } } @media only screen and (max-width: 640px) { From 2f561148375a0d44b6598e14a8d4780e68f0c811 Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Tue, 12 Dec 2023 12:40:19 +0100 Subject: [PATCH 09/28] WIP --- .../web-app-files/src/components/FilesList/ResourceTiles.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue index 7991f81bdf6..6840f06f256 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTiles.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTiles.vue @@ -85,7 +85,7 @@ -