Skip to content

Fix: Missing comments row on Volunteer Profile #413#415

Merged
need4deed merged 2 commits intoneed4deed-org:developfrom
lourooo:lourooo-feat-413-volunteer-comments
Apr 28, 2026
Merged

Fix: Missing comments row on Volunteer Profile #413#415
need4deed merged 2 commits intoneed4deed-org:developfrom
lourooo:lourooo-feat-413-volunteer-comments

Conversation

@lourooo
Copy link
Copy Markdown
Contributor

@lourooo lourooo commented Apr 27, 2026

Fix: Missing comments row on Volunteer Profile #413

Description

The volunteer profile was missing the Comments field from the display view, this adds the missing row.

Related Issues

Closes #413

Changes

Added comments translation key to EN and DE locale files under dashboard.volunteerProfile.profileSection
Added infoAbout prop to DisplayFields and rendered it as a new field row below "Skills & experience"
Passed volunteer.infoAbout from VolunteerProfile into DisplayFields

Screenshots / Demos

image

Checklist

  • WITHIN THE SCOPE OF AN ISSUE; No unnecessary files included
  • Tests added/updated
  • Documentation updated
  • CI passes

Copy link
Copy Markdown
Collaborator

@nadavosa nadavosa left a comment

Choose a reason for hiding this comment

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

PR #415 Review: Fix missing comments row on Volunteer Profile

The fix is correct and minimal — infoAbout was simply never passed to DisplayFields, so it never rendered. The wiring is straightforward. A few minor notes:

Minor: Misleading prop name
The prop is named infoAbout (the SDK's internal field name), but the label shown is "Comments" and the locale key is dashboard.volunteerProfile.profileSection.comments. Naming it comments would be consistent with the locale key and less confusing for future maintainers.

Minor: Redundant double-default
VolunteerProfile.tsx passes infoAbout={volunteer.infoAbout || ""}, and DisplayFields then checks {infoAbout || <EmptyPlaceholder />}. The || "" in the parent is redundant since an empty string is falsy and the child handles it — pick one location for the fallback.

Note: No edit support for this field
Users can see their comments but cannot edit them through this form. The mutation hook does list "comments" as an allowed key, so the infrastructure exists. If the intent is to keep it permanently read-only, a comment to that effect would help.

Tests: The PR checklist marks tests as not updated — if there are snapshots for DisplayFields, they'll need updating.

Copy link
Copy Markdown
Collaborator

@nadavosa nadavosa left a comment

Choose a reason for hiding this comment

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

Two small things to fix before merging:

1. Rename prop infoAboutcomments
The label shown is "Comments" and the locale key is dashboard.volunteerProfile.profileSection.comments. Using the SDK's internal field name as the prop name is inconsistent with how every other prop in DisplayFields is named (they all match the label/locale key). Rename the prop to comments in both DisplayFields.tsx and the call site in VolunteerProfile.tsx.

2. Remove redundant || "" in VolunteerProfile.tsx
VolunteerProfile.tsx passes infoAbout={volunteer.infoAbout || ""}, but DisplayFields already guards against empty with {infoAbout || <EmptyPlaceholder />}. An empty string is falsy, so the parent default is redundant. Keep the guard in one place — the child is the right spot since it owns the display logic.

Also note: this PR touches DisplayFields.tsx and VolunteerProfile.tsx — please rebase on develop before merging, as those files have been changed there.

lourooo added 2 commits April 28, 2026 10:00
Update: Rename prop & Remove Redundant
@lourooo lourooo force-pushed the lourooo-feat-413-volunteer-comments branch from 02a28a5 to 8c06dc2 Compare April 28, 2026 08:12
@lourooo
Copy link
Copy Markdown
Contributor Author

lourooo commented Apr 28, 2026

Updated

Copy link
Copy Markdown
Collaborator

@nadavosa nadavosa left a comment

Choose a reason for hiding this comment

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

Both fixes applied correctly — prop renamed to comments, redundant || "" removed from the parent.

One thing to be aware of: this PR touches DisplayFields.tsx and VolunteerProfile.tsx, which have an in-flight hotfix on another branch. You may need to rebase once that merges before this can land cleanly.

@need4deed need4deed merged commit 4f3b7a1 into need4deed-org:develop Apr 28, 2026
1 check passed
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.

Missing comments row on Volunteer Profile

3 participants