Skip to content

feat: independent configuration of NOTIFY action config#13070

Open
Nil20 wants to merge 9 commits into
developfrom
ocrvs-12789
Open

feat: independent configuration of NOTIFY action config#13070
Nil20 wants to merge 9 commits into
developfrom
ocrvs-12789

Conversation

@Nil20

@Nil20 Nil20 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Description

ActionType.NOTIFY previously shared the ActionType.DECLARE action config — there was no way to configure label, flags, icon, or conditionals for NOTIFY independently.

What this PR addresses (all acceptance criteria):

  • SchemaNotifyConfig added to the ActionConfig discriminated union. Supports label, flags, icon, conditionals, deduplication, and an optional review field.
  • Runtime fallbackgetActionConfig() returns the dedicated NOTIFY config when present; when absent, it falls back to the DECLARE config exactly as before. Backwards compatible by construction.
  • Flag isolationresolveEventCustomFlags calls getActionConfig per action, so flag operations on NOTIFY no longer bleed into DECLARE and vice versa when a dedicated NOTIFY config is present.
  • ClientDeclareActionMenu picks up NOTIFY-specific supportingCopy and icon from the NOTIFY config when present, falling back to dialogCopy.notify from the DECLARE config.
  • DocsACTIONS.md updated: NOTIFY is now listed as independently configurable with the fallback behaviour documented.
  • TestsgetActionConfig fallback/isolation tests added to utils.test.ts; flag isolation tests added to flags.test.ts.
  • StorybookNotify.interaction.stories.tsx verifies that NOTIFY-specific supportingCopy appears in the confirmation dialog and the notify (not declare) mutation is called.

What is NOT addressed (explicitly out of scope per the issue):

Checklist

  • I have linked the correct Github issue under "Development"
  • I have tested the changes locally, and written appropriate tests
  • I have tested beyond the happy path (e.g. edge cases, failure paths)
  • I have updated the changelog with this change (if applicable)
  • I have updated the GitHub issue status accordingly

@github-actions

Copy link
Copy Markdown
Contributor

Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:

  • Changelog is read by country implementors who might not always be familiar with all technical details of OpenCRVS. Keep language high-level, user friendly and avoid technical references to internals.
  • Answer "What's new?", "Why was the change made?" and "Why should I care?" for each change.
  • If it's a breaking change, include a migration guide answering "What do I need to do to upgrade?".

@github-actions

Copy link
Copy Markdown
Contributor

ℹ️ Coverage metrics explained:
Statements — Executed code statements (basic logic lines)
Branches — Tested decision paths (if/else, switch, ternaries)
Functions — Functions invoked during tests
Lines — Source lines executed

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

📊 commons test coverage

Statements: 77.37%
Branches:   44.2%
Functions:  60.29%
Lines:      76.94%
Updated at: Mon, 29 Jun 2026 12:42:54 GMT

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

📊 events test coverage

Statements: 88.77%
Branches:   85.7%
Functions:  93.28%
Lines:      88.77%
Updated at: Mon, 29 Jun 2026 11:31:15 GMT

@ocrvs-bot

Copy link
Copy Markdown
Contributor

Your environment is deployed to https://ocrvs-12789.e2e-k8s.opencrvs.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow independent configuration of ActionType.NOTIFY (decoupling from ActionType.DECLARE)

2 participants