-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
emit tag classname as lowercase on userpage #3166
Comments
Philosophically, there should also be an intervention in some middleware to "correct" data errors on saving/loading. That's more complicated though. |
|
Another point is that tags are not trimmed before being set, so |
While stray spaces on tags do cause problems elswhere, they don't cause a problem with class names as |
I know, just saying we should trim when inputing tags |
Did #3735 fix this? Does this relate to the recent discussion about Stubs vs codefenced metadata? |
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: