Skip to content

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

Merged
jmkulwik merged 1 commit into
stagingfrom
fix-regional-partner-playbook-locale
Mar 17, 2020
Merged

Prevented localized elements from being imported into non-localized regional partner playbook#33670
jmkulwik merged 1 commit into
stagingfrom
fix-regional-partner-playbook-locale

Conversation

@jmkulwik

@jmkulwik jmkulwik commented Mar 17, 2020

Copy link
Copy Markdown
Contributor

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

@islemaster islemaster left a comment

Copy link
Copy Markdown
Contributor

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

Hamms commented Mar 17, 2020

Copy link
Copy Markdown
Contributor

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.

3 participants