Show QFieldCloud current storage usage
Description:
This PR implements a ProgressBar that indicates the amount of storage being used in QFieldCloud.
UI Notes:
- Usage under 90%: Blue color
- Usage between 90% and 97.5%: Warning (Yellow) color
- Usage above 97.5%: Red color with a hyperlink that says: “Upgrade to more storage here”
Upcoming:
The API call will be integrated in future PRs, so this feature will remain hidden until those merges are completed.
Glance:
🎉 Ta-daaa, freshly created APKs are available for 24682145cffe71d4c8232277ff481db77ee7e92f: arm64-android
@suricactus , OK to merge this?
Is there a reason to rush with merging this? There is no API that is stabilized yet on the QFC side and also there might be more info we would like to show?
Also, there are still 3 occurances of float/doubles that does not have leading 0, which was never used in the codebase before.
My plan is when we finilize the yearly payments in QFC in the next month or so to open the endpoint that serves this data to the client.
>> Also, there are still 3 occurances of float/doubles that does not have leading 0, which was never used in the codebase before.
That's valid, we need to address this @mohsenD98 .
I would vote to show the "upgrade to get more storage" earlier, ideally users will want to upgrade before they run out of space.
We need something like this first: https://github.com/opengisch/QFieldCloud/pull/1099
(oups, ping @m-kuhn for reply above)
From my perspective, the upgrade should appear with the yellow case already, and I think the yellow threshold should be lower. Maybe 80%
Just an update where we are at here. Since we are introducing quite some changes in billing, we better wait for these changes and then expose the API needed for this PR. Once there, I believe the threshold should be a QFieldCloud setting, that is shared across all clients - mobile, web, sync.
From my perspective, the upgrade should appear with the yellow case already, and I think the yellow threshold should be lower. Maybe 80%
Actually I would always show it. We can change the wording from "Manage storage" to "Upgrade to more storage" at 80%.
@m-kuhn , +1 to always showing and tweaking the label.
I can't state how important I feel this improvement is in my mind. We're operating a storage space without a usage meter and no way for people to easily upgrade on either QFS or QF :)
Google threw this at me today, I love it:
@nirvn, Long time open PR.