Closed nazmulidris closed 1 year ago
Hey, @nazmulidris, , I'd like to work on this issue. Could you please assign this issue to me?
@soykot2910 Awesome, this is all yours!
@soykot2910 I just went through a major refactor of the code base ("promise-ifying" the chrome.storage API so it is easy to use), so hopefully this will make it easier to work with.
@nazmulidris thanks for the refactor. I'm having trouble understanding it fully. What do you mean by that if existing shortlink exists, then just open that, Also should I automatically add the 'replace' command for users, or should they have the option to use it themselves?
@soykot2910 Thanks! The refactor simplified the code (using async/await and getting rid of callbacks).
The intention behind this issue is to keep users from clobbering an existing shortlink by mistake.
Currently this will clobber / overwrite the old value of "foo" with the new one.
Does that make sense? Please let me know if you have any questions 🙏🏽
@nazmulidris thanks for the clarification.
@soykot2910 What do you think of asking the user for confirmation? That could be another way to satisfy the intention of "not clobbering foo" by mistake 👍🏽 .
Yeah, I think that would be more user-friendly.
@soykot2910 Thinking through all the states.
Alternatively, we can just prompt the user and ask them for confirmation. It would be great to allow the user to use the keyboard to accept / reject this overwrite operation. If they choose to reject the overwrite, then we can just close the popup.tsx. Optionally: to make the flow more complex, we could then ask the user if they want to name the shortlink something other than "foo".
@soykot2910 I can be convinced to go either way 😄 . Path 1 or 2 both sound good to me. If you have a preference for 1 we can go with that, or 2 if you like that better.
@nazmulidris I'd like to go for option 2.
@soykot2910 Let's go with Option 2 👍🏽 That sounds good to me!
@nazmulidris I want to proceed something like this.
@soykot2910 That flow sounds incredible! Thank you and please let me know if I can help w/ any of it.
Do you have any preference for a branch name? I want to make a pull request.
@soykot2910 Any branch name is good. Looking forward to your PR. Also if you would like to chat about PRs, this is the discord channel for the project: https://discord.gg/UejyhKfx
Here is the PR. I am new to open source, so let me know if I need to change anything.
@soykot2910 Thank you so much for your contribution. Welcome to world of open source contribution; you are doing great 🎉 . I will let you know if I have any comments on the PR 👍🏽
@soykot2910 Fantastic work! My only feedback is to use this feature of github.com to associate a PR with an issue (or vice versa).
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
I've merged your PR into the main branch and have added the hacktoberfest-accepted label to your PR as well! 🙏🏽
@soykot2910 Also we have a discord server if you would like to chat about PRs & issues: https://discord.gg/UejyhKfx
@soykot2910 Just wanted to let you know that your contribution is already live. I just cut a release for v3.1 of the extension and published it to the Chrome store 🎉
If there are other issues you would like to contribute to please let me know! 👍🏽
Wow, that's great news!
Currently when you type "foo", a new shortlink will be created or an existing one will be updated.
Change the behavior so that if existing shortlink exists, then just open that. Add a "replace / r" command to replace an existing shortlink.