Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix Direct / None modal #4824

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Hotfix Direct / None modal #4824

merged 1 commit into from
Nov 14, 2024

Conversation

apata
Copy link
Contributor

@apata apata commented Nov 14, 2024

Changes

  1. Passing a react-router path param with a forward slash in it, like "Direct / None", breaks the route. There's two routes that have params that take user input (filter modals has fixed param values), and this PR encodes such params.
  2. useParams gives us a decoded value for the params, therefore we need to re-encode them to make successful API calls.

Tests

  • Automated tests have been added
  • This PR does not require tests

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

@apata apata added the preview label Nov 14, 2024
Copy link

Preview environment👷🏼‍♀️🏗️
PR-4824

Copy link
Contributor

@ukutaht ukutaht left a comment

Choose a reason for hiding this comment

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

Question: are you encoding conditionally here so we can keep URLs prettier if they don't need encoding?

@apata
Copy link
Contributor Author

apata commented Nov 14, 2024

Question: are you encoding conditionally here so we can keep URLs prettier if they don't need encoding?

I didn't want to risk creating another problem where previously working dashboard links break, or API requests differ from previous requests. Wanted to get a hotfix live as a priority.

With a bit more investigation and tests, we could have answers if there is any risk encoding in all scenarios, and to what degree we can maintain nice links.

@apata apata added this pull request to the merge queue Nov 14, 2024
Merged via the queue into master with commit d187e59 Nov 14, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants