One option to implement override default promo messages via flag set in experiments is - Have default promo messages id in OnboardingMessageProvider suffix with '*_DEFAULT' or a separate field type: 'default' https://searchfox.org/mozilla-central/source/browser/components/newtab/lib/OnboardingMessageProvider.jsm#98 - Have experiment messages configure with a field e.g. defaultPromo: 'show' or 'hide' - Inside sendPbNewTabMessage before handleMessageRequest call filter out default messages from state if a 'pb_newtab' experiment message has defaultPromo value as hide https://searchfox.org/mozilla-central/rev/5204ea3d3dac5832075fb61d9689dd7879ed91b2/browser/components/newtab/lib/ASRouter.jsm#1613
Bug 1765907 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
One option to implement override default promo messages via flag set in experiments is - Have default promo messages id in OnboardingMessageProvider suffix with '*_DEFAULT' or a separate field type: 'default' https://searchfox.org/mozilla-central/source/browser/components/newtab/lib/OnboardingMessageProvider.jsm#98 - Have experiment messages configure with a field e.g. defaultPromo: 'show' or 'hide' - Inside sendPbNewTabMessage before handleMessageRequest call filter out default messages from state.messages if a 'pb_newtab' experiment message has defaultPromo value as hide https://searchfox.org/mozilla-central/rev/5204ea3d3dac5832075fb61d9689dd7879ed91b2/browser/components/newtab/lib/ASRouter.jsm#1613
One option to implement override default promo messages via flag set in experiments is - Have default promo messages id in OnboardingMessageProvider suffix with '*_DEFAULT' or a separate field type: 'default' https://searchfox.org/mozilla-central/source/browser/components/newtab/lib/OnboardingMessageProvider.jsm#98 - Have experiment messages configure with a field e.g. hideDefault: true or false - Inside sendPbNewTabMessage before handleMessageRequest call filter out default messages from state.messages if a 'pb_newtab' experiment message has hideDefault as true https://searchfox.org/mozilla-central/rev/5204ea3d3dac5832075fb61d9689dd7879ed91b2/browser/components/newtab/lib/ASRouter.jsm#1613