-
Notifications
You must be signed in to change notification settings - Fork 15
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
🐛 fix: keep new event on grid during save #197
🐛 fix: keep new event on grid during save #197
Conversation
4e85f7f
to
2105935
Compare
…Event() the event schema is meant to more closely represent the data model. optimistic shouldn't be part of the data model
for consistency with other boolean naming
without upgrading the target, TypeScript is unable to iterate through a generator without the --downlevelIteration flag or a --target of es2015 or higher. This issue arises because the yield* expression is used to delegate to another generator function, and TypeScript needs to be able to iterate through the generator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna do a little more cleanup and QA, but this is in pretty good shape.
Thanks, @that-one-arab!
Thanks @tyler-dane ! I'll keep an eye on the cleanups you're doing, learn new things in the process. |
Removed TODO comment. We're probably better off sticking with passing ids to conform to the codebase
030b763
to
6a57e09
Compare
@tyler-dane I added additional commits that continues from where you left off |
instead, we're deriving this value by the id itself. if it's prefixed with "optimistic", we know it's an optimistic event. by removing this from the schema, we prevent ui fields from creeping into our database and cut down on the parsing we have to do in the redux slice/sagas
previously we swapped the id key, but we also have to swap the nested id value in order to completely replace the optimistic event with the actual event
Just made a few more tweaks, but we can consider this done! I'm going to hold off on merging until after I've had the chance to deploy it to prod. |
Alright, deployed and tested. Congrats on your first PR! 🙌 |
Fixes this
Uses an optimistic UI rendering approach.
I believe Optimistic UI approach is the simplest and easiest solution under the current circumstances.
There are a couple of edge cases that needs to be handled that I believed were out of scope of this issue, but should be tackled in the future; during the timespan where the optimistically generated event is created and the HTTP request returns a response from the server:
We can tackle these separately