feat(recent-files): allow configuring image grouping#58908
feat(recent-files): allow configuring image grouping#58908cristianscheid wants to merge 6 commits intomasterfrom
Conversation
a9c6f99 to
8a2e1da
Compare
|
/compile |
a9b23e1 to
f08a1c9
Compare
f08a1c9 to
11b45bf
Compare
1da5753 to
e872416
Compare
|
Has this been approved by @nextcloud/designers ? |
susnux
left a comment
There was a problem hiding this comment.
blocking for two reasons:
- This is completely changing the UI/UX and should go through feature planning / @nextcloud/designers review
- Have you properly checked virtual scrolling? What happens if you extend them and then scroll down over the scroll order? Because now one item is no longer a fixed height and that can likely break all of the virtual scrolling
Pinging as requested, thanks for the reminder! @marcoambrosini @kra-mo could you please take a look at this PR to see if it's ok from a design POV? A demo video is available in the PR description, and below is an updated recording after incorporating @susnux suggestions, focusing on the grouping UI in the Recent section: demo.webm |
e872416 to
31ab098
Compare
There was a problem hiding this comment.
IMHO it makes more sense to make this more generic, meaning just make this a group based on mime type. Of cause for now you can use image formats but then we can adjust this if needed anytime and dont create special cases :)
The reason we have comparatively few issues in the files app nowadays is the results of the quite flexible way we changed if when migrated from jQuery.
Hi @susnux, not sure if this is what you meant, but I've tested manually with 2 image groups and 33 images total. Expanding and collapsing groups correctly pushes items down and up without any overlap, gaps, or rendering issues while scrolling. demo.webm |
|
The feature itself looks like a nice enhancement from the design side, however it should definitely not be opt-in and we should definitely not add settings for this in general. See our design guidelines. Can't it just be enabled by default with common image types and that's that, without extra options? |
|
Common image types I guess being |
|
Ah, it's actually using MIME types. In that case, can't it just be |
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
…er to FileEntry component Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
…mports on FilesListVirtual Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
…yntax Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
| v-bind="$attrs" /> | ||
| </template> | ||
|
|
||
| <script lang="ts"> |
There was a problem hiding this comment.
please directly use script setup syntax for all new components, helping to not create new backlog and simplify boilerplate
| @update:modelValue="onSelectionChange" /> | ||
| </td> | ||
|
|
||
| <td class="files-list__row-name" @click="emit('toggle', source.source)"> |
There was a problem hiding this comment.
This must be changed this is not accessible.
You cannot put the event listener on the td element as this is not interactive for keyboard users.
You will have to put in either a proper a or button element with the proper semantics to make this accessible.
| import type { INode } from '@nextcloud/files' | ||
|
|
||
| // eslint-disable-next-line perfectionist/sort-named-imports | ||
| import { type Ref, computed } from 'vue' |
There was a problem hiding this comment.
Please fix instead of ignore this.
| import type { INode } from '@nextcloud/files' | |
| // eslint-disable-next-line perfectionist/sort-named-imports | |
| import { type Ref, computed } from 'vue' | |
| import type { INode } from '@nextcloud/files' | |
| import type { Ref } from 'vue' | |
| import { computed } from 'vue' |
| 'image/png', | ||
| 'image/jpeg', | ||
| 'image/gif', | ||
| 'image/webp', | ||
| 'image/avif', | ||
| 'image/heic', | ||
| 'image/heif', |
There was a problem hiding this comment.
What about tif or other image formats?
We could just always (if grouping is enabled) group by mime group, e.g. image/* and / or video/*
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
bc434eb to
2d9f283
Compare
|
Quick update on the state of this PR:
I'll update the PR asap. |
skjnldsv
left a comment
There was a problem hiding this comment.
Is there some demand for it?
I'm asking because I'm really not sure this is something we want. The files app aims to be as simple as we can, the virtual scroller is already sooo complicated to maintain, this is really not somethign we wanna mess with.
How does it looks like from an accessible POV too ? From a semantic POV ? With a screen reader ?
Personally, while this looks nice, I don't think this have a place on our FIles app as of now. I've never seen this mechanics used in another file browser :)
@nfebe please no yolo on such drastic changes
Thanks for the input @skjnldsv, really appreciated! After internal discussion, this PR will likely not move forward as is. We'll focus on the backend part (exposing configs/flags via OCC) and the frontend changes will probably be dropped. |

Summary
New settings have been added to the Files settings page allowing users to configure image grouping in the Recent Files view.
Behaviour
Visuals
demo.webm
Checklist
3. to review, feature component)stable32)AI (if applicable)