Skip to content
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

Scroll to the Audience Segmentation Settings section when navigating there from links on the dashboard #8875

Open
9 tasks
techanvil opened this issue Jun 14, 2024 · 1 comment
Labels
Module: Analytics Google Analytics module related issues P2 Low priority Team M Issues for Squad 2 Type: Enhancement Improvement of an existing feature

Comments

@techanvil
Copy link
Collaborator

techanvil commented Jun 14, 2024

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.

image

image


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • 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 (AKA Visitor groups) is visible.

Implementation Brief

  • Update assets/js/modules/analytics-4/components/audience-segmentation/settings/SettingsCardVisitorGroups.js:

    • Give this element the id visitor-groups.
      <div className="googlesitekit-settings-module googlesitekit-settings-module--active">
    • Get the hash value from the URL using, global.location.hash?.substring( 17 );. The substring 17 value, removes the #/admin-settings prefix in the hash in the URL.
    • Create a new useEffect that runs with the hash value as a dependency:
      • If the hash value is visitor-groups, use global.scrollTo with the following values:
        • top should use getContextScrollTop to get the y offset of the component with the id #visitor-groups
        • behaviour, should be set to smooth
  • 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

  • No additional tests required.

QA Brief

Changelog entry

@techanvil techanvil added Module: Analytics Google Analytics module related issues P1 Medium priority Type: Enhancement Improvement of an existing feature labels Jun 14, 2024
@ivonac4 ivonac4 added the Team M Issues for Squad 2 label Jun 17, 2024
@techanvil techanvil added P2 Low priority and removed P1 Medium priority labels Jun 26, 2024
@benbowler benbowler assigned benbowler and unassigned benbowler Jun 26, 2024
@techanvil
Copy link
Collaborator Author

Moved to Backlog until we get all the P1 issues done and/or the initial release out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Analytics Google Analytics module related issues P2 Low priority Team M Issues for Squad 2 Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants