Create separate suggestions for when editing files is not possible
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
When a user wants to edit a file from a blob view, there are two different scenarios when the editing is not possible:
- user does not have enough permissions to a given project
- user wants to edit files from a commit or a tag with one of the options: single file editor, delete button, replace button.
Right now we show one suggestion for both of these situation, but the copy matches only the first point and is misleading for the second one:
You can’t edit files directly in this project. Fork this project and submit a merge request with your changes.
Along the showForkSuggestion()
, we should create a suggestion or note for when the edit is not possible (aka. canEditTree
)
These edit actions are actually possible from WebIDE, so we could reuse the component with a message like:
You can’t modify files from a commit or a tag with Web Editor. Try WebIDE instead. | Edit in WebIDE | Cancel |
So it could look like this: