emit tag classname as lowercase on userpage #3166
Labels
P2 - minor feature or not urgent
Minor bugs or less-popular features
solution found
A solution exists; just needs to be applied
tweak
Small, non-breaking change
Tags can be entered when enditing a brew as
<tag-type>:<tag-name>
, where<tag-type>
is a limited enumerated set of values. That tag data-entry UI also enforces lowercase for<tag-type>
.It is possible however to circumvent that UI (e.g. edit the google-doc source).
The
<tag-type>
is emitted on the userpage by setting the className of the tag display element:<span class="system">C&C</span>
. This is so different tag-types can be styled differently (e.g. "system" tags in blue, untyped tags as yellow).However, css classnames are case sensitive. We should enforce the schema design constraint not only in the data-entry UI, but also in the emitting of tags onto the userpage. (Postel's Law)
The relevant code to fix is on line 132 here:
homebrewery/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx
Lines 127 to 134 in be72b02
The text was updated successfully, but these errors were encountered: