-
Notifications
You must be signed in to change notification settings - Fork 284
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
Add the Settings Section setup CTA variant including happy path setup behavior #8178
Comments
Thanks @ankitrox for drafting the IB. I've given an initial pass over the IB and the approach looks solid. A few questions and suggestions:
Let me know what you think, cheers! |
Thank you so much @kuasha420 for reviewing the IB. I have made some amendments in IB as per your suggestions. Assigning this to you for re-review. Thanks again! |
Thanks @ankitrox, Looking good now. However, I have missed a point in my previous review. The second to last point of the AC states "Upon success, a dismissible notice will be displayed alongside the switch for toggling the audiences widget area", this is not covered in current IB. Can you add that, Besides that, it would be nice to add a pointer/note about trying to avoid layout shift while the progressbar is showing by using a appropriate height for the Visitor Group area and other relevant component. What do you think? Cheers! |
@kuasha420 Thanks for the spotting the missing point about the success notice. I have addressed the feedback. assigning this to you for re-review. Thanks |
Thanks @ankitrox for the additions to the IB. It is worth pointing out that the success notice for settings should use a different dismiss item key, Otherwise, if someone activates the Audience Group in Dashboard, and visits settings without dismissing the success notification, they'll see it above the toggle here as well which may not be desirable behavior. Also, this should be a new component that renders inside the Cheers. |
Thank you @kuasha420 . Updated the IB to include new component |
…ngs-setup-cta Implement audience settings setup CTA
QA Update
|
@kelvinballoo, regarding your observations:
We should keep the CTA and text consistent with other admin settings. Please send it back to execution and assign it to @benbowler, as he agreed to work on it during the AS sync.
That has not been implemented yet. @techanvil, could you create a new issue for that? |
Thanks @hussain-t! As mentioned on Slack, I've created #9065. |
Back to you for another pass, @kelvinballoo. |
QA Update ✅Tested ITEM 1 and it's looking much better.
ITEM 2 will be tackled under #9065 Other than that, the following were tested good.
Moving ticket to Approval. |
Feature Description
Add the Settings Section setup CTA variant including happy path setup behavior.
This includes the setup logic (which may be extracted for reuse from the Setup CTA Banner if not already reusable) including OAuth redirection, the in progress state and the success state.
Note that the success state can reuse the component introduced in #8238.
See Settings section > setup CTA in the design doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
This should be implemented once #8132 is implemented and merged.
Create a hook
useAudienceSegmentationSetup
insideassets/js/modules/analytics-4/hooks/
.useAudienceSegmentationSetup
should return an object consisting of the following properties.isSaving
- This is a boolean flag indicating whether the setup operation is in progress. This can be constructed using theuseState
hook and will be set insideonEnableGroups
callback as it is currently inAudienceSegmentationSetupCTAWidget
component.onEnableGroups
- Callback forEnable groups
CTA. This should be taken as is fromAudienceSegmentationSetupCTAWidget
component from here with all the dependecies for theuseCallback
.canRender
- Returnnull
from the component if this isfalse
, else render the component. Refer this condition under which this can be evaluated.Create a new component
SettingsVisitorGroupsCTA
insideassets/js/modules/analytics-4/components/audience-segmentation/settings/
.SettingsCardVisitorGroups
component to create the UI forSettingsVisitorGroupsCTA
component, its similar.useAudienceSegmentationSetup
hoook which willreturn the object as mentioned above.
isSaving
isfalse
render theEnable groups
CTA, else render theProgressBar
component. We may need to add a fix height when displaying theProgressBar
to avoid the layout shift (~142px).onEnableGroups
callback returned by the hook.Create a new component
AudienceSetupSuccessSettingsNotice
inside/assets/js/modules/analytics-4/components/audience-segmentation/settings/
which should be responsible for displaying the success notice withinSettingsCardVisitorGroups
component.audience_segmentation_setup_settings_notification
.Update
SettingsCardVisitorGroups
component to display the success message as per following.AudienceSegmentationSetupSuccessSubtleNotification
component for the item key and how it handles the banner here. Note that the item key needs to be different as mentioned above so that relevant notice is being displayed.core/user
data store to check if the item is dismissed and to also dismiss the item.SettingsCardVisitorGroups
component if it has not been dismissed earlier.Got it
should dismiss the notice.navigateTo
function to navigate to the audience widget area.Update the
AudienceSegmentationSetupCTAWidget
to useuseAudienceSegmentationSetup
hook and remove the code which has been ported to hook.Test coverage
SettingsVisitorGroupsCTA
component with all the states.SettingsVisitorGroupsCTA
component with different states and props.AudienceSegmentationSetupCTAWidget
component to accommodate changes.useAudienceSegmentationSetup
hook.6 . Update the
SettingsCardVisitorGroups
component tests to add tests for the success notice behaviour.AudienceSetupSuccessSettingsNotice
component.QA Brief
audienceSegmentation
feature flag.Visitor groups
area.Changelog entry
The text was updated successfully, but these errors were encountered: