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
Use pie slice color for UserCountGraph
chart line when one of the pie slices is selected
#2625
Comments
IB ✅ |
QA Update: Fail ❌
|
@wpdarren @johnPhillips if I remember correctly, the @johnPhillips could you please create a follow-up PR that reset the dimension color to an empty string when the |
@eugene-manuilov @wpdarren I think I have managed to address this in #2666 |
@wpdarren @eugene-manuilov The Others slice shouldn't affect the graph. It should still be "normally" selectable so that it is highlighted and shows the tooltip until unselected, but it should never alter the line chart. |
QA Update: Pass ✅Verified: On the dashboard page the user count graph uses the color of the selected pie slice in the user dimensions chart or the blue color when nothing or the others is selected. Screenshots: Other screenshot - Slice color change @felixarntz is there a reason why the 'others' slice in the chart should not be altered? From a user perspective, if I click the slice I am going to assume that the chart should be updated like the rest of the slices. Just wondering if this might create a few support tickets. I am happy to pass this based on the QAB but just wanted to understand why this decision was made. |
The
UserCountGraph
(see #2422) contextually may show data for a specific pie slice selected in theUserDimensionsPieChart
(see #2425). One requirement there that was missed from the original Figma design (and, unrelated to that, also suggested by @tofumatt) is that the color of the graph line in that case should match the color of the selected pie slice.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
onSelect
listener in theUserDimensionsPieChart
component to set thedimensionColor
value along with thedimensionValue
based on the selected pie slice. If a slice is unselected or the Others slice is selected reset the dimension color by passing an empty string.handleTabUpdate
callback in theDimensionTabs
component to reset thedimensionColor
value by assigning an empty string to it.UserCountGraph
component to select the currentdimensionColor
value from the forms datastore and use it as the current color for the graph or fallback to the hardcoded one if thedimensionColor
is empty. (Colours are set here:site-kit-wp/assets/js/modules/analytics/components/dashboard/DashboardAllTrafficWidgetV2/UserCountGraph.js
Line 133 in 7ee258d
Test Coverage
Visual Regression Changes
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: