Step FINAL - Add/remove snippet files in the edit view
- Step 1 - Update editor lite and component with global id
- Step 2 - Fix blob editor lite scroll
- Step 3 - Setup snippet utils and components for multi file
- Step FINAL - Add/remove snippet files in the edit view
What does this MR do?
This MR allows for adding and removing multiple files in snippets. To do this in the best way possible, we need to do a bit of refactoring and move the complexity of calculating "diff actions" (the updates to the snippet used to make commit on the BE) form the parent edit.vue
component into the snippet_blob_actions_edit.vue
component. Then, it's just a matter of showing/hiding the buttons
PLEASE NOTE: This feature is so good it's behind two feature flags!
Feature.enable(:snippet_multiple_files)
Feature.enable(:snippets_edit_vue)
Screenshots
Here's a walk-through of the original behavior which is preserved with the feature flag off, and the new behavior with the feature flag on:
Add button | Delete button |
---|---|
Does this MR meet the acceptance criteria?
Conformity
-
[ ] Changelog entryNot needed since we're behind a fflag -
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](https://docs.gitlab.com/ee/development/contributing/merge_request_workflow.html#definition-of-done
References
Edited by Paul Slaughter