gristlabs_grist-core/app/common
Alex Hall 59436d2bca (core) Grace period and delete-only mode when exceeding row limit
Summary:
Builds upon https://phab.getgrist.com/D3328

- Add HomeDB column `Document.gracePeriodStart`
- When the row count moves above the limit, set it to the current date. When it moves below, set it to null.
- Add DataLimitStatus type indicating if the document is approaching the limit, is in a grace period, or is in delete only mode if the grace period started at least 14 days ago. Compute it in ActiveDoc and send it to client when opening.
- Only allow certain user actions when in delete-only mode.

Follow-up tasks related to this diff:

- When DataLimitStatus in the client is non-empty, show a banner to the appropriate users.
- Only send DataLimitStatus to users with the appropriate access. There's no risk landing this now since real users will only see null until free team sites are released.
- Update DataLimitStatus immediately in the client when it changes, e.g. when user actions are applied or the product is changed. Right now it's only sent when the document loads.
- Update row limit, grace period start, and data limit status in ActiveDoc when the product changes, i.e. the user upgrades/downgrades.
- Account for data size when computing data limit status, not just row counts.

See also the tasks mentioned in https://phab.getgrist.com/D3331

Test Plan: Extended FreeTeam nbrowser test, testing the 4 statuses.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3331
2022-03-25 13:41:33 +02:00
..
ACLPermissions.ts
ACLRuleCollection.ts (core) Use MetaTableData more 2021-12-07 17:09:58 +02:00
ActionBundle.ts (core) Log number of rows in user tables in data engine 2022-02-22 00:59:56 +02:00
ActionDispatcher.ts
ActionGroup.ts (core) Crudely show row count and limit in UI 2022-03-14 21:49:32 +02:00
ActionRouter.ts
ActionSummary.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
ActiveDocAPI.ts (core) Grace period and delete-only mode when exceeding row limit 2022-03-25 13:41:33 +02:00
ApiError.ts
arrayToString.ts
AsyncCreate.ts
AsyncFlow.ts
BaseAPI.ts (core) Remove code for unused welcome flows 2022-02-28 13:21:28 -08:00
BasketClientAPI.ts
BigInt.ts
BillingAPI.ts (core) Add some polish to the billing page, particularly for sign-up. 2021-11-04 14:23:53 -04:00
BinaryIndexedTree.js Correct spelling mistakes 2022-02-19 09:46:49 +00:00
BrowserSettings.ts
ColumnFilterFunc.ts
ColumnGetters.ts (core) Adding sort options for columns. 2021-11-03 15:31:39 +01:00
csvFormat.ts
CustomWidget.ts (core) Widget options api 2022-01-13 11:10:17 +01:00
declarations.d.ts (core) Guess date format during type conversion 2022-02-21 22:39:47 +02:00
delay.ts
DisposableWithEvents.ts
DocActions.ts (core) add grist.selectedTable.create/update/destroy/upsert to custom widget api 2022-03-15 11:11:58 -04:00
DocData.ts (core) Fuller guessing of type and options when adding first data to blank columns 2022-03-01 22:00:45 +02:00
DocListAPI.ts (core) Grace period and delete-only mode when exceeding row limit 2022-03-25 13:41:33 +02:00
DocSnapshot.ts
DocumentSettings.ts
emails.ts
EncActionBundle.ts
ErrorWithCode.ts
Features.ts (core) Grace period and delete-only mode when exceeding row limit 2022-03-25 13:41:33 +02:00
FilterState.ts
Formula.ts
GranularAccessClause.ts (core) Use MetaTableData more 2021-12-07 17:09:58 +02:00
GristServerAPI.ts
gristTypes.ts (core) Conditional formatting rules 2022-03-23 13:15:02 +01:00
gristUrls.ts (core) Restoring cursor position on raw data views 2022-03-23 12:24:18 +01:00
gutil.ts (core) add grist.selectedTable.create/update/destroy/upsert to custom widget api 2022-03-15 11:11:58 -04:00
InactivityTimer.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
isHiddenTable.ts (core) New type conversion in the backend 2022-02-04 20:28:13 +02:00
KeyedMutex.ts
KeyedOps.ts
LocaleCodes.ts
Locales.ts
LoginSessionAPI.ts (core) Add account page option to allow Google login 2022-02-14 16:56:23 -08:00
LoginState.ts
marshal.ts
MemBuffer.js
NumberFormat.ts (core) Guess numeric formatting options 2022-03-03 21:32:03 +02:00
NumberParse.ts (core) Guess numeric formatting options 2022-03-03 21:32:03 +02:00
orgNameUtils.ts
parseDate.ts (core) Lossless imports 2022-03-08 12:14:39 +02:00
plugin.ts
PluginInstance.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
Prefs.ts (core) Record new user sign-ups 2022-03-12 14:34:46 -08:00
RefCountMap.ts
resetOrg.ts (core) move more tests to grist-core 2021-12-10 18:33:07 -05:00
roles.ts
RowFilterFunc.ts
schema.ts (core) Conditional formatting rules 2022-03-23 13:15:02 +01:00
ShareAnnotator.ts (core) annotate guests of other docs correctly in UserManager dialog 2021-12-09 12:57:52 -05:00
sharing.ts
SortFunc.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
SortSpec.ts (core) Adding sort options for columns. 2021-11-03 15:31:39 +01:00
StringUnion.ts
TableData.ts (core) Guess date format during type conversion 2022-02-21 22:39:47 +02:00
TabularDiff.ts
tagManager.ts (core) Record new user sign-ups 2022-03-12 14:34:46 -08:00
tbind.ts
TestState.ts
timeFormat.ts
tpromisified.ts
tsconfig.json
tsvFormat.ts
UIRowId.ts
uploads.ts
urlUtils.ts
UserAPI.ts (core) Migrate to SRP and add change password dialog 2022-03-16 21:35:06 -07:00
UserConfig.ts
ValueConverter.ts (core) Use visible column formatting when converting RefList to Text 2022-02-12 09:45:57 +02:00
ValueFormatter.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
ValueGuesser.ts (core) Lossless imports 2022-03-08 12:14:39 +02:00
ValueParser.ts (core) Lossless imports 2022-03-08 12:14:39 +02:00