server icon indicating copy to clipboard operation
server copied to clipboard

feature: personal views

Open emoral435 opened this issue 1 year ago • 2 comments

Issue Summary

Context: For #42919

With heavy use of Group Folders, the All Files menu view is confusing for the user who gets his/her personal files mixing >with organization files. Currently there is no option on top level to have filtered view only showing a user their own files. Describe the solution you'd like

Add an entry Personal files to the left menu, directly below All files, showing:

only user files no groupfolders no items shared from other people

OVERVIEW / FRONTEND LOOK

Quick GIF View

firefox_UlvxgyFkts

File sharing comparison

🏚️ Admin View 🏡 Janes View
admin all files jane all files
image image
admin personal files (root) jane personal files (root
image firefox_KumFQsCbr2

Clarifications

  • User clicks on "Personal Files" from the Sidebar, and using folder API's, filters group-folders, shared folders/files that do not belong to the User
  • When a folder is shared to another person, any file or folder that person makes belongs to whoever the 'root' folder belongs too EXAMPLE: admin owns adminFolder. admin shares adminFolder to jane who then makes a file called janesFile in adminFolder adminFolder -> janesFile admin, who owns the adminFolder, now owns janesFile (this is how it already works in Nextcloud)

Implementation

  • Added new view to the files view that filters each file/folder that the user uploaded / created / owns
  • Each view from there filters out each sub-file that they did not upload / create / own, but only is really important at the root level

TODO

  • [x] Add "Personal Files" to the sidebar
  • [x] Implement correct views and routes to personal files
  • [x] Filter Files and Nodes correctly using @nextcloud/files and WebDAV API's correctly

GOING FORWARD

  • [ ] Get design team and mobile team on board with this change, and sync up with them
  • [ ] Add tests for the view (waiting for confirmation that what I have so far matches what the design team agrees with)
  • [ ] Backport this feature and its tests
  • [ ] Fix any issues that come up (hopefully none 😭)

Checklist

emoral435 avatar Jan 30 '24 15:01 emoral435

Using this just to draft my PR for the personal files view :) no reviews needed yet!

emoral435 avatar Jan 30 '24 15:01 emoral435

TLDR for the reviewers:

  • Need a review from the design team to know I can go forward with making tests for the view 👍
  • Checkup with @tobiasKaminsky to see if our assumptions are similar so that the mobile and web team can be on the same page
  • My fellow frontend reviewers to absolutely cook this PR for any flawed logic 🙏🙈

If anything needs clarification, just let me know!

emoral435 avatar Feb 02 '24 18:02 emoral435

Nice! Looking good! :) I would suggest that a heading be added to the personal files view, otherwise I imagine users can get lost, or are confused about why a file disappeared suddenly.

It can be a part of the home icon in the breadcrumbs bar. So would it be possible to make it look like a icon+text tertiary button, like [home icon] Personal files? :)

nimishavijay avatar Feb 05 '24 10:02 nimishavijay

Both of these changes are wonderful details to either change / improve on! I can definitely add both suggestions.

I agree that differentiating the views by breadcrumb navigation is something that would be a small change, but a good stylistic one at that. Will adjust the PR accordingly.

emoral435 avatar Feb 05 '24 23:02 emoral435

firefox_QiHyTJ2z9W

@nimishavijay This is how the implementation looks! IMO, I think that having this now makes this view look a bit different from the rest - I think that having the rest of the views have something similar where we append the view name at the end of the file name would now make this much cleaner, no? This is certainly possible as well.

EDIT: also talked with @skjnldsv and we agreed that the breadcrumbs, in our personal opinion, should have this change applied to each view :) it would easy to implement as well!

EDIT2: cc @nimishavijay , forgot to cc again last week after guided PR with frontenders😅

emoral435 avatar Feb 06 '24 01:02 emoral435

Utilized the getContents from the Files view, then filtered from there. Simplified the codebase a lot 🐘

emoral435 avatar Feb 06 '24 18:02 emoral435

UPDATE: We need to get this issue merged in ASAP for the next major release, so for now, the design aspect with the breadcrumbs can be left for another PR! Will adjust this accordingly, leaving the other PR that may be used for later!

emoral435 avatar Feb 13 '24 16:02 emoral435

Enabling auto-merge to hopefully get the feature out by Thursday night 👍

emoral435 avatar Feb 14 '24 17:02 emoral435

Why is psalm suddenly failing :facepalm:

skjnldsv avatar Feb 15 '24 08:02 skjnldsv