Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Imagine spending 10 minutes writing a post and then losing it? This could significantly decrease the user experience.
So what we do, is similar to how Linear handles this, is we remember it for you.
The thing is, a user does not want their reply on a specific comment with a different comment, so we have to remember it by post. If you're writing a new post, we just want to remember the new post.
Now, imagine you're writing a long post, there is this important use case you do want to remember the entire post and have it autosized, this is what we do now.
While working on this I did notice some slow rendering with the UI, but I suppose this must be because its extremely fast on local servers and I expect this not to be visible on production. One way we could counter this is by using placeholders on our replies.
I also used the autosize npm package which was a more suitable solution as it also accounts for resizing on initial load, some annoying edge cases and even takes into consideration when using a placeholder and accounting for the height it takes.
I've created a Loom where you can see the magic in action.
Let me know if you guys have any suggestions, questions or feedback. I'd love to hear them.
Be careful if you have epilepsy, I'll turn on paint flashing at the end to show the rendering of DOM nodes.
https://www.loom.com/share/5a3a0e55a16e482db87771dd80c11221?sid=8d573565-d69e-4c93-9cf6-b07f6a4f8bf8