[BHP1-1317] Add Color Shading to Result Matrices#213
Conversation
|
Really impressive. Nice work! Just a few things: projects/behave/src/cljs/behave/components/results/matrices.cljsL60 - Looks like this might have been an attempt at a multi-function? Can you remove the extra parens? L28, 36 - I'm a bit confused why we need to reduce over the same collection twice. Mind looking into this? L28, 36, 152, 321 - I'm noticing an interesting pattern here of using Do you think it's worth adding this to projects/behave/src/cljs/behave/wizard/subs.cljsL486 - Filtering after the pull seems quite inefficient. Can you invert this to find all matching group variables first and then perform the filter/transform? L507, 953 - Replace the second transformer fn with |
The first pass was needed to look over the entire data set to set the color for a row, since the data is individual cells. the second pass is to filter out data that don't have color as well as formatting the row part of the lookup key (i.e. [row col-uuid]) to match how it will be looked up (i.e. we have multi valued input for fuel model converting raw value ["1" "2" "3" -> "FM1" "FM2" "FM3" ]). With only one pass, it may wrongfully decide that ["1" "col-gv-uuid1"] shouldn't have a color but, later on ["1" "col-gv-uuid2"] does have a color. This would mean ["1" "col-gv-uuid1"] would be left wrongfully uncolored since the entire row should be. I had to do this on a cell by cell entry instead of an entire row because the
so here's proposal for ln 321, see
|
|
Nice. Thanks for adding the One last thing: projects/behave/src/cljs/behave/components/results/matrices.cljsL328 - Remove commented function (not sure why this wasn't picked up by clj-kondo) |
|
LGTM 👍 |
Purpose
Add feature to color result cells by color set in the VMS for list options.
Related Issues
Closes BHP1-1317
Submission Checklist
BHP1-### <title>)clj-kondo --lint components/**/src bases/**/src projects/**/src)clojure -M:compile-cljs)Testing
Run this migrations script
migrations.2026-04-09-add-fire-type-color-tag-setOpen this worksheet:
BHP1-1317.zip
Navigate to results page and notice there is a toggle for coloring results.
Toggle on and off, ensure color matches across result matrices.
Change one multi valued input to a single value, should have only 1 multi valued input now
Run and navigate to results page, ensure color toggle also works for 1 multi valued input. (rows should be colored)
Screenshots