cfpb / consumerfinance.gov

Django project protecting American consumers
https://www.consumerfinance.gov/
Creative Commons Zero v1.0 Universal
273 stars 110 forks source link

Fix classes for counts of result types #8540

Closed wpears closed 3 weeks ago

wpears commented 3 weeks ago

Closes https://github.local/CFGOV/platform/issues/4589 This got introduced in https://github.com/cfpb/consumerfinance.gov/pull/8274

rout does some kinda nasty string concatenation to build up selectors that would have been missed in find/replace.

This fixes counts for me:

Screenshot 2024-08-21 at 2 11 23 PM
anselmbradford commented 3 weeks ago

What do you think about adding a small utility imported into https://github.com/cfpb/consumerfinance.gov/blob/main/cfgov/unprocessed/apps/rural-or-underserved-tool/js/common.js that converts result.type from camelCase to kebab-case? Then the classes could be kebab and consistent with the rest of the CSS.

wpears commented 3 weeks ago

I'd kinda prefer to leave this as is. Feels like a little speedbump to me that something is different and some wonky JS is touching the classes.

anselmbradford commented 3 weeks ago

Are the notRuralCase and notFoundCase classes even used?

wpears commented 3 weeks ago

Are the notRuralCase and notFoundCase classes even used?

yeah, at https://github.com/cfpb/consumerfinance.gov/blob/456383dfb5d3037290117ff56e0b45de41bfd674/cfgov/unprocessed/apps/rural-or-underserved-tool/js/count.js#L67