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

feat: remember posts #451

Merged
merged 1 commit into from
Jul 29, 2024
Merged

feat: remember posts #451

merged 1 commit into from
Jul 29, 2024

Conversation

eduance
Copy link
Contributor

@eduance eduance commented Jul 29, 2024

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

@eduance eduance linked an issue Jul 29, 2024 that may be closed by this pull request
@nunomaduro nunomaduro merged commit d6b6573 into main Jul 29, 2024
@nunomaduro nunomaduro deleted the feat/remember-post branch July 29, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Remember post
2 participants