zorgiepoo / Komet

Cocoa editor for creating commit messages
MIT License
180 stars 5 forks source link

Feature Request: GitMoji #13

Open WardsParadox opened 4 years ago

WardsParadox commented 4 years ago

I love Komet, I've pretty much been using it since it came out and it's been a very happy relationship with Komet. A few teams I'm a part of have started using Gitmoji (I know I know, but it really is fun and enjoyable for the team), and I was wondering if there could be a button added next to cancel to have the gitmoji list right there?

A good list that's easy to follow: https://github.com/Vtrois/gitmoji-vscode/blob/master/src/gitmoji/gitmoji.ts

zorgiepoo commented 4 years ago

Glad you enjoy it :). It may be possible to add a customizable list of text insertions, but rather than doing that have you tried any systematic approaches? Eg:

  1. Bring up the character viewer (cmd-ctrl-space), pop out / expand the window (top right button) so you can select and add the emoji you want to your Favorites. Pop the window back in and then you have an easily accessible shortcut to favorite emojis.. Maybe via the Touch Bar too if you have one (don't know)

  2. In System Preferences > Keyboard > Text, add text substitutions like replacing :fire: with 🔥

WardsParadox commented 4 years ago

Yup, I usually bring up the CMD+CTRL+SPACE emoji picker, but there are a good chunk of times where I have to also pull up the gitmoji cheat sheet. Having it right in the app would be really nice. I typically program using vscode so I have the extension there, but we have several pre-commit, at commit hooks that vscode really doesn't like so a lot of times, I tend to drop back to terminal and launch komet for my commit messages.

zorgiepoo commented 4 years ago

Just so I understand. Do you need the descriptions of every emoji in your cheat sheet, or do you know what they are just by their icons? Are you not able to reserve the "Favorites" section in the emoji picker just for your gitmoji?

WardsParadox commented 4 years ago

I don't have them all memorized, but the 4 I typically use I do have set in favorites. Having the descriptions there make it super nice to ensure I'm selecting the right one for the job.

zorgiepoo commented 4 years ago

First, have you also tried putting a cheat sheet of the emoji you use in a commit message template to see if that aids you?

I looked at other projects and it looks like there's two notations: colon syntax like :art: and emoji like 🎨. Clients like github render the former :art: as 🎨. Digging through a few repos, it looks like colon syntax is more popular. Either way, if Komet were to support Gitmoji directly it should perhaps support both modes and default to :colon_syntax:. To simplify things I don't think Komet should auto-convert text between emoji and :colon_syntax:.

I don't think this warrants or is worthy of a new button. If the user types : at the beginning of the message, an autocompletion list in the text view could show up. Additionally a gitmoji menu could be added in the menubar for discoverability.

Thoughts?

WardsParadox commented 4 years ago

Sorry got slammed at work. I think this meets a great middle ground and is way better than a button. I was just trying to minimize the amount of potential work if possible.

As long as the emoji style is configurable. Github uses colon reference but internal for my job uses actual emoji to render. (We're trying to get that working too).

zorgiepoo commented 4 years ago

A text completion pop-up from first typing :, and two supported modes sounds good. Some experimenting may need to be done to make it feel right. I don't use gitmoji myself, so would you want to take a stab at it?

WardsParadox commented 4 years ago

Sure! Let me know what I need to test :)

zorgiepoo commented 4 years ago

Ah, sorry for the ambiguity. What I meant to ask is do you want to try implementing the feature? Because I don't use it myself I don't have much motivation towards adding it myself, at least not currently.

WardsParadox commented 4 years ago

I'll see if I can, I've never worked with Objc or Swift in any major capacity. 👍