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

chore(gatsby): enable query on demand (and lazy images) by default for local development #28787

Merged
merged 7 commits into from
Dec 29, 2020

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Dec 29, 2020

Description

This PR "graduates" query on demand mode to default in non-CI environment.

Main change here is adding support for LOCKED_IN setting for flags - this is done mainly to display more meaningful message in terminal. Removing the flag from the list would result in "unknown" flag message that could be confusing.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 29, 2020
Comment on lines +45 to +46
process.env.PRESERVE_FILE_DOWNLOAD_CACHE = `true`
process.env.PRESERVE_WEBPACK_CACHE = `true`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just "random" thing I spotted when looking for qod related changes I needed - we added those to FAST_DEV config flag but not to GATSBY_EXPERIMENTAL_FAST_DEV env var route - I can drop those from here, but it would be weird for FAST_DEV to only map to DEV_SSR 🤷

Comment on lines +207 to +209
if (message.length > 0) {
message += `\n`
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was sometimes causing \n message without any text (yikes)

Comment on lines -88 to -90
"message": "

We're shipping new features! For final testing, we're rolling them out first to a small % of Gatsby users
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Result of adding checks before appending newlines to message in handle-flags.ts - it should no longer have "ghost" empty lines in front of messages

@pieh pieh removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 29, 2020
vladar
vladar previously approved these changes Dec 29, 2020
Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

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

Nice! I tried it locally and it works as one would expect. Thanks! 👍

@vladar vladar merged commit f19c807 into master Dec 29, 2020
@vladar vladar deleted the feat/flags/graduated branch December 29, 2020 20:31
pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
…r local development (gatsbyjs#28787)

* feat(flags): add LOCKED_IN mode for flags for cases where opt-in features become defaults

* feat(gatsby): enable query on demand (and lazy images) by default for local development

* fix "lint"

* chore(telemetry): don't track usage of query on demand / lazy images anymore - those are defaults

* use plain false instead of weird Symbol do opt out of telemetry tracking

* Update packages/gatsby/src/utils/handle-flags.ts

Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>

* update snapshots

Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>
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.

2 participants