Feature Request: Popup to create pr/issues ..
Issue Description
Type: feature request
Describe what happened (or what feature you want)
I'd like to be simplify the way I create pr/issues and not having to wait and be promoted with a new buffer.
currently the steps to create an issue for me, goes as follows:
- run
:Octo issue create(I bind it to<leader>gic) - enter issue title in command line
- wait till the create request finish
- open a buffer (which I ONLY NEED TO WRITE DESCRIPTION)
- write a message
- choose labels (optional)
Describe what you expected to happen
I'd like to have some sort of global create menu. Where in this menu is all the stuff that can be created using github cli or some git related stuff.
After choosing, say issue. a popup with something like:
## Issue Title:
|
## Issue description
<!-- You can Leave Empty-->
|<TAB to jump here>
Then on :w<CR> or in insert <C-c> the buffer will be parsed and sent to the api.
Then I'd like to be notified using something like notified using something like https://github.com/rcarriga/nvim-notify when the issue is created or when some network error happened (possibly cache the buffer for retry).
So the steps becomes as follows
- run
require'octo.telescope.menu'.create() - select something that can be created using github api or git
- small popup enter required fields in a markdown form.
- hit
<C-c>in insert mode or<leader>win normal mode to save. - continue what I was doing
- get notified when things the network request is done 💯
Anything else we need to know?
I'd something that involved parsing markdown form
first I write the following in empty popup buffer
{
"#### Purpose",
"",
(opts.branch_desc or "") .. ".",
"",
"#### Details",
"",
first_commit_body,
}
then after saving the buffer, I send the buffer to a function that does the following
local content = vim.api.nvim_buf_get_lines(win.bufnr, 0, -1, false)
local title = content[2]
local body = table.concat(vim.list_slice(content, 6, #content), "\n")
--- ....
Hey @tami5
I had something similar on mind but with no menus/popups. What about:
Octo issue|pr create- new octo buffer with empty title and body is created
- user enters title and body (signcolumn indicators turn red)
- user saves the buffer (signcolumn indicators turn white) and vim.notify informs if the issue/pr was created successfully
well that is good enough @pwntester. I can later create a custom menu, and if it's stable enough maybe open a pr.
the main pain point for me is having to wait until the request for creating an issue is created.
EDIT: oh I thought just menus are being dropped. Popup are really simple and too then get out of your ways, and it would be fun to toggle them.
Maybe #163 is enough for the menu thing. As for the popup, wouldnt you have to wait till the issue is created to show the octo buffer after entering the details on the popup? What Im suggesting is creating the octo buffer staight away and then create the issue on the background on the first save
Maybe #163 is enough for the menu thing. As for the popup, wouldnt you have to wait till the issue is created to show the octo buffer after entering the details on the popup? What Im suggesting is creating the octo buffer staight away and then create the issue on the background on the first save
not sure if I understand what you're saying here but basically, yah no wait between creating the issue/pr and first save.
As for popup, it should just be a swap for regular splits and I think it would be an easy implementation. I'd like to see an option to only use popup for all octo buffer and be anle to toggle on/off them. But that's something for another feature request.
for now between entering title and description shouldn't be a network request.
As for UI, one place to write title and description