Skip to content

Use an array to compile a string of CSS classes

Thomas Randolph requested to merge tor/maintenance/css-class-string-compile into master

What does this MR do and why?

In !77136 (diffs, comment 821318232), I'm adding some more optional parameters to the list of CSS classes that are output by the link_to_member Projects helper.

This MR refactors the existing strings so that adding more values to be concatenated is not overly cumbersome.

Screenshots or screen recordings

This is a refactor in logic only, and shouldn't have any impact on the output.

How to set up and validate locally

Any page that renders a user link should use this.

One example is the list of MRs, so you could navigate to http://[your instance]/[group/user]/[project]/-/merge_requests and - if you have an MR with either an assignee or a reviewer - see the link wrapping their avatar.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thomas Randolph

Merge request reports