-
Notifications
You must be signed in to change notification settings - Fork 155
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
Add commit message length configuration border #1048
Add commit message length configuration border #1048
Conversation
jamessspanggg
commented
Feb 3, 2020
•
edited
Loading
edited
For this, I meant just draw a box behind the text so that we can see if the subject is longer than 50 chars. A scrollable box will require users to scroll, which is unnecessary work. |
Ok noted prof. |
@damithc since the commit message subject line is limited to 50 characters, should we change the font to Changing the font however, might introduce inconsistencies in font between commits panel and authorship panel. |
I think we should use the same monospace font for code, github commit message (subject and body) as all are code-like. Anyway, try it and post some screenshots to see how it looks. |
I have tried two ways of showing the 50 character limitation:
|
We don't want to hide anything; just want to shame the ones that violate the limit. What if you show a vertical white dotted line after 50 chars. Subtle but makes the point. |
@damithc switched both limit lines to be dotted. Are the dotted lines in the commit message title too subtle? |
Yes. Use black, which is also consistent with what we do in the message body? |
frontend/src/static/css/style.scss
Outdated
@@ -321,7 +333,7 @@ header { | |||
} | |||
|
|||
&--button { | |||
color: mui-color('grey', '700'); | |||
color: mui-color('grey'); |
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.
Modified to standardise with the icon colors in v_authorship
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.
PR number is part of the subject line, added by the user. It's just a project convention, not automatic. |
Yep placing the PR number is a choice, not automatic. |
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.
All looks good. Can you just add blank lines between the styles ?
# Conflicts: # frontend/src/tabs/zoom.pug
Ok noted. Updated the previous comment with the UI. |
hmm... After seeing both, I kind of prefer vertical lines; while it may not be nice to look at, a vertical line is a good visual cue to indicate 'it should end here'. Also for consistency, we should make make the two as similar as possible, given both have the same purpose. If both look the same, that should also alleviate the worry that users will mistake it as a glitch. What do you think? |
BTW, I believe there is an another ongoing PR that is trying to tweak the page background color, which has a bearing on the colors we choose for this feature. |
I believe it's from this PR #1080, which modifies the code and commits panel to be white.
I agree that we should use vertical lines for both. Would grey vertical dashed lines be alright? Grey would look ok on white backgrounds, as shown in the commit message body. |
My concern on vertical line for the title is more on the inconsistency of presence (when the title is shorter than 50 chars, it won't appear), which is why it kind of give off the "glitch" look to me. Though I agree that it may be easier to identify the 50 chars cut off point, but I personally feel that underline would probably look more professional because it looks similar to how people are writing beyond the allocated space on forms and etc. |
I see what you mean. The form field analogy didn't occur to me because that behavior never happens in an online form, and in Web pages, underlines usually mean other things (such as links or tooltips). Let's stick with vertical lines for now. It will look a bit odd, but probably we can make it subtle enough to not to irritate the viewer. Or it may be OK for it to be irritating to the viewer in this instance because we are exposing an incorrect behavior of the commit author. The line will not even appear if the authors stuck to the standard. @jamessspanggg let's make both lines same thickness and same style, and if possible, same shade of grey. |
What about this alternative instead of the dotted line: Any commit subject that exceeds 50 char will have a |
I feel that's beyond RepoSense's role. We should only provide a basis for the user to make their own judgement, without providing our own judgement. Let's go with the current approach, dogfood for a while, and refine later if it doesn't work. |
# Conflicts: # docs/images/commits-panel.png # docs/images/opening-commits-panel.gif # frontend/src/static/css/style.scss # frontend/src/tabs/zoom.pug
# Conflicts: # frontend/src/static/css/style.scss
@fzdy1914 Can merge this first? Another PR by @jamessspanggg on hold due to this. |
@jamessspanggg CI is failing, can you kindly recheck? |
* 'master' of https://github.com/reposense/RepoSense: [reposense#1047] v_summary: simplify toDisplay user logic (reposense#1051) [reposense#658] Modify checkstyle configuration (reposense#1094) Add commit message length configuration border (reposense#1048) [reposense#1061] build.gradle: remove unused dependency (reposense#1095) [reposense#1044] Update date hashes on reset date range (reposense#1068)