wasp/waspc/src/Wasp
Filip Sodić fbf6de0d4d
Fix flickering UI in optimistic updates (#668)
* Fix query cache key generation issue

* Make waspc/todoApp return tasks in consistent order

* Implement basic support for optimistic updates

* Fix query cache key generation issue again

* Add action counter to prevent flickering updates

* Add remove todo to action counter

* Count only optimistically updated cache keys

* Make waspc/todoApp return tasks in consistent order

(cherry picked from commit 57606c74e4)

* Reduce duplication in frontend actions and queries

* Fix formatting

* Fix optimistic updates after merge

* Experimenting

* Hash queries before counting

* Rename parameters in counter

* Add task done toggling to task page

* Fixes after merge

* Fix wrong condition in example todo app

* Simplify counter with react-query's internal hash

* Remove console log and add notes

* Clear up some todos and tidy up

* Fix formatting

* Remove leftover todo

* Fix a bug that caused double action calls

* Simplify query key hashing function

* Revert accidental blog changes

* Revert accidental blog changes

* Apply optimistic updates on each query response

* Clean up code for optimistic updates

* Clean up more code for optimistic updates

* Remove redundant optimistic update tuple list

* Rename query to queryKey

* Return previous data from onMutate

* Move counter into the constructor function

* Move updatesHandler into the constructor function

* Remove debug logs from optimisticUpdatesMap

* Rename and refactor optimistic updates

* Fix typo in comments

* Remove the option to directly specify query key

* Remove flickering fixes for optimistic updates

* Add optimistic updates to Task.js

* First round of code review feedback

* Remove react query's additional options from hook

* Futher review feedback and code docs

* Fix and document error handling for optimistic updates

* Fix formatting and remove comment

* Further document optimistic update mechanisms

* Fix memory leak in updates handler map

* Update optimistic update docs

* Improve comment for useAction

* Further improve comments in actions/index

* Heavily comment actions/index

* Fix capitalization in action/index

* Add types to actions/index

* Fix jsdoc types in actions/index

* Comment testing sleeps

* Comment sleep function in todoApp/ext/actions

* Properly handle type errors in actions/index

* Fix formatting in actions/index

* Rename an argument in actions/index

* Move updateFn change to optimistic update instantiation

* Extract common functionality in actions/index

* Reuse common functionality for optimistic updates

* Fix formatting in actions/index

* Comment the internal action mechanism

* Add jsdoc types to actions/index

* Revise jsdoc in actions/index

* Document makeOptimisticUpdateMutationFn

* Add updateQuery constraints

* Address PR comments

* Update e2e tests

* Mention optimistic updates in cache invalidation

* Further elaborate updateQuery constraints

* Update e2e tests
2022-09-22 00:17:00 +02:00
..
Analyzer Adds Google as an authentication method (#669) 2022-09-06 14:35:59 -04:00
AppSpec Adds Google as an authentication method (#669) 2022-09-06 14:35:59 -04:00
Generator Fix flickering UI in optimistic updates (#668) 2022-09-22 00:17:00 +02:00
Psl Made Dependencies and Entity full-featured (in AppSpec and Analyzer) (#374) 2021-11-26 15:26:03 +01:00
Util Removed duplication between waspls and waspc, made them two packages in the same cabal project (#712) 2022-09-06 14:10:42 +02:00
Analyzer.hs Allow Wasp identifiers for project names (#520) 2022-03-30 01:25:56 +02:00
AppSpec.hs Adds support for basic Wasp job DSL parsing (#540) 2022-04-06 10:07:45 -04:00
Common.hs fix: Propagates deletion of DB migrations dir from Wasp src to the generated project (#383) 2021-12-13 12:06:42 -05:00
CompileOptions.hs Make warnings filterable to avoid redundant messages (#610) 2022-06-02 14:04:57 -04:00
Data.hs Moved all src/ modules into Wasp module, and all cli/ modules into Wasp.Cli module. 2021-11-11 13:26:20 +01:00
Error.hs Replace Wasp with AppSpec and Parser with Analyzer. (#423) 2022-01-20 11:45:14 +01:00
ExternalCode.hs Moved all src/ modules into Wasp module, and all cli/ modules into Wasp.Cli module. 2021-11-11 13:26:20 +01:00
Generator.hs Require LTS version of Node for Wasp (#504) 2022-03-21 15:00:19 +01:00
Lib.hs Make warnings filterable to avoid redundant messages (#610) 2022-06-02 14:04:57 -04:00
Message.hs Migrated Wasp from Stack to Cabal (#471) 2022-03-16 16:00:18 +01:00
NpmDependency.hs Moved all src/ modules into Wasp module, and all cli/ modules into Wasp.Cli module. 2021-11-11 13:26:20 +01:00
SemanticVersion.hs Make SemanticVersion module more expressive 2022-08-26 16:46:55 +02:00
Util.hs Adds Google as an authentication method (#669) 2022-09-06 14:35:59 -04:00
WaspignoreFile.hs Moved all src/ modules into Wasp module, and all cli/ modules into Wasp.Cli module. 2021-11-11 13:26:20 +01:00