-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Fix commit description overflowing with 3 lines when it shouldn't #14791
Conversation
previously bumped from 61px to 69px on b8ee724
@HeCorr Thank you for wanting to improve GitHub Desktop! However, this is actually by design. The idea behind it is is that in the case where the description is long enough to overflow (3+ lines), we show a hint of the next line to indicate that there is more to see. I understand where this feels weird for the 3 line case, but there needs to be cut off somewhere. One could argue that we only do this on the 3rd line when there are 4+ lines, but that would require a different approach to the issue (likely refactoring the way this works to use js to calculate overflow as opposed to css). |
I think you misunderstood the issue here. There were only 3 lines there, there's nothing else to Expand to, so it doesn't make sense to click Expand just to reveal nothing. It's just visually distracting when you only have three lines. This fix will still show the Expand button when there are more than 3 lines, it didn't remove it. I do understand this is a temporary solution, but is a solution nonetheless. I rather have it fixed with CSS now because who knows when someone will get to refactor this. Could you please re-evaluate your decision? If not I would like a second opinion from a different maintainer. |
I suppose that was my point, we would rather accept a full solution than a partial one. :)
The GitHub Desktop maintainers are a team. Thus, requesting another maintainer likely won't get you very far. :) If you would like to continue contributing, I would suggest you read up on respectful disagreement in our Code of Conduct. However, I decided to talk with the team about the issue and it has been discussed in the past. Here #5700 and then addressed here #5711 Looking at #5711, it should work as I described where 3 lines does not show expand but 4 lines not only show the expand, but also show shadow on 3 lines and expand. (the part I was concerned about) Going to reopen your PR and test it out and see if the shadow shows as expected at 4 lines. If so, we will see about putting it through. :) |
I respect that, but unfortunately I'm not able to provide a full solution, hence this simple 1 pixel change which should last for another year or two as long as the UI layout doesn't change much.
I personally don't believe I was disrespectful in any way. I just politely asked for a second opinion if possible.
That's exactly what this fix accomplishes.
Thank you very much! |
My sincere apologies for not working on this when I said I was going to. |
it should be a permanent fix and it's now easy to change the amount of lines shown. thanks to @sergiou87 for the CSS code.
@tidy-dev I've implemented a more permanent solution and updated the PR's description, please take a look at it when you can! |
@sergiou87 could you please review the latest changes? |
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 works great! Thank you for your patience.
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.
Looks great!! Thank you 🤩
Thank you very much! |
Description
If the commit description has exactly 3 lines, it is detected as being overflown when it shouldn't be, and clicking the Expand button doesn't do anything.
This PR improves the CSS code which not only fixes the issue described above but also makes it easy to change the maximum amount of lines shown in the future (as demonstrated in the second video).
This was only tested on Windows with DevTools because I don't have different systems to test this on and don't have an Electron environment set up on my machine.
Thanks to @sergiou87 for the CSS code.
Videos
Before
2022-07-02.21-21-43.mp4
After
2022-07-02.21-21-07.mp4
Release notes
Notes: Fixed commit description with 3 lines overflowing when it shouldn't