-
Notifications
You must be signed in to change notification settings - Fork 139
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 review comments to PR buffers #105
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.
This is kind of a test review for this PR features. But I have the following issues which might not be related directly to it. When I now call Octo pr list
I get the following error I did not before (but could also be a Telescope update:
Error executing vim.schedule lua callback: ...test_site/pack/packer/opt/octo.nvim/lua/octo/writers.lua:129: bad argument #1 to 'ipairs' (table expected, got nil)
EDIT:
The other issues is that if I hit <CR>
while writing the final submit message I get an error (I can't see atm). And the second time I hit the key it just submitted it...
While I was hitting E5108: Error executing lua ...test_site/pack/packer/opt/octo.nvim/lua/octo/reviews.lua:268: attempt to call field 'write_virtual_texxt' (a nil value) And while I tried to paste this error message with And again while I try to safe this buffer to add a review comment I get the error: Obviously I was not able to add this comment via Octo. So I copied it and pasted it to the web-browser. |
Just fixed it
Are you using delimate or similar plugin?
Ups, that was a typo in a recent refactor, should be fixed now
Not sure about this one, not sure is Octo related
This could be caused by any of the previous errors. Please try again with latest fixes Thanks! |
Thanks for the fast response! 🙃
Yes. In combination with I'll check it again tomorrow. Or more precisely at daytime of today (for my timezone). ^^ Btw: would it be possible to set the filetype for the buffer to add a comment to |
Sure, I implemented it
I was able to reproduce the problem with the same combo. Using just compe w/o delimate does not create any issues though so the problem seems to be caused by delimate. Will take a look EDIT: for now, I remapped in insert mode to to override any other mappings. This solves the problem but leaves you with no completion |
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.
Just some text for test purpose.
Could you add some context lines around the commented line in a review thread? Maybe a configurable number of how many lines above and below the hunk (if multiple lines got selected). |
And if I could color the text like |
@pwntester sorry that I have so many comments. I love to play around with this feature. It is so great! 😊 🚀 |
Not sure I understood what you mean. Those surrounding lines are the sign column, cannot change indentation. |
This is what the GitHub UI shows currently. I'm getting it from the diffhunk, so it would be limited to lines appearing in the hunk, otherwise I would need to make an additional call to the API to get the file contents. |
That should be Any ideas about how to differentiate the virtual text lines from the editable blocks? |
Yep, I will use this branch this week at work to catch up more bugs and then merge it. I think its functional, just the UI is not as optimal as it should be. But its hard to get what I would like with just a text buffer. If only I could soft indent lines of the buffer 🙄 |
Ah nice. I'll use it. Let's see how I can beautify this for my setup.
Hmm. Good question. The only dumb thing that comes into my mind would be a highlighting that only affects the background color, which then subtle differs from the background. But despite aesthetic issues this suffers from the same issue as the treesitter-refactor context highlight as you could only highlight he background of the actual text, not a box around the text including "imaginary" whitespaces behind shorter lines.
Yes I do. Perfectly nice from point of view. 👌 |
Oh really. Hmm. If kinda differs in the web UI for me. But that's fine I guess and could be improved later. |
Oh. Wait. I need to investigate there. Maybe the planned folding would improve this. 🤔 |
Recap: Bugs:
Questions:
What do you mean here? do you refer to the
Just implemented this. It will apply |
I think those are related as I have described here
This PR is really packed so I already exported this into a new issue #108 You do so much in this PR. It should come to an end and cut of new features where possible. Sorry for all this stress. 🙈
Again I would split this into a new issue. The PR solution is totally fine for the moment. It can be improved later. This is not straight forward as the solution approach/goal is not clear. There are multiple opportunities for this issue. Do you agree? I would open the issue then. So it can be discussed there and tackled when ever someone has time and motiviation.
Same as before. I think the PR solution is fine for the moment and it could be a new issue to improve.
Yeah, sorry the cite was not visible because it was actual a virtual text where I put a real
Amazing! 🤩 I think the open bugs are legit to get solved in this PR. But all further improvements should be exported. This PR is already huge and you introduced a complete new big feature "section" in your plugin. Also you did already add tons of nice additions as reaction to my comments. 🙏 |
Agreed, I will remove that virtual text
will do
agreed, will try to fix the bugs, and all suggestions can be moved into new issues Thanks! |
Alright. I opened a bunch of new issues. This plugin is so damn amazing. Dreamed of it for a long time. 😍 |
Could you make the highlighting of the editable stuff have a lower priority? For me it does overwrite the highlighting of the Issue title, id and status. If I set only the background color for the |
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.
final
| thread | resolve| Mark a review thread as resolved | | ||
| | unresolve | Mark a review thread as unresolved | |
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.
asfas
comment (un)resolve
should work from PR buffer