Skip to content

Conversation

amy-corson-ibigroup
Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup commented Oct 6, 2025

Description:
Fixes a bug where user saved trips, which are formatted nickname (placename) were not showing the close parenthesis in the previous trips pane.

Open to another approach or laying out the user places in a different way. Are there cases where there could be a "(" character in a name that does not require a close parenthesis?

PR Checklist:

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?
Before After
image image

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Nice fix

return string.split(',')[0]
let newString = string.split(',')[0]
// If there is an open parenthesis without a close (user saved place), add one.
if (newString.includes('(') && !newString.includes(')')) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about this string? Coffee (Starbucks (Market & 20th)? I think you may need to actually count the open and close parentheses 🙃 I knew this leetcode problem would come in handy one day!!

@amy-corson-ibigroup
Copy link
Contributor Author

Revised the approach! Much easier than I expected it to be, although slightly different than what we discussed on our call. Reassigning @binh-dam-ibigroup to re-review

}
function findCustomLocationShortName(location, locations = []) {
const match = locations.find((l) => matchLatLon(l, location))
return match && (match.type === 'custom' || match.type === 'dining')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Try excluding "Home" and "Work" instead?

@amy-corson-ibigroup amy-corson-ibigroup merged commit fb84a7f into dev Oct 20, 2025
9 checks passed
@amy-corson-ibigroup amy-corson-ibigroup deleted the fix-user-saved-place-trips branch October 20, 2025 18:12
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