Skip to content

feat: Add selection for sharing referrals vs action plan in print - #171

Merged
michelle-hadfield-nava merged 16 commits into
mainfrom
rh/action-plan-sharing-updates
Jan 30, 2026
Merged

feat: Add selection for sharing referrals vs action plan in print#171
michelle-hadfield-nava merged 16 commits into
mainfrom
rh/action-plan-sharing-updates

Conversation

@RyanHansz

@RyanHansz RyanHansz commented Jan 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add print options dialog allowing users to choose between "Action Plan Only" or "Full Referrals" when printing
  • "Action Plan Only" shows compact resource list (contact info only) followed by action plan
  • "Full Referrals" shows complete resource details with descriptions
  • Improve email modal UX: conditional titles, better descriptions, fixed button contrast
  • Remove slide animation from dialogs for cleaner fade/zoom effect
  • Improve accessibility (ARIA attributes, color contrast)

Test plan

  • Generate referrals and create an action plan
  • Click Print button - verify options dialog appears with two choices
  • Select "Action Plan Only" - verify print preview shows compact resource list at top, then action plan
  • Select "Full Referrals" - verify print preview shows full resource details
  • Click Email button - verify modal shows appropriate title based on action plan existence
  • Verify Cancel/Send Email buttons have proper color contrast
  • Test keyboard navigation through dialog options
  • Run npm run test - all tests should pass

🤖 Generated with Claude Code

Preview environment for frontend

♻️ Environment destroyed ♻️

Preview environment for app

♻️ Environment destroyed ♻️

Ryan Hansz and others added 6 commits January 29, 2026 13:57
- Add PrintOptionsDialog component to let users choose between:
  - "Action Plan Only" - includes action plan + compact resource contact info
  - "Full Referrals" - includes full resource details with descriptions
- Add CompactResourceList component showing contact info without descriptions
- Update PrintableReferralsReport to support different print modes
- Fix streaming resources parsing to filter out __reasoning__ markers
  from backend responses (fixes "No resources found" bug)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- PrintOptionsDialog: Increase modal width, improve color contrast,
  add ARIA attributes and visible focus indicators
- CompactResourceList: Use semantic HTML (section, ol, article, dl),
  add screen reader labels, improve color contrast, add focus styles

Both components now meet WCAG 2.2 Level AA requirements.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move CompactResourceList to top of action-plan-only print view
- Streamline header: flex layout, smaller text, date on right side

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add PrintOptionsDialog tests (dialog behavior, mode selection)
- Add CompactResourceList tests (rendering, accessibility, contact info)
- Update printReferrals tests for new header format and print modes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create EmailOptionsDialog component with same options as print
- Update EmailReferralsButton to show mode selection when action plan exists
- Add tests for EmailOptionsDialog

Users can now choose between "Action Plan Only" or "Action Plan + Full
Referrals" when emailing, similar to the print functionality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create ShareOptionsDialog with variant prop for print/email
- Reduce PrintOptionsDialog to thin wrapper (102 → 14 lines)
- Reduce EmailOptionsDialog to thin wrapper (102 → 14 lines)
- Export shared ShareMode type for consistency

Eliminates ~180 lines of duplicate code while maintaining the same
API for existing consumers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jan 29, 2026

Copy link
Copy Markdown

Coverage report for frontend

St.
Category Percentage Covered / Total
🔴 Statements
49.76% (+1.03% 🔼)
524/1053
🔴 Branches
49.77% (+2.08% 🔼)
217/436
🟡 Functions
64.33% (+0.82% 🔼)
101/157
🔴 Lines
49.55% (+1.04% 🔼)
497/1003
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / CompactResourceList.tsx
100% 100% 100% 100%
🟢
... / PrintOptionsDialog.tsx
100% 100% 100% 100%
🟢
... / ShareOptionsDialog.tsx
100% 80% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / page.tsx
68.73% (-0.71% 🔻)
80.72% (-0.76% 🔻)
65.96% (-2.93% 🔻)
68.94% (-0.75% 🔻)

Test suite run success

116 tests passing in 10 suites.

Report generated by 🧪jest coverage report action from ddddc28

Ryan Hansz and others added 2 commits January 29, 2026 14:15
ESLint jest-dom/prefer-empty rule requires toBeEmptyDOMElement()
instead of checking container.firstChild.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove tests that only verify presence of elements without testing behavior:
- PrintOptionsDialog: removed 4 tests (renders dialog, open=false, descriptions)
- CompactResourceList: removed 2 tests (heading, numbered list)

Remaining tests verify actual user interactions and semantic behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@RyanHansz RyanHansz changed the title feat: Add print and email mode selection for action plan sharing *DRAFT for Preview Env* feat: Add print and email mode selection for action plan sharing Jan 29, 2026
Ryan Hansz and others added 6 commits January 29, 2026 15:15
The email mode selection was inverted - "Action Plan Only" was sending
only resources without the action plan. Now mode controls resource
formatting: full-referrals shows full details, action-plan-only shows
contact info only. Both modes include the action plan when available.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Break long function signatures into multiple lines to pass Black
formatter checks in CI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- EMAIL_INTRO_ACTION_PLAN_ONLY emphasizes the action plan and contact info
- EMAIL_INTRO_FULL (unchanged) references full resource details
- EmailFullResult uses appropriate intro based on mode parameter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file belongs to a different feature branch.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Email mode selection was developed but deferred due to backend
deployment issues. Changes have been saved to docs/email-mode-changes.md
for future implementation.

This PR now focuses only on print mode selection:
- Full Referrals: action plan + full resource details
- Action Plan Only: action plan + contact info only

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove slide animation from dialogs (cleaner fade/zoom)
- Update email modal text with conditional titles based on action plan
- Fix button color contrast (blue primary, proper gray secondary)
- Add hover:text-gray-900 to prevent contrast issues on hover

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@RyanHansz RyanHansz changed the title *DRAFT for Preview Env* feat: Add print and email mode selection for action plan sharing feat: Add selection for sharing referrals vs action plan in print Jan 29, 2026
Ryan Hansz and others added 2 commits January 29, 2026 18:10
- Change title to "Your Resource Guide from Goodwill" (larger, 24px)
- Add personalized subtitles based on print mode
- Simplify date format and move to right side

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Split JSX attributes across multiple lines per prettier rules.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@michelle-hadfield-nava
michelle-hadfield-nava merged commit 530505f into main Jan 30, 2026
16 of 17 checks passed
@michelle-hadfield-nava
michelle-hadfield-nava deleted the rh/action-plan-sharing-updates branch January 30, 2026 21:03
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.

2 participants