Move design upload component to vue_shared
What does this MR do?
As part of incident management - #235994 (closed) - we are re-using the UI patterns from the design management upload component.
This MR moves part of the design management into /vue_shared
so that it can be reused.
issue: #235994 (closed)
Summary of changes
- Moved
javascripts/design_management/components/upload/design_dropzone.vue
tojavascripts/vue_shared/components/upload_dropzone/upload_dropzone.vue
- Replaced design-specific text with generic text, provided props to override these for design and metrics.
- Added generic validator / file-type util, provided props to override these.
- Moved design-specific styling into own scss file.
- Updated specs.
- Converted some exists js unit tests away from snapshots due to a bug with vue-test-utils. Links: [1], [2]
Screenshots (strongly suggested)
None - it's a pure refactor.
Does this MR meet the acceptance criteria?
Conformity
- [n/a] Changelog entry
- [n/a] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [n/a] Database guides
- [n/a] 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 - [n/a] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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:
- [n/a] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [n/a] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [n/a] Security reports checked/validated by a reviewer from the AppSec team
Edited by Tristan Read