Proper icon validator
What does this MR do?
Sometimes the UX designers plan to rename/replace icons (see gitlab-svgs!117 (merged), gitlab-svgs!109 (merged) and gitlab-svgs#18 (closed)). While renaming is rather easy, we should catch wrong usages of icons during development/testing. The implementation works like this:
- HAML helper:
- Production: Nothing happens
- Development: Exception is thrown, you see a nice error screen
- Testing (rspec): Exception is thrown, test fails
- Vue Component:
- Production: Nothing happens
- Development: Vue Prop Validator logs error to console.
- Testing (karma): Vue Prop Validator logs error to console, karma fails because Validators are not allowed to fail during testing
The workflow then can look like this:
- Change name in gitlab-svg
- Forward gitlab-svg in CE/EE
- Catch and fix all the errors with the tests
- Fix the errors
- ???
- Profit!
Are there points in the code the reviewer needs to double check?
- Backend maintainer: Is the JSON just loaded in dev/test?
Does this MR meet the acceptance criteria?
- [n/a] Changelog entry added, if necessary
- [n/a] Documentation created/updated
-
API support added -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a Frontend maintainer -
Has been reviewed by a Backend maintainer
-
-
Conform by the merge request performance guides -
Conform by the style guides - [n/a] Conform by the database guides
- [n/a] If you have multiple commits, please combine them into a few logically organized commits by squashing them
- [n/a] Internationalization required/considered
- [n/a] End-to-end tests pass (
package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Edited by Mike Greiling