Make adding/editing/deleting comments as if they were instant
Resources
PM @victorwu | UX @dimitrieh | FE @kushalpandya
Description
- Make adding comments on issues and merge requests appear as if they were added instantly.
- Same for editing comments.
- Same for deleting comments.
Design
- Per https://gitlab.com/gitlab-org/gitlab-ce/issues/27614#note_22751335.
- When you submit a comment, it appears automatically on the page, to the user.
- There may or may not be any spinner/loading UI. But the comment itself appears instantly, i.e.: https://gitlab.com/gitlab-org/gitlab-ce/issues/27614#note_23034345.
- In the background, the comment is persisted to the system.
- If there is an error, there is essentially a callback, and an error message on the FE. If there is no error, nothing happens.
- If certain parts to the text need the server response, they are just updated afterward, i.e. https://gitlab.com/gitlab-org/gitlab-ce/issues/27614#note_22719632.
- There should be a fade in for the comment, similar to: https://docs.gitlab.com/ee/development/ux_guide/animation.html#quick-update.
Original description
GL is slower than GH and BB at the moment. We are working on it. But in the mean time there are a few things we could do to make ourselves appear faster.
The main idea is to just do things as if they worked right away and show the status after.
For example. Take the comment as a first example.
This is the current way it works.
That slight delay is the difference between ok and awesome.
What if we just show the comment right away. Put up some sort of small status to show it is loading. Add the tiniest little animation to show it going into place.
The idea that it already went through I think is more satisfying then waiting for it to go through.
We would need to render markdown in JS to do it.
It's the difference between stopping someone from doing something and allowing them to do something.
Start with comments.