-
Notifications
You must be signed in to change notification settings - Fork 14
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
Keep new event on grid during save #145
Comments
May I work on this one? |
You bet! Assigned it to you and marked it as In Progress |
I'm having some difficulty understanding the event creation flow. In the EventForm component, there is the |
Pretty close! The only piece that's missing is the connection between Redux and Redux Saga. See That slice then calls Here's how to think about the request flow:
As you're seeing, this is all unnecessarily complex and requires a lot of code. In the future, I'd like to move away from Redux Saga and towards TanStack/Remix/Next. However, that's not a top priority now. For this issue, let's just focus on using the tools and patterns that are in currently in place. |
Great. I took some time to re-read Redux Saga's docs, and things got way clearer now. I'll keep sharing the updates. |
So my plan was to remove the There is also a point I'm a bit stuck right now: the rendering logic of Draft.tsx. As I've seen, its rendering depends on two variables: |
@murilo9 You make a good point about how keeping separate state values makes it tricky. Some of the state is only local ( To keep consistent with the idea from this comment in #150, let's try to make this work without making big changes to how Here is a proof-of-concept on how to do that. It copies the draft state, except when the state is |
Unassigned and moved back to Ready based on this PR comment |
Prerequisites
Expected Behavior
Event rectangle is always present.
Current Behavior
Event rectangle disappears from the screen temporarily while the event is being saved
Steps to Reproduce
Optional: set network to slow 3G to increase delay
Click grid or all day row to create new event
Notice: event disappears from screen and then reappears
Possible Solution (Not obligatory)
This is apparent only during creating a new event, because there is no existing grid event to fall back on when the draft event is disappearing. There needs to be some way to either preserve the draft event on the screen or optimistically render the regular event without waiting for a successful response from the server. If going down the optimistic rendering route, be sure to handle how to revert the event if the save failed.
Context
As a result, users are less confident that their changes will be saved.
The text was updated successfully, but these errors were encountered: