Skip to content

refactor: replace deprecated 'context.master' with 'context.primary' for inclusive language (#33068) #40357

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Row-heat
Copy link

Summary

This pull request updates all references of context.master to context.primary across the AMPHTML codebase as part of an inclusive language refactor, in alignment with issue #33068.

The following changes were made:

  • ampcontext-integration.js: Refactored the IntegrationAmpContext class and masterSelection() function.
  • 3p.js: Updated computeInMasterFrame() usage from global.context.master to global.context.primary.
  • test-3p.js: Updated all test setup references using context.master.

No functional or behavioral changes were introduced. This is a semantic change to align with inclusive coding standards.


Motivation

The use of terms like "master" can be problematic and non-inclusive. This refactor improves code readability and ensures the project aligns with modern inclusive language practices.


Notes

  • Confirmed that context.slave is not used anywhere in the codebase.
  • Ensured all references were updated safely.
  • All existing test cases were adjusted to use the new terminology where necessary.
  • CI should pass as no logic was altered.

Closes: #33068

@CLAassistant
Copy link

CLAassistant commented Jul 18, 2025

CLA assistant check
All committers have signed the CLA.

@Row-heat
Copy link
Author

Hi @caroqliu 👋
This PR updates variable names to promote inclusive terminology. All relevant instances of context.master have been replaced with context.primary. Please review when convenient. Thanks!

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.

🐛Story Ads UI appears very small on 4k monitor
2 participants