There seems to be an issue with useSetting. Simply having
`useSetting('welcome_wizard_current_step')` in App causes re-renders on
any state change. The effect was that you could only type one letter in
the input fields before the app would re-render and the field would lose
focus.
I tried and failed to figure out what was causing all the re-renders, so
for now I've settled on this workaround, since we only care about the
initial state of the setting anyway. That being said, this seems like
something we should investigate as it could be affecting other
components and causing lots of unnecessary re-renders.
MAILPOET-5216
Users can click on the Finish setup button on the WooCommerce Multichannel Marketing Dashboard which would redirect them to the MailPoet welcome wizard.
We want to track users that arrive to the MP wizard from
WooCommerce but at this point tracking is not enabled. So we store the
information in a setting, and send the tracking event to Mixpanel, if it
is enabled, after the user completes the wizard.
MAILPOET-5695
The property was added so that we were able to set the main page
dynamically based on the feature switch value. This is no longer needed and
we can use the hardcoded constant as we did before.
[MAILPOET-4831]
In [MAILPOET-4818], we started using the settings Redux store to handle
adding the MSS key in the last step of the Welcome Wizard. This
introduced a bug in the previous steps as the same Redux store is not
used. Those steps rely on the component state to track changes to their
fields. This meant that once the user completed the last step, the
changes made in the previous steps were ignored and the default values
for the settings was saved to the database.
This commit fixes this bug for the first step of the wizard by using the
same settings Redux store to track changes to the sender name and
address.
[MAILPOET-5059]
MailPoet adds a link to the WooCommerce task list pointing to its own
welcome wizard. We want to track users that arrive to the MP wizard from
WooCommerce but at this point tracking is not enabled. So we store the
information in a setting, and send the tracking event to Mixpanel, if it
is enabled, after the user completes the wizard.
[MAILPOET-4814]
We need to be able to change it when homepage feature is active.
When we remove the feature flag will switch back to using constant.
Note I also kept the constant in case a third party plugin uses it.
[MAILPOET-4824]
The component that requires the global mailpoet_show_customers_import
variable is used also on the wizard page.
This commit ensures that it is set on the page.
[MAILPOET-4652]