Skip to content

FEATURE: Proactive Crisis Resource Banner on High-Risk Story Cards #152#180

Open
dhruvpatel16120 wants to merge 4 commits into
Piyushydv08:mainfrom
dhruvpatel16120:add-resource-banner
Open

FEATURE: Proactive Crisis Resource Banner on High-Risk Story Cards #152#180
dhruvpatel16120 wants to merge 4 commits into
Piyushydv08:mainfrom
dhruvpatel16120:add-resource-banner

Conversation

@dhruvpatel16120

Copy link
Copy Markdown
Contributor

🛠️ Pull Request

🏷️ PR Type

Select the type of PR (check one):

  • ✨ Feature
  • 🛠️ Improvement / Refactor
  • 🔗 Related Issue

Closes #152


📝 Rationale / Motivation

Currently, stories classified as HIGH risk by the SafeVoice system only display a small "Needs Support" badge in the feed. This feature enhances safety and crisis intervention value by displaying a highly visible, actionable emergency helpline banner on those specific high-risk story cards and in their detailed view popup.

This enables immediate access to life-saving resources for survivors and readers experiencing distress.


✨ Description of Changes

🚨 Proactive Crisis Resource Banner

  • Added a styled crisis resource banner in Stories.tsx when story.risk_level === 'HIGH'.
  • Included a click-to-call link for the National Women's Helpline (1091) (tel:1091).
  • Included a link to the verified NGO Directory page (/resources).
  • Added e.stopPropagation() to the card feed banner to prevent card expansion triggers from opening the modal when links are clicked.
  • Rendered the same crisis banner inside the detailed story modal view for high-risk posts.

🧪 Testing Instructions

Run the project locally:

npm install
npm run dev
  1. Locate a story in the feed that is classified with HIGH risk level ("Needs Support" badge).
  2. Verify that a red, styled banner appears underneath the story content containing the crisis helplines.
  3. Click the helpline phone number or the NGO Directory link. Confirm they handle link navigation/calling properly without opening the story card popup modal.
  4. Click on the card itself to open the detailed story popup, and verify the same crisis banner is visible inside the popup.

⚡ Checklist

  • High-risk check story.risk_level === 'HIGH' implemented
  • Helpline banner rendered on feed cards
  • Helpline banner rendered inside detailed popup modal
  • direct Women's Helpline link (tel:1091) and NGO Directory link (/resources) working
  • Click propagation stopped on card-based banner
  • Checked with TypeScript and verified no compilation issues exist

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

👷 Deploy request for safevoiceforwomen pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 99112c8

@github-actions github-actions Bot added gssoc'26 Contribution for Girlscript Summer of Code'26 level:intermediate GSSoC: Intermediate difficulty - 35 pts type:accessibility GSSoC: Accessibility improvements type:feature GSSoC: New feature labels Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc'26 Contribution for Girlscript Summer of Code'26 level:intermediate GSSoC: Intermediate difficulty - 35 pts type:accessibility GSSoC: Accessibility improvements type:feature GSSoC: New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Proactive Crisis Resource Banner on High-Risk Story Cards

1 participant