fix(files): handle empty view with error
- Resolves: https://github.com/nextcloud/server/issues/45190
- Same issue for any errors: no permissions, not found, server unavailable etc.
Summary
Handles error during content fetching.
In Nextcloud 27 in case of an error it redirected to the / root and (sometimes) showed a toast message with an error.
https://github.com/nextcloud/server/blob/ba452f953c0bed415014b3123aed96bef3883888/apps/files/js/filelist.js#L2256-L2296
After migrating to Vue, there is no error handling. It just shows a folder as an empty folder.
It is especially confusing when it was supposed to be a valid link:
- Unshared/deleted shared folder
- Unavailable storage
It looks like the folder is available, just empty.
I found redirecting to the root less convenient to a user in flavor of explicitly showing an error and a button to reload it.
But I'm not sure about the text/design.
Screenshots
| Before | After |
|---|---|
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
- [ ] Backports requested where applicable (ex: critical bugfixes)
Icon is updated
Rebased onto master, squashed
/backport to stable30
/backport to stable29
The backport to stable29 failed. Please do this backport manually.
# Switch to the target branch and update it
git checkout stable29
git pull origin stable29
# Create the new backport branch
git checkout -b backport/48625/stable29
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 2696715d 080a8c7f 18d52323 ed9fdbad
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/48625/stable29
Error: No changes found in backport branch
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.