Skip to content

Proper icon validator

Lukas 'ai-pi' Eipert requested to merge leipert-proper-icon-validator into master

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:

  1. Change name in gitlab-svg
  2. Forward gitlab-svg in CE/EE
  3. Catch and fix all the errors with the tests
  4. Fix the errors
  5. ???
  6. 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?

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/49236

Edited by Mike Greiling

Merge request reports