Skip to content

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

Merged
skjnldsv merged 3 commits into
masterfrom
fix/files/quota-warning
Dec 5, 2023
Merged

feat(files): quota warning and disabled upload button#41346
skjnldsv merged 3 commits into
masterfrom
fix/files/quota-warning

Conversation

@skjnldsv

@skjnldsvskjnldsv commented Nov 8, 2023

Copy link
Copy Markdown
Member

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

@skjnldsvskjnldsv added this to the Nextcloud 28 milestone Nov 8, 2023
@skjnldsv
skjnldsv requested a review from a teamNovember 8, 2023 16:51
@skjnldsvskjnldsv self-assigned this Nov 8, 2023
@skjnldsv
skjnldsv requested review from emoral435, nfebe and sorbaugh and removed request for a teamNovember 8, 2023 16:51
@skjnldsv
skjnldsv requested a review from susnuxNovember 8, 2023 16:54
@skjnldsv
skjnldsvforce-pushed the fix/files/quota-warning branch 2 times, most recently from e15eaf2 to 83f04b0CompareNovember 8, 2023 17:48
@blizzzblizzz mentioned this pull request Nov 9, 2023
@blizzzblizzz mentioned this pull request Nov 10, 2023

@emoral435emoral435 left a comment

Copy link
Copy Markdown
Contributor

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
@blizzzblizzz modified the milestones: Nextcloud 28, Nextcloud 29Nov 23, 2023
@skjnldsv

Copy link
Copy Markdown
MemberAuthor

/backport to stable28

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
@skjnldsv

skjnldsv commented Dec 5, 2023

Copy link
Copy Markdown
MemberAuthor

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
skjnldsvforce-pushed the fix/files/quota-warning branch from 83f04b0 to f89ef39CompareDecember 5, 2023 11:10
@skjnldsvskjnldsv 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
Copy Markdown
MemberAuthor

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

@skjnldsv

Copy link
Copy Markdown
MemberAuthor

/backport in #42591

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugfeature: filesregression

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

@skjnldsv@susnux@emoral435@blizzz