-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
LB-1230: Added ability to edit comment after pinning a Listen #2799
Conversation
1. New route added: /pin/update/<id> 2. Adjusted frontent code to use the API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening a PR! It's looking quite good !
I did a first round of review without running the code, but it's looking functional already.
Some questions about return value and statuses below:
Hi, thanks for your feedbacks. I will work on them |
@MonkeyDo I have pushed an update. Please have a look when you feel better :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the modifications, I have a couple more comments but it's looking nice !
Co-authored-by: Monkey Do <MonkeyDo@users.noreply.github.com>
Co-authored-by: Monkey Do <MonkeyDo@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for those changes, the code looks great now !
I deployed the PR to our test server, and it's working nicely! I was able to update a comment without any issue, nice work !
Through testing I do have two more pieces of feedback from a user perspective. Sorry about not realizing sooner !
- It would be useful to have the current pin comment in the textarea when I open the modal to edit the pin. Currently to update a typo I would have to copy the comment first. Left some comments about that below
- I would want the UI to update so that the new text content is shown on the pin card on the page. Also left some comments to that effect, but basically we can consider the call
modal.show(
as a promise and make the modal return a value when the API call succeeds (in this case the updated text).
Actually the current behavior was inlined to what happens when we pin a track. It only shows up in pin when the user refreshes. I have observed this behavior at multiple places in the webapp. That was the reason I tried to keep it inlined to that behavior. |
Yes, I didn't want to muddy the waters by mentioning it, but I did realize the pin is not updated on the page when pinning a track, which is definitely not great UX :) I think since you are working on that feature, and since you noticed it yourself, you will be in a great position to fix that too in your next PR, if you are interested in doing that. |
Hi @lzzy12 ! |
Sorry got caught up with something. Will be finishing it this weekend |
Otherwise the user updates the text and needs to refresh the page in order to see the modifications, which isn't great UX,
I took the liberty to finish this off, hope you don't mind :) |
Problem
Fixes this Ticket:
https://tickets.metabrainz.org/browse/LB-1230
Solution
Added an extra action for pinned listen: