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

Clean up the workaround for only rendering the AudienceErrorModal once within the AudienceTilesWidget #9543

Open
1 task
techanvil opened this issue Oct 21, 2024 · 0 comments
Labels
Module: Analytics Google Analytics module related issues P2 Low priority Type: Enhancement Improvement of an existing feature

Comments

@techanvil
Copy link
Collaborator

techanvil commented Oct 21, 2024

Feature Description

Issue #9495 introduced a temporary workaround to ensure AudienceErrorModal is only rendered once within AudienceTilesWidget.

This is a bit hackish and should be refactored so we only render the AudienceErrorModal at the level of the AudienceTiles component rather than conditionally within AudienceTilePagesMetric.

{ /*
TODO: The `audienceTileNumber` check is part of a temporary workaround to ensure `AudienceErrorModal` is only rendered once
within `AudienceTilesWidget`. This should be removed, and the `AudienceErrorModal` render extracted
from here to be rendered once at a higher level instead. See https://github.com/google/site-kit-wp/issues/9543.
*/ }
{ audienceTileNumber === 0 &&
( ( customDimensionError && ! isSaving ) ||
( isRetryingCustomDimensionCreate &&
! isAutoCreatingCustomDimensionsForAudience ) ||
hasOAuthError ) && (
<AudienceErrorModal


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

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

@techanvil techanvil added P2 Low priority Module: Analytics Google Analytics module related issues Type: Enhancement Improvement of an existing feature labels Oct 21, 2024
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 Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant