Commit button should always be enabled in the Web IDE
Once I make changes and go to the commit screen, I should be able to click the commit button immediately. This is important because the Web IDE is used by lots of different types of people for many use cases, including simple small changes that don't need a detailed commit message.
We should make sure that a user can always easily commit their changes. This is not currently the case, because a user needs to know how to stage files, add a commit message and select the correct commit setting.
Core problem to solve: Make user flow for committing changes as frictionless as possible (especially for new people who don't know/care about unstaged/staged).
Design
- Automatically generate a dummy commit message
- Currently, the interface has placeholder text
Write a commit message...
- When one file is added/changed, we should make the placeholder text
Update <file>
- When multiple files are changed, we should make the placeholder text
Update <X> files
- If no user-specified commit message is written, use the placeholder text
- Currently, the interface has placeholder text
- Commit button should always be clickable
- If all changes are unstaged, the button changes to
Stage & commit
. - If some changes are partially staged, only commit their staged changes (nothing changes)
- If all changes are already stages, commit their changes (nothing changes)
- If all changes are unstaged, the button changes to
- Commit mode should default to what the user is allowed to do
- 'Commit to master branch' should be stroked through and not selected if the user doesn't have permissions to push to master, it will have a tooltip message stating:
This option is disabled as you don't have write permissions for the current branch
- 'Commit to master branch' should be stroked through and not selected if the user doesn't have permissions to push to master, it will have a tooltip message stating:
Links / references
Edited by Dimitrie Hoekstra