Skip to content
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

Optimistically render when drag-and-dropping event #203

Closed
tyler-dane opened this issue Dec 26, 2024 · 1 comment · Fixed by #209
Closed

Optimistically render when drag-and-dropping event #203

tyler-dane opened this issue Dec 26, 2024 · 1 comment · Fixed by #209
Assignees

Comments

@tyler-dane
Copy link
Contributor

Feature Title

No response

Feature Description

When drag-and-dropping a sidebar event onto the grid, the event currently disappears briefly while the request is made to the backend, and then re-appears after receiving the backend response. This experience is not great UX, as it leaves the user questioning if their change was lost or errored out.

Instead, immediately render the event on the grid and remove the event from the sidebar.

Follow up work from #197, #201, and #190

Use Case

This'll save users the time and brief stress worrying about whether their DND action worked or not

Additional Context

DND.Delay.mov
@that-one-arab
Copy link
Contributor

Assign me this please

that-one-arab added a commit to that-one-arab/compass that referenced this issue Dec 31, 2024
Fixes [issue](SwitchbackTech#203)

In this commit, whenever we drag and drop a someday event to the grid, we now handle:
- Optimistically removing the someday event from the sidebar
- Optimistically inserting the grid event

We also error handle the optimistic flow and revert if needed
@tyler-dane tyler-dane moved this from Ready to In progress in 🏗 Compass Roadmap Dec 31, 2024
@tyler-dane tyler-dane moved this from In progress to In review in 🏗 Compass Roadmap Dec 31, 2024
tyler-dane pushed a commit to that-one-arab/compass that referenced this issue Jan 1, 2025
Fixes [issue](SwitchbackTech#203)

In this commit, whenever we drag and drop a someday event to the grid, we now handle:
- Optimistically removing the someday event from the sidebar
- Optimistically inserting the grid event

We also error handle the optimistic flow and revert if needed
tyler-dane added a commit that referenced this issue Jan 3, 2025
* 🐛 Fix: Optimistically render when drag-and-dropping event

Fixes [issue](#203)

In this commit, whenever we drag and drop a someday event to the grid, we now handle:
- Optimistically removing the someday event from the sidebar
- Optimistically inserting the grid event

We also error handle the optimistic flow and revert if needed

* fix: omit someday properties from optimistic event

'order' and 'recurrence' aren't currently needed for a grid event

* refactor (web): add createOptimisticGridEvent function to cleanup saga

splitting things out of the convertSomedayEvent saga will make the saga more readable

* refactor: simplify optimistic event creation

* refactor(web): separate someday and regular event sagas

this is to make it easier to understand sagas work

* refactor(web): create utility saga to use during someday event conversion

* refactor(web): cleanup convertSomedayEvent saga by separating logic into smaller generators

---------

Co-authored-by: Tyler Dane <[email protected]>
@github-project-automation github-project-automation bot moved this from In review to Done in 🏗 Compass Roadmap Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants