New Case Contacts Table: new case contact button#6859
Merged
compwron merged 2 commits intorubyforgood:mainfrom Apr 16, 2026
Merged
Conversation
Adds a primary-styled button to the header of the new design case contacts table that links to the existing new case contact flow. Accessible (aria-hidden on decorative icon) and responsive (flex-wrap on narrow viewports). Covers admin and volunteer roles in system specs. Spec structure aligned with shared_context pattern from b4758d1 to minimize future merge conflicts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
compwron
previously approved these changes
Apr 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an entry-point action to the new-design Case Contacts table page so users can start the existing “new case contact” draft → multi-step form flow directly from /case_contacts/new_design, plus system spec coverage and spec structure alignment.
Changes:
- Add a “New Case Contact” header button on the new-design case contacts index page linking to
new_case_contact_path. - Add/extend system specs to cover button visibility and navigation for admin and volunteer.
- Restructure the spec to use a shared signed-in admin context and group related scenarios.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| spec/system/case_contacts/case_contacts_new_design_spec.rb | Adds system coverage for the new header button and reorganizes existing row-expansion specs with shared context. |
| app/views/case_contacts/case_contacts_new_design/index.html.erb | Adds the “New Case Contact” button to the page header with icon marked aria-hidden. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tact-new-design-add-new-case-button
Collaborator
Author
|
@compwron thanks for the review! I've merged main in and lost your approval. |
compwron
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What github issue is this PR for, if any?
Resolves #6501
What changed, and why?
Added a "New Case Contact" button to the header of the new design case contacts page (
/case_contacts/new_design). The button links to the existingnew_case_contact_path, which creates a draftCaseContactand redirects to the multi-step form — the same flow used by the old design. No new controller logic or routes were required.The button:
primary-btnstyling to match the shade of blue on other "New" buttons in the app (e.g. "New Volunteer")flex-wrap gap-2) rather than being squeezed against itaria-hidden="true"on the decorative+icon so screen readers announce only the link textThe system spec file was also restructured to use a
shared_context "signed in as admin"pattern, aligning with the approach introduced in #6834 to minimize merge conflicts when that branch lands on main.How is this tested? (please write rspec and jest tests!) 💖💪
System specs added to
spec/system/case_contacts/case_contacts_new_design_spec.rbcovering:Screen recordings
Button in use
new.case.contact.button.mov
Responsive behavior at different screen sizes
window.resizing.with.new.case.contact.button.mov
AI Disclosure
This PR was developed collaboratively with Claude Sonnet 4.6 (Claude Code). The AI assisted with:
aria-hiddenon decorative icons) and the responsive layout approach (flex-wrap)shared_contextpattern from b4758d1 to reduce future merge conflictsAll code was reviewed and approved by the author before committing.