Skip to content

Fixing the snippet editing form

Denys Mishunov requested to merge dmishunov-fix-snippet-editing into master

What does this MR do?

A hotfix for editing Snippets with multi-file support

What's the problem?

In the course of preparing the snippets with multi-file support, we were not able to roll out the full-size feature and following the iterative approach, decided to go in small steps. There are a lot of steps FE should take there, but the very first one is to support blobs Array (where we return the blob Objects). For the snippet view, this has been implemented in !35605 (merged). However, I overlooked that by introducing the blobs array, I left out the original blob object that, even though not used by the view, is still used by the edit form and should be updated only in #220785 (closed). Before that Issue is resolved, Snippet edit form should rely on singular blob object alongside the blobs array. This is supported on the BE side.

So, in essence, it's impossible to edit a Snippet atm and this MR addresses that.

So what does this MR do after all?

The MR puts back the singular blob object for the Snippet edit form to keep working while the work on implementing #220785 (closed) is in progress.

Screenshots

Before After
Screenshot_2020-07-13_at_14.21.05 Screenshot_2020-07-13_at_14.20.37

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Denys Mishunov

Merge request reports