-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: Gridview whitespace autosize #10118
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, awesome!!! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see #10118 (comment)
2232e28
to
d0a2db0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having an empty folder and inserting items one by one feels very weird, since the tile size is shrinking with every new item. I would expect the tile size to be stable. Having only one non-filled line also looks wrong, since the gap sizes are quite huge. I'll attach a series of screenshots to visualize the issue.
I'd expect the tile size like in the last screenshots for all other screenshots as well. Maybe a solution with aria-hidden dummy items, like @janackermann proposed in a call earlier today, is working better. Could you give that a try?
@kulmann yes will try to do it that way |
0832303
to
fa91632
Compare
87c89f1
to
04ee2f0
Compare
packages/web-app-files/src/components/FilesList/ResourceTiles.vue
Outdated
Show resolved
Hide resolved
packages/web-app-files/src/components/FilesList/ResourceTiles.vue
Outdated
Show resolved
Hide resolved
04ee2f0
to
a0bb25c
Compare
packages/web-app-files/src/components/FilesList/ResourceTiles.vue
Outdated
Show resolved
Hide resolved
@lookacat I cleaned up the code a little, I like the way where this is going and it looks already fine, but unfortantly the pr renders too much ghost tiles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check why too many ghost tiles are rendered
b1f14ad
to
efce7c4
Compare
efce7c4
to
ea26acb
Compare
packages/web-app-files/tests/unit/components/FilesList/ResourceTiles.spec.ts
Outdated
Show resolved
Hide resolved
worked on the PR myself
packages/web-app-files/src/components/FilesList/ResourceTiles.vue
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. We should probably resolve my first remark, but IMO not a blocker since it works for now.
@@ -363,6 +385,50 @@ export default defineComponent({ | |||
context.emit('fileDropped', resource.id) | |||
} | |||
|
|||
const viewWidth = ref<number>(0) | |||
const updateViewWidth = () => { | |||
const element = document.getElementById('tiles-view') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels quite weird to set the id tiles-view
from the outside and then reference it here because it creates an indirect dependency. I think it would be cleaner to set the id here in the component, or better use a template ref.
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
* Bugfix: Gridview whitespace autosize * Fix large scale * Fix viewoption sizes * Add changelog * Update unittests * WIP * Solution? * WIP * WIP * Remove dev leftover * cleanup code * Calculate max tiles count per row / still needs to be recalculated when the slider value changes * Implement watch for tile-size slider changes * Rename rowCount * Lint, change var to const, remove unnecessary computed * Hide from screen readers * feat: introduce useTileSize composable and watch that for tile sizes * Fix undefined issues * slim mount function * fix: tile pixels and ghost tile count * test: fix viewOptions unit tests * Fixing ResourceTiles.spec.ts tests (WIP) * Fix ResourceTiles.spec.ts * Remove dev leftover --------- Co-authored-by: Jan Ackermann <[email protected]> Co-authored-by: Benedikt Kulmann <[email protected]>
* Bugfix: Gridview whitespace autosize * Fix large scale * Fix viewoption sizes * Add changelog * Update unittests * WIP * Solution? * WIP * WIP * Remove dev leftover * cleanup code * Calculate max tiles count per row / still needs to be recalculated when the slider value changes * Implement watch for tile-size slider changes * Rename rowCount * Lint, change var to const, remove unnecessary computed * Hide from screen readers * feat: introduce useTileSize composable and watch that for tile sizes * Fix undefined issues * slim mount function * fix: tile pixels and ghost tile count * test: fix viewOptions unit tests * Fixing ResourceTiles.spec.ts tests (WIP) * Fix ResourceTiles.spec.ts * Remove dev leftover --------- Co-authored-by: Jan Ackermann <[email protected]> Co-authored-by: Benedikt Kulmann <[email protected]>
Description
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.
See #10040
Related Issue
Screenshots (if appropriate):
Looks bit weird cause of the screenrecording but looks smooth in realtime
chrome-capture-2023-11-5.webm
Types of changes
Checklist: