Support multiple files when editing snippets
What does this MR do?
In the course of supporting multiple files when working with Snippets, this MR updates snippet edit form to work properly with updated GraphQL endpoints that supply an array of files instead of a single file.
What are the main challenges of this MR?
The most challenging part was to identify what data to send to GraphQL endpoint for proper mutation. The core logic is located in !37079 (diffs). For historical reasons and to have a reference for when it is needed, here's the table of different scenarios:
New or unchanged file | Changed content | Changed file path | Changed content & file path | |
---|---|---|---|---|
Mutation payload example | { |
{ |
{ |
{ |
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
References #220524 (closed) #220785 (closed) #229779 (closed)
Edited by Denys Mishunov