Improve commit flow from unstaged to staged to commit
The flow from edit to commit has been improved as of 10.8, but once you reach the commit interface it isn't clear what to do next.
Problems trying to stage changes:
- the stage file button is only shown on hover and very small
- the discard changes button is small and right next to the stage changes button - it is too easy to mis-click and lose changes
- the stage all button is only shown on roll-over
Normal | Stage all | Discard file |
---|---|---|
![]() |
![]() |
![]() |
Problems reviewing staged/unstaged changes in the commit interface:
- the tab at the top only shows the filename (e.g. unhelpful when you're reviewing changes to
view/merge_request.js
andmodel/merge_request.js
) - no active style in file list to see which file is open
Problems trying to commit changes:
- tip in commit message makes it easy to forget to write a commit message
- disable commit button doesn't help me make progress
- incorrect tooltip about unstaged changes if you stage changes, then make more changes, and then stage the new changes. All changes are staged but the tooltip is still shown.
Normal | Branch name | Wrong feedback |
---|---|---|
![]() |
![]() |
![]() |
Proposal
- Stage and discard buttons should be buttons with words shown when you select the file (e.g. https://gitlab.com/gitlab-org/gitlab-ce/issues/46122#note_72693412)
- Show full path above the diff, not just filename
- Stage all and Unstage all should be always be shown (e.g. https://gitlab.com/gitlab-org/gitlab-ce/issues/46122#note_77018355)
- Improve the styling of the empty commit message so it looks more empty
- Don't disable the commit button, instead highlight the field that is empty
Design
- Stages/unstaged counts, get an icon button to go along with it similar to issue board lists. (Tooltips:
Stage all changes
andUnstage all changes
) - The actions to stage/unstage dissappear if there are no changes to batch stage/unstage
- Actions on files are visible by default
- Delete changes button, gets changed to the
more
icon and creates a little dropdown with the option to delete the changes` - On hover of the files in commit mode, it should show the project file path in a tooltip
Only unstaged changes:
Only staged changes: