Skip to content

Gate indicator goal-met tick on column block flag#612

Merged
Bhavatu merged 2 commits into
mainfrom
feat/indicator_value_highlight_goal_met_toggle
Jun 9, 2026
Merged

Gate indicator goal-met tick on column block flag#612
Bhavatu merged 2 commits into
mainfrom
feat/indicator_value_highlight_goal_met_toggle

Conversation

@Bhavatu

@Bhavatu Bhavatu commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Description

Add highlight_goal_met BooleanBlock to IndicatorValueColumn so admins can toggle the goal-achieved tick on the latest-value column.
New blocks default to True; a Wagtail StreamField data migration flips existing value blocks to False so previously deployed plans keep their current behaviour and customers can opt in per column from the admin.

Flag only available for value type == "latest value"

Screenshots/Videos (if applicable)

image

Related issue

https://app.asana.com/1/1201243246741462/project/1206017643443542/task/1214566034369730

Requirements, dependencies and related PRs

Frontend: kausaltech/kausal-watch-ui#763

Conditional visibility of the field depends on this: kausaltech/kausal-backend-common#92

Additional Notes

Any additional information that reviewers should know about this PR.


✅ Pre-Merge Checklist

Type of Change

  • Set the PR's label to match the nature of this change

Testing

  • Built Unit tests (unit tests added/updated)
  • Built E2E tests (if applicable. E2E tests added/updated)
  • [-] Authorization is tested (permissions and access controls verified)
  • Manually tested locally (functionality verified)
    Manual testing instructions
    If feature requires manual testing by reviewer, you can provide instructions here.

Internationalization & Accessibility

  • New strings are translatable (all user-facing text uses i18n)
  • Accessibility standards met (WCAG compliance, screen reader support)

Integrations (if applicable)

If there are model changes to models which use any of the features below, verify the new models work together with the features.
For example, when adding a new model, verify the new model instances are copied when copying a plan.

  • [-] Moderation integration implemented
  • [-] Reporting integration implemented
  • [-] Copy plan feature integration implemented
  • [-] Umbrella plan structure integration implemented

Dependencies

  • Dependencies are merged (if applicable. If the change depends on other PRs e.g. kausal_common)

@Bhavatu Bhavatu added the New feature New feature (non-breaking change which adds functionality) label Jun 4, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e636fdb25

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread indicators/blocks/layout.py
@Bhavatu Bhavatu force-pushed the feat/indicator_value_highlight_goal_met_toggle branch 2 times, most recently from 93d57dc to 4587568 Compare June 5, 2026 10:44
@kausal-code-coverage

kausal-code-coverage Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
indicators/blocks/layout.py 66.66% 3 Missing ⚠️

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #612   +/-   ##
=======================================
  Coverage   62.66%   62.67%           
=======================================
  Files         387      387           
  Lines       40983    40991    +8     
  Branches     5238     5239    +1     
=======================================
+ Hits        25684    25691    +7     
- Misses      13689    13691    +2     
+ Partials     1610     1609    -1     
Flag Coverage Δ
e2e-tests 8.60% <0.00%> (-0.01%) ⬇️
unittests 60.00% <66.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
indicators/blocks/layout.py 74.05% <66.66%> (-0.62%) ⬇️

... and 1 file with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Bhavatu Bhavatu force-pushed the feat/indicator_value_highlight_goal_met_toggle branch from 4587568 to 72a0085 Compare June 8, 2026 10:04

@MWargelin MWargelin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@Bhavatu Bhavatu force-pushed the feat/indicator_value_highlight_goal_met_toggle branch from 97faa7b to 2bd289e Compare June 9, 2026 14:43

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2bd289e9f5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

class Migration(migrations.Migration):

dependencies = [
("pages", "0068_alter_categorypage_body_alter_planrootpage_body_and_more"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Chain this migration after the existing pages 0069

Because pages/migrations/0069_add_front_page_hero_additional_settings.py already exists in the parent and also depends on 0068, adding this new 0069 from the same dependency creates a second migration branch in the pages app. Even though 0070_preserve_indicator_value_highlight_goal_met follows this branch, the app still has two leaf nodes (0069_add_front_page_hero_additional_settings and 0070_preserve_indicator_value_highlight_goal_met), so Django will stop with a conflicting-migrations error before applying migrations. Please renumber/rebase this chain so it depends on the existing 0069.

Useful? React with 👍 / 👎.

Bhavatu added 2 commits June 9, 2026 17:58
Add highlight_goal_met BooleanBlock to IndicatorValueColumn so admins can
toggle the goal-achieved tick on the latest-value column. New blocks
default to True; a Wagtail StreamField data migration flips existing
value blocks to False so previously deployed plans keep their current
behaviour and customers can opt in per column from the admin.
@Bhavatu Bhavatu force-pushed the feat/indicator_value_highlight_goal_met_toggle branch from 2bd289e to f976d51 Compare June 9, 2026 14:58
@Bhavatu Bhavatu merged commit 81ee2df into main Jun 9, 2026
13 of 15 checks passed
@Bhavatu Bhavatu deleted the feat/indicator_value_highlight_goal_met_toggle branch June 9, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New feature New feature (non-breaking change which adds functionality)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants