fix(forms): truncate long pathway step codes in decision context#816
Conversation
Show only the short form-code head in the fixed-width pathway column so qualifiers like "6B attachment" cannot overflow, while keeping the full code available via sr-only text and title tooltip. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughThe form detail page adds whitespace-aware code splitting and accessible truncation for qualified pathway step codes in the Before, Parallel, and After pathway lists. ChangesPathway code display
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/forms/form-detail-page.tsx`:
- Around line 210-212: Update splitFormCode, used by PathwayStepCode, to
recognize the same whitespace separators as pathwayItems, including tabs and
other \s+ matches, so qualifier extraction and fullCode tooltip rendering remain
consistent. Add a regression test covering a value such as “6B\tattachment” and
verify the qualifier is included.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: afb0e8ac-44c9-43ae-8c23-2d85b348c9a7
📒 Files selected for processing (1)
src/components/forms/form-detail-page.tsx
Align splitFormCode with pathwayItems' /\s+/ separator so tab/newline qualifiers still truncate to the short head and keep the full-code tooltip. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
6B attachment) overflowing the fixed-width decision-context columns on the form detail page.sr-onlytext and a title tooltip (same pattern asFormCodeBadge).splitFormCodewithpathwayItemsby splitting on any whitespace (/\s+/), including tabs, so qualifier extraction stays consistent.main.Verification
splitFormCodewhitespace alignmentnpm run test -- tests/form-code-badge.test.ts(1 passed, includes6B\tattachment)Risk and rollout
Clinical Governance Preflight
sjrfecxgysukkwxsowpy(Clinical KB Database)Notes
Summary by CodeRabbit