Commit ca0b901
Split Commit Message into Subject / Description Fields (codesandbox#711)
* WIP Split Commit Message into Subject / Description Fields
This PR is a UX enhancement for the Git Workspace. Currently commit messages can only be added in a single-line text input, which is difficult to read and to edit a descriptive message.
With this update, commit messages are broken up into two inputs: a subject line and a description box. Both inputs are combined into a single commit message string when submitting a commit or a pull request.
Only the subject line is required to create a new commit or open a pr. If a description is provided, it will be appended to the subject line, with a blank line in between. Subject lines are recommended to be no more than 72 characters in length. To help with this, there is a character count indicator which will display red if a subject line goes over this length. There is no hard enforcement here, as it's merely a recommendation. Please read the following for more information on why 72 was chosen:
https://stackoverflow.com/questions/2290016/git-commit-messages-50-72-formatting
https://medium.com/@preslavrachev/what-s-with-the-50-72-rule-8a906f61f09c
This is currently a work in progress. The above features as outlined have been implemented and appear to work. Before moving forward I'd like to open this up for discussion and feedback so I can clean up the implementation.
* WIP Split Commit Message into Subject / Description Fields
This PR is a UX enhancement for the Git Workspace. Currently commit messages can only be added in a single-line text input, which is difficult to read and to edit a descriptive message.
With this update, commit messages are broken up into two inputs: a subject line and a description box. Both inputs are combined into a single commit message string when submitting a commit or a pull request.
Only the subject line is required to create a new commit or open a pr. If a description is provided, it will be appended to the subject line, with a blank line in between. Subject lines are recommended to be no more than 72 characters in length. To help with this, there is a character count indicator which will display red if a subject line goes over this length. There is no hard enforcement here, as it's merely a recommendation. Please read the following for more information on why 72 was chosen:
https://stackoverflow.com/questions/2290016/git-commit-messages-50-72-formatting
https://medium.com/@preslavrachev/what-s-with-the-50-72-rule-8a906f61f09c
This is currently a work in progress. The above features as outlined have been implemented and appear to work. Before moving forward I'd like to open this up for discussion and feedback so I can clean up the implementation.
* Remove Old Commit Message Logic1 parent 335d7a1 commit ca0b901
File tree
8 files changed
+68
-24
lines changed- packages/app/src
- app
- pages/Sandbox/Editor/Workspace/Git
- store/modules/git
- sandbox
8 files changed
+68
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
527 | 536 | | |
528 | 537 | | |
529 | 538 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
| |||
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | | - | |
52 | | - | |
| 49 | + | |
53 | 50 | | |
Lines changed: 32 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
76 | 91 | | |
77 | 92 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
81 | 104 | | |
82 | 105 | | |
83 | 106 | | |
84 | 107 | | |
85 | 108 | | |
86 | 109 | | |
87 | | - | |
| 110 | + | |
88 | 111 | | |
89 | 112 | | |
90 | 113 | | |
| |||
93 | 116 | | |
94 | 117 | | |
95 | 118 | | |
96 | | - | |
| 119 | + | |
97 | 120 | | |
98 | 121 | | |
99 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
19 | | - | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| |||
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | | - | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
34 | | - | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
0 commit comments