Skip to content

Comments

Feat/community#30

Closed
CMolinaBetancourt wants to merge 8 commits intomainfrom
feat/community
Closed

Feat/community#30
CMolinaBetancourt wants to merge 8 commits intomainfrom
feat/community

Conversation

@CMolinaBetancourt
Copy link
Collaborator

🎯Type of Change (Select one or more):

  • Feat ✨: Community and community responses pages.

This PR...

  • New Pages: Implements the Community and Forum Responses views (ForumResponses.jsx, Community.jsx).
  • Data Integration: Connects both pages to Firebase to save and retrieve user responses from the journal.
  • Privacy Control: Incorporates the "Opt out of sharing in the Community Forum" option in DailySummary.jsx. The ForumResponses.jsx logic enforces this preference, ensuring that only comments that do not have optOut: true are publicly visible ((anonymously).

📝 What I Did (Detailed Work):

  • Coded the Community and Community Responses pages.
  • Configured the pages so that the information is saved in Firebase.
  • Incorporated the opt-out of sharing in the Community Forum option into the daily summary feature.

Remember that other changes appear that were caused by running the format and lint commands


🧪 How to Test (Steps to Verify):

¡Me parece una lista de pruebas muy clara y completa! Has cubierto la configuración, la inclusión/exclusión de datos, la navegación y la funcionalidad clave de la redirección.

Solo tengo una sugerencia menor para el paso de verificación en el punto 6 y el formato de los puntos.

📝 Sugerencia de Ajuste

  1. Paso 4 (Verificación optOut): En la práctica de Firebase, si la opción no se marca, el campo optOut a menudo no se guarda en el documento. Lo más seguro es verificar que sea false o que no exista. Esto hace la instrucción de prueba más robusta.
  2. Paso 6 (Claridad de las Pruebas A y B): En tu lista anterior, separaste la prueba de inclusión (optOut: false) y exclusión (optOut: true). Aquí la PR es más concisa, pero perdemos la verificación de la exclusión.

Aquí tienes la versión ajustada para una máxima claridad y precisión técnica:


🧪 How to Test (Steps to Verify):

1. ⚙️ Setup

  1. Navigate to the previous deployment or preferably pull the information from the branch feat/communityForum.
  2. If you pull the branch, you can change the user ID in the page journal line 17: const USER_ID = 'user-id'; to a new ID, e.g., user-id2. Check Firestore to ensure the ID has not been used.
  3. Sign in.

2. 🔒 Test Privacy and Saving (Daily Summary)

  • Open the Daily Summary window for any given day.
  • Inclusion Test (Share ON): Write a comment and uncheck the "Opt out of sharing..." box. Save the entry.
    • Verify in Firebase: Confirm that the saved entry in the journals collection has the optOut field as false or is missing entirely.
  • Exclusion Test (Opt-out ON): Open the window again and check the "Opt out of sharing..." box. Save the entry.
    • Verify in Firebase: Confirm that this new entry has the optOut field set to true.

3. Test the Community Page (/community)

  • Navigate to the main Community route (/community).
  • Verify that the list of all questions is displayed correctly.
  • Click the arrow icon on any question.
  • Confirm that the navigation leads to the correct responses page for that day (/community/responses/[day]).

4. Test the Responses Page and Privacy Logic

  • Navigate to the responses page for the day you tested in Step 2.
  • Verify Inclusion: Confirm that the comment from the Inclusion Test (Share ON) is displayed in the list of responses as "Anonymous."
  • Verify Exclusion: Confirm that the comment from the Exclusion Test (Opt-out ON) DOES NOT appear in the list of responses.

5. Test Redirection (Empty Case)

  • Navigate to the responses page for a day without any shared responses.
  • Click the arrow icon that appears next to the "Be the first to share..." message.
  • Expected Result: The application must redirect to the /journal page and automatically open the Daily Summary for that specific day.

🤔 What I learned (gotchas):

I didn't know Firebase, and it's a very friendly database.

@netlify
Copy link

netlify bot commented Nov 29, 2025

Deploy Preview for mint-chip ready!

Name Link
🔨 Latest commit 766b63e
🔍 Latest deploy log https://app.netlify.com/projects/mint-chip/deploys/692b490ac4ba7400080d2a2a
😎 Deploy Preview https://deploy-preview-30--mint-chip.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CMolinaBetancourt CMolinaBetancourt deleted the feat/community branch December 7, 2025 17:52
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.

1 participant