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

🐛 BUG: facing a bug while posting a new post. #1261

Open
1 task done
syedahmedullah14 opened this issue Jul 7, 2024 · 4 comments
Open
1 task done

🐛 BUG: facing a bug while posting a new post. #1261

syedahmedullah14 opened this issue Jul 7, 2024 · 4 comments

Comments

@syedahmedullah14
Copy link

What went wrong? 🤔

While writing a new post title and description inputs are already gets filled with a recent post's content. Also when write something in this input boxes and navigate to "share a link" tab and then come back to the "new post" tab, all my written content is longer displayed and I have to write them again.

Expected Behavior

It should behave normally and let the user type in the empty input boxes and while navigating in "share a link" and "new post" tab and written data must not get erased.

Steps to Reproduce Issue

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See the error

Solution Proposed

First we need to prevent the data that is being populated by default with some previous post values when user is trying to write a new post and this is very basic, we can simply initialize the input boxes with empty strings. And for the second problem of written data being erased while navigating back to "new post" tab, you can to store the written data of "new post" tab when user clicks on "share a link". These are some random solutions, I know you guys will come up with much better ones.

Screenshots

![Already populated text](https://drive.google.com/file/d/1UfOEwcqmXiJzly5w-JAWeftY5Y9YB8ph/view?usp=sharing)

![Written text being erased after navigating back to "new post"] tab(https://drive.google.com/file/d/1_gD-Cw9CzODS7mP0RgM7WiLtpkpuAtKJ/view?usp=sharing)

Environment

No response

Browsers

Brave

OS

Windows

Version of daily.dev

No response

Additional Context

No response

Code of Conduct

  • I follow the conditions of this project.
@idoshamun
Copy link
Member

Hi @syedahmedullah14,

Thanks for the report. We will look into it

@syedahmedullah14
Copy link
Author

Hi @idoshamun please lemme know if I can contribute to this.

@sshanzel
Copy link
Member

@syedahmedullah14 thank you for reporting the issue! Feel free to use our GitPod setup to run the development environment. Inside the codebase, we have a component called WriteFreeformContent that houses the whole writing process. It involves working with a hook called useDiscardPost that manages the draft that is then stored in browser storage.

@syedahmedullah14
Copy link
Author

@sshanzel surely I will look into it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants