Skip to content

Frontend: Split key/labels in ProfileTagInput - #9169

Merged
tristanlabelle merged 2 commits into
developfrom
frontend/refactor/ProfileTagInput-key-values
Jun 25, 2026
Merged

Frontend: Split key/labels in ProfileTagInput#9169
tristanlabelle merged 2 commits into
developfrom
frontend/refactor/ProfileTagInput-key-values

Conversation

@tristanlabelle

@tristanlabelle tristanlabelle commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Refactors ProfileTagInput to take key:label pairs as the list of options, for example { en: "English", fr: "French" }. We still display the labels, but only expose the keys to consuming code since those are what the business logic needs. This way consumers don't need to map and reverse-map display strings.

This is related to and motivated by #8424: it will then make it trivial to translate spoken languages by providing a dictionary like { en: "Anglais", fr: "Français" } since we have translation keys for (some) language codes.

No functional changes.

Testing

Edited profile using the Vercel link on this PR.

Web frontend checklist

  • There are no console warnings when running the app
  • Added tests where relevant
  • Clicked around my changes running locally and it works
  • Checked Desktop, Mobile and Tablet screen sizes

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

@CouchersBot

CouchersBot commented Jun 23, 2026

Copy link
Copy Markdown
Member

Mobile

Install the Dev Tool (iOS via TestFlight, iOS Simulator, or Android .apk) here.

Scan the QR with your phone camera, or tap Open in Dev Tool on the device, to open this branch in the installed Dev Tool dev client.

    iOS         Android    
    QR to open the iOS build         QR to open the Android build    
    Open in Dev Tool         Open in Dev Tool    
Deep links

iOS

couchers-devtool://expo-development-client/?url=https%3A%2F%2F44d96d3f--ota.preview.couchershq.org%2Fios%2Fmanifest

Android

couchers-devtool://expo-development-client/?url=https%3A%2F%2F44d96d3f--ota.preview.couchershq.org%2Fandroid%2Fmanifest

Web (Vercel)

View the Vercel web preview for this branch.

Backend

Schema Schema diff Sample emails

Other

Protos Backend coverage Web coverage

Comment thread app/web/features/profile/edit/EditProfile.tsx
@tristanlabelle
tristanlabelle marked this pull request as ready for review June 23, 2026 20:25
@tristanlabelle
tristanlabelle requested a review from nabramow as a code owner June 23, 2026 20:25
@tristanlabelle
tristanlabelle requested a review from a team June 23, 2026 20:25
Comment thread app/web/features/profile/hooks/useRegions.ts
Comment thread app/web/features/profile/ProfileTagInput.tsx Outdated
@nabramow

Copy link
Copy Markdown
Member

This seems okay to me, at least I tested and everything still works as before. I assume the actual ability to localize these will come in a follow up PR?

Do we also need to handle the dropdown where people choose the languages?:

Screenshot 2026-06-24 at 10 36 09

@tristanlabelle

tristanlabelle commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@nabramow , yes, my next PR will bake localization in useRegions/useLanguages so it returns localized labels where available. The dropdown is already handled in this PR (See the <StyledAutocompleteOption> part).

@nabramow nabramow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM pulled the branch and nothing looks different at least

@tristanlabelle
tristanlabelle merged commit 4c8728d into develop Jun 25, 2026
10 checks passed
@tristanlabelle
tristanlabelle deleted the frontend/refactor/ProfileTagInput-key-values branch June 25, 2026 12:10
@github-actions

Copy link
Copy Markdown
Contributor

📝 Release Notes

This PR does not need to be included in release notes.

Reason: This PR is explicitly a refactor with no functional changes and no visible user-facing impact yet. It prepares profile tag inputs for future localization work, but on its own it does not add a feature, fix an important user-facing bug, or introduce a major technical infrastructure improvement that end users would notice.

🤖 Bot Debug Information

Model: couchers.openai.gpt-5.4
Decision: exclude
Reasoning: This PR is explicitly a refactor with no functional changes and no visible user-facing impact yet. It prepares profile tag inputs for future localization work, but on its own it does not add a feature, fix an important user-facing bug, or introduce a major technical infrastructure improvement that end users would notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants