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

Serve GVL languages as they are requested #5112

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Jul 19, 2024

Closes PROD-2412

Description Of Changes

Because GVL languages are so bandwidth intensive, it is preferred to only load the appropriate language at the appropriate time.

  • At initialization time: load the user’s preferred language based on “best locale”
  • At language switch

CleanShot 2024-07-19 at 17 30 05@2x

In the UI we communicate that we are fetching the language by spinning the globe icon. The api result is so fast that most users won't experience this anyway. Example with network throttling at 2G Speeds:

Screen Recording 2024-07-19 at 5 33 33 PM

Code Changes

  • Add spin animation to globe during api load
  • update initial call to gvl/translations to only load current "best" locale
  • update language switcher to call gvl/translation for updating

Steps to Confirm

  • For non-TCF experiences, nothing should change; language switcher should behave as normal
  • For TCF experiences:
    • Open network tab and notice that on first load the call to gvl/translations only asks for and returns the user's current locale
    • in the lanugage switcher of the overlay, change languages
    • notice that a new call has been made to gvl/translations and that it asks for and returns the newly selected locale.

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Update CHANGELOG.md

Copy link

vercel bot commented Jul 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Jul 20, 2024 0:21am

Copy link

cypress bot commented Jul 20, 2024

Passing run #9043 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 93f1afc into 7db927b...
Project: fides Commit: 6dd526f0e4 ℹ️
Status: Passed Duration: 00:35 💡
Started: Jul 20, 2024 12:32 AM Ended: Jul 20, 2024 12:32 AM

Review all test suite changes for PR #5112 ↗︎

@gilluminate gilluminate force-pushed the gill/PROD-2412_fides-js-serve-gvl-languages branch from 62be18a to 93f1afc Compare July 20, 2024 00:20
@gilluminate gilluminate requested a review from jpople July 22, 2024 15:14
Copy link
Contributor

@jpople jpople left a comment

Choose a reason for hiding this comment

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

Everything looks good to me! Nice work on the animation, that's very cute.

@gilluminate gilluminate merged commit 40ab56a into main Jul 22, 2024
13 checks passed
@gilluminate gilluminate deleted the gill/PROD-2412_fides-js-serve-gvl-languages branch July 22, 2024 16:07
Copy link

cypress bot commented Jul 22, 2024

Passing run #9054 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Serve GVL languages as they are requested (#5112)
Project: fides Commit: 40ab56a835
Status: Passed Duration: 00:35 💡
Started: Jul 22, 2024 4:19 PM Ended: Jul 22, 2024 4:19 PM

Review all test suite changes for PR #5112 ↗︎

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