Copy issue Key to clipboard (work mainly from yvesjans)#144
Copy issue Key to clipboard (work mainly from yvesjans)#144kalidor wants to merge 1 commit intomk-5:masterfrom
Conversation
| os: [ ubuntu-latest, macos-latest ] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Install xsel |
There was a problem hiding this comment.
what's the purpose of that xsel lib? :)
There was a problem hiding this comment.
sorry, i just copied/pasted modification on this file, i'll revert this and keep original one.
internal/issues/issue.go
Outdated
| }) | ||
| return | ||
| case ui.ActionCopyIssueId: | ||
| view.issue.CopyId() |
There was a problem hiding this comment.
let us show some "feedback" to the user just after copy - I think that:
flash.Success(ui.MessageIssueIdCopiedToClipboard) - text could be: "Issue id has been copied to clipboard!"
should be sufficient :)
internal/issues/issue.go
Outdated
| ui.NavItemConfig{Action: ui.ActionComment, Text1: ui.MessageComment, Text2: "[c]", Rune: 'c'}, | ||
| ui.NavItemConfig{Action: ui.ActionAddLabel, Text1: ui.MessageLabel, Text2: "[l]", Rune: 'l'}, | ||
| ui.NavItemConfig{Action: ui.ActionOpen, Text1: ui.MessageOpen, Text2: "[o]", Rune: 'o'}, | ||
| ui.NavItemConfig{Action: ui.ActionCopyIssueId, Text1: ui.MessageCopyIssueId, Text2: "[y]", Rune: 'y'}, |
There was a problem hiding this comment.
I generally fine with the idea - I got the problem that it would be nice to have such a functionality implemented.
Let me put another idea into discussion - what do you think:
Maybe we can implement a handler for "Ctrl+y"? or "Ctrl+i"? (i like issue?) "Ctrl + t" (t like ticket?). I don't know if "copy to clipboard" should be a part of a toolbar 🤔
There was a problem hiding this comment.
oh i see. i agree "copy to clipboard" in a toolbar seems weird. do you any suggestion to implement this handler ?
There was a problem hiding this comment.
nevermind, find a way to do so in func (b *boardView) HandleKeyEvent.
5d12fe0 to
4473efc
Compare
4473efc to
d119aa1
Compare
Hi, since i need this feature and the maintainer (yvesjans) of the previous PR #88 don't use jira anymore and indicates PR can be take over, i took the liberty to take it (and rework it a bit) to be able to copy the Issue id from board's view and issue's view.
The
yseems a good idea (i'm a vim <3) and Ctrl-C interrupt the program. If you want to change this, i'm open to it.