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

feat(gatsby,gatsby-script): Do not use context for script collection #36246

Merged
merged 29 commits into from
Aug 3, 2022

Conversation

tyhopp
Copy link
Contributor

@tyhopp tyhopp commented Jul 27, 2022

Description

Removes use of React context when collecting off-main-thread scripts to configure forwards on a per-page basis.

It also:

  • Improves browser runtime handling since the Partytown snippet is now injected into the head instead of the body (as the Partytown docs instruct)
  • Removes unnecessary unit tests since cases are covered in e2e

Documentation

Updates the limitations section of the script component off-main-thread strategy docs. No limitation is added with this PR, instead it documents an existing limitation that is missing from the docs and links to the Partytown repo.

Related Issues

[sc-53628]

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 27, 2022
@tyhopp tyhopp marked this pull request as draft July 27, 2022 06:21
@tyhopp tyhopp added topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jul 27, 2022
@tyhopp tyhopp changed the title feat(gatsby, gatsby-script): Do not use context for script collection feat(gatsby,gatsby-script): Do not use context for script collection Jul 28, 2022
@tyhopp tyhopp dismissed a stale review via ef370b7 July 28, 2022 05:53
@tyhopp tyhopp force-pushed the feat-no-context-script-collection branch from 3a438aa to 735a6d1 Compare July 29, 2022 09:54
@tyhopp tyhopp force-pushed the feat-no-context-script-collection branch from f24d77d to 43b5006 Compare July 29, 2022 16:03
@tyhopp tyhopp marked this pull request as ready for review August 1, 2022 02:59
@tyhopp tyhopp dismissed a stale review via c39c009 August 1, 2022 07:22
@tyhopp tyhopp dismissed a stale review via 18fed8c August 2, 2022 02:41
@tyhopp tyhopp requested a review from wardpeet August 2, 2022 08:59
LekoArts
LekoArts previously approved these changes Aug 2, 2022
@tyhopp tyhopp merged commit 49cf094 into master Aug 3, 2022
@tyhopp tyhopp deleted the feat-no-context-script-collection branch August 3, 2022 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants