server icon indicating copy to clipboard operation
server copied to clipboard

fix(files): handle empty view with error

Open ShGKme opened this issue 1 year ago • 1 comments

  • 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
image image

Checklist

ShGKme avatar Oct 09 '24 10:10 ShGKme

Icon is updated

image

ShGKme avatar Oct 17 '24 12:10 ShGKme

Rebased onto master, squashed

ShGKme avatar Oct 25 '24 11:10 ShGKme

/backport to stable30

ShGKme avatar Oct 25 '24 12:10 ShGKme

/backport to stable29

ShGKme avatar Oct 25 '24 13:10 ShGKme

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.

backportbot[bot] avatar Oct 25 '24 13:10 backportbot[bot]