server
server copied to clipboard
feature: personal views
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
File sharing comparison
🏚️ Admin View | 🏡 Janes View |
---|---|
admin all files | jane all files |
admin personal files (root) | jane personal files (root |
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
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [x] Screenshots before/after for front-end changes
- [x] Documentation (manuals or wiki) has been updated or is not required (NOT REQUIRED)
- [ ] Backports requested where applicable (ex: critical bugfixes)
Using this just to draft my PR for the personal files view :) no reviews needed yet!
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!
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
? :)
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.
@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😅
Utilized the getContents from the Files view, then filtered from there. Simplified the codebase a lot 🐘
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!
Enabling auto-merge to hopefully get the feature out by Thursday night 👍
Why is psalm suddenly failing :facepalm: