Scroll to the Audience Segmentation Settings section when navigating there from links on the dashboard #8875
Labels
Module: Analytics
Google Analytics module related issues
P2
Low priority
Team M
Issues for Squad 2
Type: Enhancement
Improvement of an existing feature
Feature Description
When following the Settings links on the Selection Panel and the "no audiences" banner, upon landing on the Settings page, the page should scroll down if necessary to ensure the Audience Segmentation Settings section is visible.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Update
assets/js/modules/analytics-4/components/audience-segmentation/settings/SettingsCardVisitorGroups.js
:id
visitor-groups
.site-kit-wp/assets/js/modules/analytics-4/components/audience-segmentation/settings/SettingsCardVisitorGroups.js
Line 61 in e12d144
global.location.hash?.substring( 17 );
. The substring 17 value, removes the#/admin-settings
prefix in the hash in the URL.useEffect
that runs with the hash value as a dependency:visitor-groups
, useglobal.scrollTo
with the following values:top
should usegetContextScrollTop
to get the y offset of the component with theid
#visitor-groups
behaviour
, should be set tosmooth
Update
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSelectionPanel/Header.js
,onSettingsClick
function to navigate to${ settingsURL }#/admin-settings#visitor-groups
.Update
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/NoAudienceBannerWidget/NoAudienceBanner.js
(added in Implement the “no audiences” banner happy path view #8155, this file), to navigate to${ settingsURL }#/admin-settings#visitor-groups
.Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: