Skip to content

Conversation

Baibhab-Adhikari
Copy link
Contributor

@Baibhab-Adhikari Baibhab-Adhikari commented Jul 23, 2025

This pull request aims to implement the "Emergency Help Button" functionality to the TalkHeal application (Closes #5 ), refactors existing emergency resources, and improves code readability. The most significant changes include adding a dedicated emergency page (emergency_page.py in components directory) with map embed (OpenStreetMap), restructuring global crisis resources, and removing redundant functionality from the header (in header.py).

Emergency Help Feature:

  • TalkHeal.py: Added session state variables for show_emergency_page and implemented page routing logic to display the emergency help page when activated.
  • components/emergency_page.py: Created a new emergency help page with functionality for location-based search, map display, and dynamic Google search links for mental health crisis support.

Refactoring Emergency Resources:

  • components/sidebar.py: Replaced hardcoded emergency contacts with a structured GLOBAL_RESOURCES list to improve maintainability and added a button to navigate to the emergency page. [1] [2]
  • components/sidebar.py: Updated the "Crisis Support" section to use GLOBAL_RESOURCES for displaying global crisis hotlines. (Merge Conflict resolved here)
Screenshot 2025-07-23 at 11 28 28 PM

Code Cleanup and Redundancy Removal:

  • components/header.py: Removed redundant "Find Help Nearby" functionality from the header, as it overlaps with the new emergency page.
  • core/config.py: Fixed an error in API key configuration for the Gemini model.

Demo Link: TalkHeal - Emergency Button

Please do let me know if any changes are required.Thanks! @eccentriccoder01 @pkbros

@Baibhab-Adhikari
Copy link
Contributor Author

Baibhab-Adhikari commented Jul 23, 2025

@eccentriccoder01 @pkbros found more merge conflicts as of now, mainly with the chat persistence feature. I have resolved it, but you all will not find it in the demo link because the code is deployed from my fork.

@eccentriccoder01
Copy link
Owner

eccentriccoder01 commented Jul 23, 2025

@Baibhab-Adhikari Have you resolved the conflicts arising from the latest merged PR #20? Rest everything seems cool...

@Baibhab-Adhikari
Copy link
Contributor Author

@eccentriccoder01 yessir, that was the last conflict I resolved it.

@eccentriccoder01
Copy link
Owner

@Baibhab-Adhikari Can you share a latest deployment link to it?

@Baibhab-Adhikari
Copy link
Contributor Author

@eccentriccoder01 sure, I am at college right now, I will deploy the latest changes and send you the link by tonight.

@eccentriccoder01
Copy link
Owner

eccentriccoder01 commented Jul 24, 2025

Sure @Baibhab-Adhikari, take your time! Also try to keep the emergency button RED as it was before, it suits the button more in my opinion...
Also make sure to link this PR to the issue (#5), it is unlinked.

@Baibhab-Adhikari
Copy link
Contributor Author

Sure, I agree with the button colour, I might have accidentally changed that. I'll fix it and will provide you the deployment link. And yes, I forgot about linking the issue. I'm on it

@Baibhab-Adhikari
Copy link
Contributor Author

Baibhab-Adhikari commented Jul 24, 2025

@eccentriccoder01 button colour is fixed and deployment is ready to go! Here it is: Fixed Demo URL. Please do let me know if there are any other things to check. If this is merged, I'll start working on issue #11

@eccentriccoder01
Copy link
Owner

Thank you so much for this valuable and well-executed contribution @Baibhab-Adhikari!

  • Demo looks clean, works as expected, and the emergency page feels genuinely helpful
  • Button styling issue is now fixed
  • Overall layout fits seamlessly into the current design

Now you can work on the other issues, thanks again for your patience and efforts in improving TalkHeal❕

@eccentriccoder01 eccentriccoder01 merged commit 0cc933d into eccentriccoder01:main Jul 24, 2025
@Baibhab-Adhikari
Copy link
Contributor Author

Thank you so much @eccentriccoder01 for letting me contribute to your project (My first contribution ever lol). Thank you! Also since I am quite busy at college right now, due to some events, can you give me some more time to work on issue #11 ? Deadline at Tuesday (29th July) would be amazing.. Please do let me know, thank you!

@eccentriccoder01
Copy link
Owner

@Baibhab-Adhikari there is no hurry, I know you're one of the sincere contributors... No issues even if you need time post deadline, take your time... Also, it is genuinely impressive if it's your first contribution, since you're already working like a Pro, LOL...All the best❕

@Baibhab-Adhikari
Copy link
Contributor Author

really appreciate it @eccentriccoder01 🙏

@Baibhab-Adhikari Baibhab-Adhikari deleted the feat/emergency-help-button-5 branch July 27, 2025 11:41
@github-actions github-actions bot added enhancement New feature or request gssoc25 level 3 labels Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gssoc25 level 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emergency Help button
2 participants