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

Prevented localized elements from being imported into non-localized regional partner playbook #33670

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

jmkulwik
Copy link
Contributor

@jmkulwik jmkulwik commented Mar 17, 2020

Short Description: The regional partner playbook is unable to load if any localized elements are required in its dependencies. playbook.js imports the redux store. When the 'projects' reducer (which has an un-needed dependency on a localized element) was added to the redux store, it caused the regional partner playbook to fail to load. This PR removes those localized elements.

Long Description: This is a fix for a bug caused by this PR: #33593
Specifically, the addition of the "projects" reducers to the redux store:

The "projects" reducers imported from a constants file that used localized elements. This caused problems downstream in a page that explicitly does not import localized elements, https://code.org/educate/regional-partner/playbook

Having these localized elements caused the Regional Partner Virtual Playbook to fail to load due to a JS error.

image

Removing these localized elements from the constants file fixes this issue.

Links

Testing story

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

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

👍 Looks good!

This looks like a really sharp edge. Let's do some brainstorming tomorrow on how we can prevent similar issues in the future.

@Hamms
Copy link
Contributor

Hamms commented Mar 17, 2020

I'd be down to be a part of that brainstorming; this sharp edge appears to be caused by our i18n engine, after all.

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.

None yet

3 participants