Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(files): quota warning and disabled upload button #41346

Merged
merged 3 commits into from
Dec 5, 2023

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Nov 8, 2023

Missing from F2V
Fix #41113
Fix #41020

Quota warning

  • This is now just a closable tooltip
  • This is shown:
    • on page load if quota is reached
    • on upload or navigating ONLY ONCE; and if free space changes from > 0 to 0
      This will prevent spamming with notifications and still warn people on sudden change

Upload button

This PR also fixes the Upload button not being disabled on quota exceeded
2023-11-08_17-33

Upload error handling

Last commit also adds some better error handling
Unfortunately most of the server error messages remains untranslated, so we will use our own, despite the server potentially providing a bit more context.

Example:

Insufficient space in /Folder, 156416515 required, 0 available

Versus

Not enough free space

@skjnldsv skjnldsv added this to the Nextcloud 28 milestone Nov 8, 2023
@skjnldsv skjnldsv requested a review from a team November 8, 2023 16:51
@skjnldsv skjnldsv self-assigned this Nov 8, 2023
@skjnldsv skjnldsv requested review from nfebe, sorbaugh and emoral435 and removed request for a team November 8, 2023 16:51
@skjnldsv skjnldsv requested a review from susnux November 8, 2023 16:54
@skjnldsv skjnldsv force-pushed the fix/files/quota-warning branch 2 times, most recently from e15eaf2 to 83f04b0 Compare November 8, 2023 17:48
@blizzz blizzz mentioned this pull request Nov 9, 2023
@blizzz blizzz mentioned this pull request Nov 10, 2023
Copy link
Contributor

@emoral435 emoral435 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really liked these changes. Only comment would be if there is any way there is any way that there is less than 0 free storage space, the strict comparison with " === 0 " might not pass, and " <= 0" might be better.

But if not, I really liked the changes committed here!

This was referenced Nov 14, 2023
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
@skjnldsv
Copy link
Member Author

skjnldsv commented Dec 5, 2023

/backport to stable28

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
@skjnldsv
Copy link
Member Author

skjnldsv commented Dec 5, 2023

Really liked these changes. Only comment would be if there is any way there is any way that there is less than 0 free storage space, the strict comparison with " === 0 " might not pass, and " <= 0" might be better.

quota-available-bytes can be negative yep :)
But storageStats.free cannot afaik.

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
@skjnldsv skjnldsv force-pushed the fix/files/quota-warning branch from 83f04b0 to f89ef39 Compare December 5, 2023 11:10
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Dec 5, 2023
@skjnldsv
Copy link
Member Author

skjnldsv commented Dec 5, 2023

files/files_copy-move.cy.ts also failing on master

@skjnldsv skjnldsv merged commit 788fc78 into master Dec 5, 2023
48 of 51 checks passed
@skjnldsv skjnldsv deleted the fix/files/quota-warning branch December 5, 2023 13:18
@skjnldsv
Copy link
Member Author

skjnldsv commented Jan 5, 2024

/backport in #42591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish backport-request bug feature: files regression
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: Hint for no space in files is gone for >= NC26 [F2V] Show storage almost full and full warning
4 participants