-
Notifications
You must be signed in to change notification settings - Fork 4
Add ability to add/remove watchers on an issue #29
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
Add ability to add/remove watchers on an issue #29
Conversation
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.
Awesome work, thanks!
Just a few changes, and it will be ready to be merged!
I completely agree. I tried to avoid concurrent callback problems by creating the magit-section before requesting the watchers API, saving the location of the section body. It "works", but the problem is that the inserted text isn't really part of the section: you can't collapse it or expand it. It doesn't seem like you can add text to a magit-section outside of the So the solution should be to fetch the data, then create the section, like It seems like it would work if "Other" was at the bottom of the buffer, but that doesn't seem right to me. Comments should be at the bottom, since there can be indefinitely many of them.
Done: b6a8c95
Did you mean this for
Fixed 🤦: 994d5fb. |
There is another option. Trigger the comments load in the callback of the function that shows the watchers after they are obtained (asynchronously) from the API. While the watchers are loading, we are able to see the rest of fields. When the watchers finish loading they are shown and the comments are requested (asynchronously) to 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 you!! I will squash and merge the branch
18a2f68
to
8685301
Compare
In
jira-detail-mode
,w
pops up a transient with commands for adding or removing a user from the watchers list. To make that easier to use, I also added a table mapping Jira display names to account IDs. Now we can offer completion when prompting for a user name.It's not the best to have the watchers commands in a nested transient. There's plenty of room left in
jira-detail--actions-menu
. I originally wanted to use two-letter commandsw +
andw -
, but those don't work for the major mode. So using a nested transient bound tow
means at least the complete key sequences are the same.In my testing, adding watchers works, but removing fails with 403 every time. I can remove watchers on the web page, so I definitely have the correct permissions, and I'm pretty sure the code is correct. Let me know if you have any ideas!