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!!

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