Show error view for invalid request to the static site editor
Job To Be Done
Validate the request to the Static Site Editor against the validation rules and if it is determined to be an invalid request then show an error view.
Refer to Designs tab for mockup.
Requests will come into the static site editor on this URL: /<project namespace>/-/sse/<branch>/<source file path>
-
<project namespace>
is the full namespace path of the project e.g.gitlab-com/www-gitlab-com
-
/-/
is a group separator as per https://docs.gitlab.com/ee/development/routing.html#routing -
sse
is the namespace for the Static Site Editor -
<branch>
is the name of the branch being edited e.g.master
-
<source file path>
is the full path to the source file used as the entry point e.g.source/handbook/index.md
Validation rules
- The referenced file to be edited must be for the master branch only for now
- The referenced file to be edited must end in .md file extension
Behaviour
- Clicking on the Configure your static site takes you to the repository view for the project
Tasks
-
Create controller to receive request - !28689 (merged) -
Add validations rules and errors handling - !29242 (merged) -
Tweak dataset
destructuring (context here and here) @derek-knox !28691 (merged) -
Show error message - !28691 (diffs) -
Add Configure your static site button - !28691 (diffs)
Edited by Vasilii Iakliushin