gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Add tooltip to show full commit message

Open Caleb-T-Owens opened this issue 1 year ago • 7 comments
trafficstars

The problem

Git butler only shows a portion of the first line of a commit

The solution

Implement new designs which facilitate displaying the commit's full message.

Screenshot 2024-02-19 at 22 04 52

Caleb-T-Owens avatar Feb 19 '24 12:02 Caleb-T-Owens

Thanks, this is a good stop-gap measure! I had a look and we probably need something like this to make it behave well when the description shorter than available width.

image

mtsgrd avatar Feb 19 '24 13:02 mtsgrd

I agree the message could be very long, so it works for users with short messages, but it wouldn't work for me. Anyway, we should restrict the amount of rows we should in the tooltip.

My suggestions:

  1. Show the tooltip only if the message is longer than the box, in order to avoid duplications like this image

  2. Cut the message if it's too long, e.g. maximum 5 rows.

I assigned this issue to myself, I'll work on the concept.

PavelLaptev avatar Feb 19 '24 13:02 PavelLaptev

Hi @PavelLaptev! Not showing the tooltip if it provides no extra information makes sense - I'll make that change this afternoon.

I'm not so sure about cutting it off at five lines though. My thought would be that it's uncommon for a commit message to have more than 5 lines, and if there are more than 5 lines, they're probably worth reading!

Caleb-T-Owens avatar Feb 19 '24 15:02 Caleb-T-Owens

Hi @Caleb-T-Owens 🙂 I understand. Long commits are not commits issue, but UI. I'm just saying that current UI can't handle it. Let's hold it a little I'll share a new design concept on Discord today.

PavelLaptev avatar Feb 19 '24 16:02 PavelLaptev

@PavelLaptev Sounds good 👍

Caleb-T-Owens avatar Feb 19 '24 16:02 Caleb-T-Owens

@Caleb-T-Owens here is a link to design in Figma — https://www.figma.com/file/FbeLt0yjY9RiNn8MXUXsYs/Client-Design?type=design&node-id=1408%3A60581&mode=design&t=Am6YqAdsel1jLjoB-1

image

Feel free to ask if you have any questions. Also, you can do the logic and leave styles to me.

PavelLaptev avatar Feb 19 '24 19:02 PavelLaptev

Hi! This is ready for review

Caleb-T-Owens avatar Feb 19 '24 22:02 Caleb-T-Owens

Those smaller tag buttons do look better! Thanks for that update 👍. I do wonder though if the clickable version of Tag really ought to be a state of Button...

Caleb-T-Owens avatar Feb 20 '24 01:02 Caleb-T-Owens

Aha, I see. Right now, Button and Tag serve different purposes. A Tag is more minor and secondary, while a Button is more like a call-to-action, with fewer states.

I don't like that the Tag is a div right now because it's not semantically correct. Tags can be clickable or just badges, and I'm not sure how to fix it without repeating code.

image image

PavelLaptev avatar Feb 20 '24 12:02 PavelLaptev