Web IDE show warning message when user opens IDE and can't push code
Problem to solve
(identified in !25463 (merged))
If you visit the IDE for an empty project without being able to push code, we should probably show a helpful message explaining that you won't be able to do anything...
Proposal
If a user visits the web IDE without being able to push code display an informational alert at the top of the page.
- Message text: "You need permission to edit files directly in this project. Fork this project to make your changes and submit a merge request."
- Alert should not be dismissable
- Include action to allow the user to fork the project
Previous proposal
- Message text: "You're not allowed to edit files in this project directly. Please fork this project, make your changes there, and submit a merge request."The commit button should be disabled, even if code is edited.
- When hovering the disabled button, display a tootip: "You're not allowed to edit files in this project directly"
Availability and Testing
New end-to-end test needs to be created to verify happy path still works for creating a file in an empty project via Web IDE. It has already been identified as a test gap and will be implemented in https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/425, linking it here as it will be a good regression testing for this item. Please remember to run package-and-qa
in MR.
For the negative scenario and the new error message front-end feature spec would be more suitable.