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

[CORL-3189]: Add support for non-latin character range for urls for comment counts #4675

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

kabeaty
Copy link
Contributor

@kabeaty kabeaty commented Oct 2, 2024

What does this PR do?

These changes add support for non-Latin characters in story urls for comment counts. Previously, we were getting Uncaught InvalidCharacterError: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range. when attempting to create a count query ref with characters outside of the range. This updates as recommended here to address this issue.

These changes will impact:

  • commenters
  • moderators
  • admins
  • developers

What changes to the GraphQL/Database Schema does this PR introduce?

none

Does this PR introduce any new environment variables or feature flags?

no

If any indexes were added, were they added to INDEXES.md?

n/a

How do I test this PR?

You can test that comment counts still work as expected. You can also run these changes--the new bytesToBase64 function and bytesToBase64(new TextEncoder().encode(URL))--in the console with a story url such as is mentioned in this issue and confirm that you get a ref that can be used back and not an error.

Were any tests migrated to React Testing Library?

How do we deploy this PR?

Copy link

netlify bot commented Oct 2, 2024

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
🔨 Latest commit c4be6c8
🔍 Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/66fd9e9ac982330008935fbe

@kabeaty kabeaty requested review from nick-funk and tessalt October 2, 2024 19:29
Copy link
Contributor

@tessalt tessalt left a comment

Choose a reason for hiding this comment

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

great investigation

@tessalt tessalt merged commit ef2c3a1 into develop Oct 3, 2024
6 checks passed
@tessalt tessalt deleted the fix/CORL-3189-language-urls branch October 3, 2024 12:26
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.

2 participants