-
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
[full-ci] Display resources in GenericSpace
as tiles
#7991
Conversation
packages/web-app-files/src/components/FilesList/ResourceTable.vue
Outdated
Show resolved
Hide resolved
I have merged #7940 today - could you rebase this PR and include all your design system changes directly in web? 😁 |
228c132
to
1cac617
Compare
Done! 🐎 |
1cac617
to
7ab84df
Compare
flex-wrap: wrap; | ||
flex-direction: row; | ||
gap: 15px; | ||
justify-content: flex-start; |
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.
justify-content: flex-start; | |
justify-content: space-around; |
is much more pleasant for the eye regarding spacing, but any time the last row is incomplete (i.e. not the same number of tiles as in the other rows) the tiles in the last row are centered, which doesn't look good... maybe we need some magic dummy 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.
The horizontal spacing is nice, but then the vertical spacing doesn't match with this change alone
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.
Could you re-render with the updated tile size during modification of the slider value? The URL query param changes immediately when you reach the next tick on the slider, but the tiles only update after you finished sliding the slider.
The main concern I have with your proposal of calculating the tile sizes based on the viewport size is that it stops to work good as soon as the viewport width becomes VERY large. E.g. @dschmidt with his ultra wide screen would have quite large tiles in the smallest scale. That's the reason why we wanted to have tile sizes based on multiples of a certain REM value, not based on the viewport size. I still think that it's a good idea... (edit: that means that I'd root for your "option 1", which is the default in this PR. "option 2" doesn't work for large screens in my opinion)
with rem option in I agree with @kulmann that the latter is waaay to big for the smallest setting |
Refined proposal I discussed with @kulmann
space-aroundish"-behaviorscreenshot_000014-converted.mp4vertical space increases ~ tiles size |
7ab84df
to
203ef20
Compare
203ef20
to
f25e7af
Compare
725db18
to
d8ccbbd
Compare
createFileAction, | ||
createFolderLink | ||
} | ||
} |
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.
Just a nitpick, we usually just re-rexport from index.ts
and put composables in their own files.
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.
Good point thx, I will split it up (and also add tests etc) when it's time ;P
:size="totalFilesSize" | ||
/> | ||
</template> | ||
</resource-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.
Is the plan to use component :is='...'
in the long run?
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.
Not 100% sure yet tbh, I faced some problems of the GenericSpace
not handling events being thrown by the switched-out component. Up for discussion I suppose, I can see another possible strategy that's pretty lean code-wise evolve :)
aa809c1
to
efce827
Compare
GenericSpace
as tiles
@kulmann could I get a cursory review here (mostly about UI/UX aspects, the code changes will receive some what-goes-where refactoring and are not yet final)? Known issues as of now:
|
Update - I investigated some more and navigation inside folder in a space does work, but is horribly inefficient (browser freezes, and navigation takes place ~40s after clicking). My suspectis the dynamic |
Update - starting it with |
027af34
to
f3c3bd9
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.
Awesome state / progress! Some tiny nitpicks, see comments. And I have two issues that you might decide to solve in a followup (also see screenshot):
- text truncation happens too early, there is a lot of horizontal white space left.
- preview size is sometimes shrinked / stretched. That's weird. object-fit and aspect-ratio don't seem to have an effect, I can disable the props and nothing changes (I wanted to try out if
contain
looks better, but didn't happen).
background-color: var(--oc-color-background-highlight) !important; | ||
box-shadow: 3px 0 10px rgb(0 0 0 / 15%); |
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 keep the box-shadow as none
like before, but add outline: 1px solid var(--oc-color-border);
instead. Discussed it with @tbsbdr that's how we want to start. Already had too much harsh feedback with shadows in other places of oC Web. 😅
return [ | ||
ViewModeConstants.tilesView, | ||
ViewModeConstants.condensedTable, | ||
ViewModeConstants.default |
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 change order to
- condensed
- default
- tiles
@click="$emit('click', $event)" | ||
/> | ||
<div class="oc-flex oc-flex-middle oc-text-truncate resource-name-wrapper"> | ||
<oc-resource :resource="resource" :folder-link="resourceRoute" @click="$emit('click')" /> |
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.
<oc-resource :resource="resource" :folder-link="resourceRoute" @click="$emit('click')" /> | |
<oc-resource :resource="resource" :folder-link="resourceRoute" :is-thumbnail-displayed="false" @click="$emit('click')" /> |
Thumbnails must be disabled here. Otherwise you might have glitchy situations where the OcTile has a large preview at the top and a small thumbnail in the bottom area. Managed to create that situation, don't have a formula to reproduce it, sorry. 👀
Played around with gap- and tiles sizes. The easiest way to avoid too much unbalanced gaps is to reduce the tiles size. Tilesize 250px -> big gaps ❌screenshot_000192.mp4Tilesize 160px -> small gaps ✅screenshot_000194.mp4.oc-tiles {
display: grid;
grid-template-columns: repeat(auto-fill, 160px);
row-gap: 32px;
column-gap: 8px;
justify-content: space-between;
.oc-tiles-item {
width: 160px;
@media (max-width: $oc-breakpoint-xsmall-max) {
width: 100%;
}
}
} I also removed the leading file-icon from the small tiles. @kulmann @pascalwengerter I'm in favour of small tiles as long as we don't have the slider. Do you agree? |
2779902
to
e4f086d
Compare
Results for acceptance oC10 https://drone.owncloud.com/owncloud/web/32303/20/1 |
…set tile Imagedimension to available size
…n work for ResourceTable/ResourceTiles
Thanks @JammingBen for a second pair of eyes! @kulmann ready for final review and please squash-merge this! |
Kudos, SonarCloud Quality Gate passed! |
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.
😍
Related Issue
Screenshots (if appropriate):
Types of changes
Checklist: