-
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 "temporarily hidden" badge to hidden audiences in the Selection Panel #9315
base: develop
Are you sure you want to change the base?
Conversation
Build files for 6663532 are ready:
|
Size Change: +47.4 kB (+2.62%) Total Size: 1.86 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ankitrox, this looks good and works well. I've added a couple of small details around the stories to commit if you agree.
tooltipTitle: | ||
'Still collecting full data for this timeframe, partial data is displayed for this group', | ||
}; | ||
Default.scenario = { | ||
label: 'Modules/Analytics4/Components/AudienceSegmentation/Dashboard/PartialDataBadge/Default', | ||
label: 'Modules/Analytics4/Components/BadgeWithTooltip/Default', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label: 'Modules/Analytics4/Components/BadgeWithTooltip/Default', | |
label: 'Components/BadgeWithTooltip/Default', |
}; | ||
|
||
export default { | ||
title: 'Modules/Analytics4/Components/AudienceSegmentation/Dashboard/PartialDataBadge', | ||
title: 'Modules/Analytics4/Components/BadgeWithTooltip', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: 'Modules/Analytics4/Components/BadgeWithTooltip', | |
title: 'Components/BadgeWithTooltip', |
Now that you've made this a nice reusable component, it doesn't need to be used just in Analytics so you can move it to the main components section of the stories.
} | ||
|
||
export const Default = Template.bind( {} ); | ||
Default.storyName = 'Default'; | ||
|
||
Default.args = { | ||
label: 'Title for badge with tooltip', | ||
tooltipTitle: | ||
'Still collecting full data for this timeframe, partial data is displayed for this group', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Still collecting full data for this timeframe, partial data is displayed for this group', | |
'This is an example of tooltip content for a badge with tooltip', |
This is a small detail.
@benbowler Thanks for review and adding the feedback. As Evan pointed out in a recent review, we don't actually need to specify the label for scenarios, as it is by default determined from the default title and the story's storyName, so I have skipped that point. Rest of the points addressed, tested and pushed the changes in PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ankitrox, LGTM ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work on this, thank you @ankitrox !
- I've left a few comments in the PR.
- According to the IB, we should add some test coverage for the appearance of the "Temporarily hidden" badge.
- Can we add one test case that verifies that the "Temporarily hidden" badge appears when conditions are met?
- Can we add one test case that verifies that the "New" badge does not appear when the "Temporarily hidden" badge is visible?
Please let me know if you have any questions, thank you!
className="googlesitekit-audience-segmentation-temporary-hidden-badge" | ||
label={ __( 'Temporarily hidden', 'google-site-kit' ) } | ||
tooltipTitle={ __( | ||
'Site Kit is collecting data for this group. once data is available the this group will be added to your dashboard.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this text does match the AC, it feels grammatically incorrect. I've raised it in the issue here. Let's see what Tom thinks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( temporarilyHidden ) { | ||
return ( | ||
<BadgeWithTooltip | ||
className="googlesitekit-audience-segmentation-temporary-hidden-badge" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this class name is defined in any stylesheet. If unnecessary, we should remove it.
className="googlesitekit-audience-segmentation-temporary-hidden-badge" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're at it, we should also update the file header comment for this component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the BadgeWithTooltip
component is located in assets/js/components
, this stylesheet should also be moved accordingly to assets/sass/components/global
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import should be moved according to the last comment to assets/sass/admin.scss
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This VRT reference appears to be a duplicate of the one located in tests/backstop/reference/google-site-kit_Components_BadgeWithTooltip_Default_0_document_0_small.png
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This VRT reference appears to be a duplicate of the one located in tests/backstop/reference/google-site-kit_Components_BadgeWithTooltip_Default_0_document_1_medium.png
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This VRT reference appears to be a duplicate of the one located in tests/backstop/reference/google-site-kit_Components_BadgeWithTooltip_Default_0_document_2_large.png
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, forgot to include this one in the original review above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One additional note about this stylesheet: Since this component now uses the googlesitekit-badge
class, I believe we may be able to remove some styles that are already applied by the googlesitekit-badge
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ankitrox . Thank you for updating the tooltip text. Maybe it didn't catch your attention but that wasn't the only feedback in my code review. Could you please take a look at my comments above and address them?
Moreover, I feel there is an additional update required to the tooltip text. I've asked Tom here.
I understand that we're under a time constraint here but I believe the changes requested are quite minimal. I'd have gone and applied them myself but since we're waiting for an AC change confirmation, I'm sending this back to Execution. CC: @techanvil @ivonac4
...nalytics-4/components/audience-segmentation/dashboard/AudienceSelectionPanel/AudienceItem.js
Outdated
Show resolved
Hide resolved
Thanks for spotting that the text still needed an update! I've applied that change myself but see there are other comments for @ankitrox still to address, so I've left this in execution. |
Summary
Addresses issue:
Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist