Skip to content

Conversation

@Shayan105
Copy link
Member

@Shayan105 Shayan105 commented Nov 26, 2025

Note

This task is linked to the PR : CompassionCH/compassion-modules#2059 and should be merged after it.
The changes in the current PR are also dependent of the changes brought by its target branch in the PR : #198

Summary

This PR solves a confidentiality issue regarding the children safety.
1 ) The Map component used to display the accurate location of the Church partner.
2) The component displayed the name of the church partner, which should not be public.

Solution

  1. Coordinates obfuscation
    The location shown in the map are now obfuscated in the following way :
    The map shows the location of the closest city or the middle of the country, if these informations are not available, the map will show a random point in a radius of 100 km.

  2. Show the CDC and not the Church name
    The church name is no longer shown in the component. If available, the component will display the field child_center_original_name of the name of the project. If None of these information is available, it will just display "Compassion center".

Technical implementation

  1. For the location obfuscation, a api request to google geocode is done using the Nearest_city and the Country_name of the center. This one is stored upon first successful api response. If these two values are not available, an integer rounding of the real center_location make the localisation to be accurate at 100km.

@gemini-code-assist
Copy link

Summary of Changes

Hello @Shayan105, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances child protection features within the application by introducing a method to obfuscate sensitive geographical location data for children displayed on their timeline page. This change prevents the direct exposure of precise coordinates. Concurrently, it refines the naming convention for child development centers, standardizing the term 'cdc_name' and improving the resilience of how these names are retrieved and presented across relevant components.

Highlights

  • Location Data Obfuscation: Implemented a mechanism to obfuscate geographical coordinates (longitude and latitude) displayed on the child's timeline page, ensuring precise locations are not directly exposed by using a new get_obfuscated_coordinates_json() method.
  • Standardized Center Naming: Renamed the church_name variable and related template references to cdc_name (Child Development Center name) and updated the logic for retrieving this name to be more robust, including fallback options if specific names are unavailable.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces important child protection measures by obfuscating GPS coordinates on the child's page, and improves naming consistency by using cdc_name instead of church_name. My review focuses on improving the implementation of these changes for better performance, maintainability, and internationalization. Specifically, I've suggested optimizing a repeated function call and ensuring a fallback text is translatable, which is important for an international application.

Base automatically changed from T2728---Make-the-weather-time-component-more-responsive to 14.0-MyCompassion2.0 December 17, 2025 13:19
@Shayan105
Copy link
Member Author

@ecino Your changes have been applied.
Thanks

@Shayan105 Shayan105 requested a review from ecino January 8, 2026 09:57
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.

3 participants