Skip to content

feat(ui): Convert Narrative <Switch/> to <Dropdown/>#1318

Open
rogeruiz wants to merge 1 commit into
rogeruiz/1016/update-labels-and-tooltipsfrom
rogeruiz/1016/narrative-data-select-dropdown
Open

feat(ui): Convert Narrative <Switch/> to <Dropdown/>#1318
rogeruiz wants to merge 1 commit into
rogeruiz/1016/update-labels-and-tooltipsfrom
rogeruiz/1016/narrative-data-select-dropdown

Conversation

@rogeruiz
Copy link
Copy Markdown
Collaborator

@rogeruiz rogeruiz commented Jun 3, 2026

🔀 PULL REQUEST

💡 Summary

This patch updates the narrative data toggle switch to a dropdown select
component with two options ("Keep original" and "Remove"). This only addresses
the first part of the narrative reconstruction dropdown feature. The change
replaces the <NarrativeSwitch/> component with a new <NarrativeSelect/>
component that uses the existing <Select/> component. I'm also preserving the
blanking pattern for excluded rows; if include: false then no controls are shown.

Important

This patch is only starting the narrative reconstruction dropdown feature. It
does not include the new "Reconstruct" option, cross-field validation logic,
nor backend enum migration. Those will be addressed in subsequent patches.

🔗 Related Issue

✅ Acceptance Criteria

  • Convert narrative data options to a drop-down
  • Reconstruct option appears in the drop-down when available for that
    section
  • Reconstruction option grayed out unless "refine" is selected for coded
    data
  • Updated table column names (coded data, narrative data)
  • Updated coded data options copy (keep original, refine)
  • Updated tooltip copy
  • If user has "reconstruct" for the narrative and tries to change coded
    data to "keep original", error appears under the toggle
  • Default settings are "refine" for coded data and "keep original" for
    narrative
  • Should retain pattern of blanking out excluded rows (not showing options
    for coded data or refined data)

🧪 How to test

  1. Run just dev up to bring up the application locally
  2. Navigate to the configuration's Build step and inspect the Sections table.
    Confirm that the narrative column now displays a dropdown instead of a toggle
    switch.
  3. Verify that "Keep original" and "Remove" are both working as expected.
  4. Run automated checks with just client run lint fmt check test e2e

ℹ️ Additional Information

Note

The work related to #1195 will be applied in four different patches/PRs
continuing with this one. Each patch will be as independent as possible and rely
only on prior patches as strictly necessary. This patch relies on the changes
introduced in #1317.

@rogeruiz rogeruiz added dibbs-ecr-refiner ux/ui Primarily client-side work with minimal server work needed. labels Jun 3, 2026
@rogeruiz rogeruiz self-assigned this Jun 3, 2026
@rogeruiz rogeruiz changed the base branch from main to rogeruiz/1016/update-labels-and-tooltips June 3, 2026 20:21
@rogeruiz rogeruiz marked this pull request as ready for review June 3, 2026 20:21
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

🔒 Security Scan Results

⚠️ Found 8 vulnerabilities

Severity Total
🟠 High 8

📦 refiner-app

No vulnerabilities found

📦 refiner-lambda

No vulnerabilities found

📦 refiner-ops

Severity Count
🟠 High 8

View detailed results: Security tab
Last updated: 2026-06-03 20:23:45 UTC

@rogeruiz rogeruiz changed the title feat(ui): Covert Narrative <Switch/> to <Dropdown/> feat(ui): Convert Narrative <Switch/> to <Dropdown/> Jun 3, 2026
rogeruiz added a commit that referenced this pull request Jun 4, 2026
This patch migrates the narrative field from a boolean type to a three-value
enum across the API and client. This prepares the API and the client for the
work being done for #1195. This work is independent of
#1317 and #1318 but closely
related to them. The latter needs to be safely integrated with this patch to
ensure the changes don't conflict with one another.
rogeruiz added a commit that referenced this pull request Jun 4, 2026
This patch migrates the narrative field from a boolean type to a three-value
enum across the API and client. This prepares the API and the client for the
work being done for #1195. This work is independent of
#1317 and #1318 but closely
related to them. The latter needs to be safely integrated with this patch to
ensure the changes don't conflict with one another.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dibbs-ecr-refiner ux/ui Primarily client-side work with minimal server work needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant