Skip to content

[BHP1-1573] Fix Table Shader Rounding#230

Merged
Kcheung42 merged 4 commits into
mainfrom
kc-BHP1-1573-fix-table-shader-rounding
May 20, 2026
Merged

[BHP1-1573] Fix Table Shader Rounding#230
Kcheung42 merged 4 commits into
mainfrom
kc-BHP1-1573-fix-table-shader-rounding

Conversation

@Kcheung42
Copy link
Copy Markdown
Collaborator

@Kcheung42 Kcheung42 commented May 13, 2026


Purpose

  • Table Shaders were incorrectly shading cells because there is a mismatched on what is displayed (rounded value based on precision) vs using un-rounded values in the shading logic. To fix this we need to ensure table shading filters round all values in the logic to the same precision as what is displayed.

Related Issues

Closes BHP1-1573

Submission Checklist

  • Included Jira issue in the PR title (e.g. BHP1-### <title>)
  • Code passes linter rules (clj-kondo --lint components/**/src bases/**/src projects/**/src)
  • Feature(s) work when compiled (clojure -M:compile-cljs)

Testing

  1. open this worksheet: BHP1-1573.zip
  2. In settings, change the decimal precision for Surface Rate of Spread to 1
  3. Navigate to settings page, take note of the table filter setting. should be 0.2 -> 26
  4. Navigate to results and ensure that cells are properly shaded
  5. One cell that was not properly shaded previously was:

Backing Rate of Spread (ch/h)

  • Fuel Model Code: GR1/101
  • Live Herbaceous Fuel Moisture: 120%

The true value of the cell was actually 0.19342908711679715. The old logic did not round this number and flagged it for shading, but what is displayed is 0.2 on the results, so this causes confusion.

Screenshots

@rjsheperd
Copy link
Copy Markdown
Contributor

When I tried testing this, I wasn't able to modify the Custom Settings. I first started from a fresh build and an incognito app, and when I tried typing into the "Surface Fire Spread" a decimal it would immediately revert back to 0.

Then I used the arrows and I was able to increase it to 1. Closing the Settings, then going back and changing it to another value using the arrows didn't stick.

Let me know if this should be addressed in a separate ticket.

@Kcheung42
Copy link
Copy Markdown
Collaborator Author

Shanna and I saw this a last time we tried to update the decimal precision, try doing it twice by typing into the input box. We'll need separate ticket for this bug.

@Kcheung42
Copy link
Copy Markdown
Collaborator Author

The issue was because there was a mismatch in the path used for app db state. Fixed and also removed using an atom from the input field and use default-value instead (more idiomatic)

@rjsheperd
Copy link
Copy Markdown
Contributor

rjsheperd commented May 19, 2026

Still noticing that using the arrows don't persist the changes:
Kapture 2026-05-19 at 10 50 01

Reproduction steps (Firefox):

  1. Open Settings > Contain
  2. Use the arrows to increase 'Containment Distances' to 4 (don't click on the input itself)
  3. Refresh
  4. Re-open Settings > Contain
  5. See that the 'Containment Distances' is still 0

@Kcheung42
Copy link
Copy Markdown
Collaborator Author

Kcheung42 commented May 19, 2026

I'm not seeing this behavior on my end. I made sure to click the arrows only, clicked the page (causing the on blur), refreshed the page, and the values stick.
chrome-capture-2026-05-19

@Kcheung42 Kcheung42 merged commit 4868f72 into main May 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants