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

load search when the page loads, rather than when react is done #7709

Closed
wants to merge 1 commit into from

Conversation

Pomax
Copy link
Contributor

@Pomax Pomax commented Oct 27, 2021

Closes #7667

This updates the build so that search.js ends up as "its own file" in the frontend/js dir, getting loaded as part of the <head> payload for catalog pages (PNI homepage + category pages) with async defer so that it can be used as soon as the page DOM is ready for reading.

Note that you'll want to hide whitespace for reviewing file changes in this case: https://github.com/mozilla/foundation.mozilla.org/pull/7709/files?diff=unified&w=1

Also note that this will need a "redo" for the search.js file itself, once #7649 has landed.

Test URL: https://foundation-s-externaliz-0hxqyx.herokuapp.com/en/privacynotincluded/

@Pomax Pomax requested a review from fessehaye October 27, 2021 19:28
@mofodevops mofodevops temporarily deployed to foundation-s-externaliz-0hxqyx October 27, 2021 19:28 Inactive
Copy link
Contributor

@fessehaye fessehaye left a comment

Choose a reason for hiding this comment

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

looks like it works!

@Pomax Pomax force-pushed the externalize-search branch from 1b10733 to 97ad8a4 Compare October 28, 2021 16:39
@Pomax Pomax temporarily deployed to foundation-s-externaliz-0hxqyx October 28, 2021 16:40 Inactive
@Pomax Pomax mentioned this pull request Nov 2, 2021
@Pomax
Copy link
Contributor Author

Pomax commented Nov 2, 2021

Superceded by #7741

@Pomax Pomax closed this Nov 2, 2021
@Pomax Pomax deleted the externalize-search branch November 2, 2021 17:43
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