-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby): show multiple invites together & at end where people are more likely to see them #28450
Conversation
… more likely to see them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the emitter.off
needs a little work.
Overall I like the grouping of these messages but I worry that people will never see them if they are only shown at the end. Like what happens when you abort?
Does this system have no tests? No snapshots to update? Could we have some?
} | ||
} | ||
|
||
emitter.on(`COMPILATION_DONE`, showNotices) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid executing code at import time? This leads to weird and hard to debug problems later on when shuffling imports that potentially impact how things work together. In fact I would propose to not even use COMPILATION_DONE
callback at all and just call showNotices()
in webpack's DONE hook handler (on first compile only?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we could do that 👍
Co-authored-by: Michal Piechowiak <[email protected]>
Co-authored-by: Michal Piechowiak <[email protected]>
b4667e7
to
a9560a2
Compare
Co-authored-by: Michal Piechowiak <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approve
… more likely to see them (#28450) * fix(gatsby): show multiple invites together & at end where people are more likely to see them * Add telemetry * update copy from suggestions by @DSchau * Actually stop listening * Update packages/gatsby/src/utils/show-experiment-notice.ts Co-authored-by: Matt Kane <[email protected]> * Add test for generating the message * rewrite messages & make shorter * make all the things happy * update flag * This breaking windows?? * Don't use explicit \n to see if that helps snapshot * Maybe jest is fine w/ explicit new-lines 🤷♂️ * Strip ansi for tests * Update packages/gatsby/src/services/initialize.ts Co-authored-by: Michal Piechowiak <[email protected]> * Update packages/gatsby/src/services/run-page-queries.ts Co-authored-by: Michal Piechowiak <[email protected]> * use trackCLI not trackFeatureIsUsed * only store that we showed the invite when we actually do show the invite * Call code directly from webpack's done callback * mock in jest * be more explicit about how the caching behavior changes * Show full code sample per @pelikhan's feedback * typescript fixes * Update packages/gatsby/src/services/initialize.ts Co-authored-by: Michal Piechowiak <[email protected]> * Update packages/gatsby/src/services/initialize.ts Co-authored-by: Matt Kane <[email protected]> Co-authored-by: gatsbybot <[email protected]> Co-authored-by: Michal Piechowiak <[email protected]> (cherry picked from commit 7e734cc)
… more likely to see them (#28450) (#28541) * fix(gatsby): show multiple invites together & at end where people are more likely to see them * Add telemetry * update copy from suggestions by @DSchau * Actually stop listening * Update packages/gatsby/src/utils/show-experiment-notice.ts Co-authored-by: Matt Kane <[email protected]> * Add test for generating the message * rewrite messages & make shorter * make all the things happy * update flag * This breaking windows?? * Don't use explicit \n to see if that helps snapshot * Maybe jest is fine w/ explicit new-lines 🤷♂️ * Strip ansi for tests * Update packages/gatsby/src/services/initialize.ts Co-authored-by: Michal Piechowiak <[email protected]> * Update packages/gatsby/src/services/run-page-queries.ts Co-authored-by: Michal Piechowiak <[email protected]> * use trackCLI not trackFeatureIsUsed * only store that we showed the invite when we actually do show the invite * Call code directly from webpack's done callback * mock in jest * be more explicit about how the caching behavior changes * Show full code sample per @pelikhan's feedback * typescript fixes * Update packages/gatsby/src/services/initialize.ts Co-authored-by: Michal Piechowiak <[email protected]> * Update packages/gatsby/src/services/initialize.ts Co-authored-by: Matt Kane <[email protected]> Co-authored-by: gatsbybot <[email protected]> Co-authored-by: Michal Piechowiak <[email protected]> (cherry picked from commit 7e734cc) Co-authored-by: Kyle Mathews <[email protected]>
Published in |
… more likely to see them (gatsbyjs#28450) * fix(gatsby): show multiple invites together & at end where people are more likely to see them * Add telemetry * update copy from suggestions by @DSchau * Actually stop listening * Update packages/gatsby/src/utils/show-experiment-notice.ts Co-authored-by: Matt Kane <[email protected]> * Add test for generating the message * rewrite messages & make shorter * make all the things happy * update flag * This breaking windows?? * Don't use explicit \n to see if that helps snapshot * Maybe jest is fine w/ explicit new-lines 🤷♂️ * Strip ansi for tests * Update packages/gatsby/src/services/initialize.ts Co-authored-by: Michal Piechowiak <[email protected]> * Update packages/gatsby/src/services/run-page-queries.ts Co-authored-by: Michal Piechowiak <[email protected]> * use trackCLI not trackFeatureIsUsed * only store that we showed the invite when we actually do show the invite * Call code directly from webpack's done callback * mock in jest * be more explicit about how the caching behavior changes * Show full code sample per @pelikhan's feedback * typescript fixes * Update packages/gatsby/src/services/initialize.ts Co-authored-by: Michal Piechowiak <[email protected]> * Update packages/gatsby/src/services/initialize.ts Co-authored-by: Matt Kane <[email protected]> Co-authored-by: gatsbybot <[email protected]> Co-authored-by: Michal Piechowiak <[email protected]>
Also track when we show invites so we get a sense of how often that is happening