question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UX/UI issue on All Traffic pie chart tabs when in gathering state

See original GitHub issue

Bug Description

On a site that is in gathering state. I noticed a UX/UI issue on the All traffic widget on main and entity dashboard. At the top of the pie chart, tabs appear active and when the user clicks on them, nothing happens. It would be better if we can make these tabs look disabled in this state.

https://user-images.githubusercontent.com/73545194/159525757-0a793a50-54e6-48da-9290-05b6ec29cea1.mp4


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

Acceptance criteria

  • When in “gathering data” state, the tabs in the “All Traffic” widget should appear disabled.
  • The cursor should also change to the disabled cursor when hovering over them.

Implementation Brief

  • Using assets/js/modules/analytics/components/dashboard/DashboardAllTrafficWidget/DimensionTabs.js,
    • Check if there is zero data by querying the analytics data store via the hasZeroData selector.
    • Update the Tab and Select components to be disabled by adding whether hasZeroData is true or gatheringData [existing] is true.
  • Using assets/sass/widgets/_googlesitekit-widget-analyticsAllTraffic.scss,
    • Add the following styles for:
      • .mdc-tab[disabled]:
        • cursor: default;
      • .mdc-tab[disabled] .mdc-tab__ripple:
        • display: none;
      • .mdc-tab[disabled] .mdc-tab__text-label:
        • opacity: 0.6;
        • color: $c-jumbo;
      • .mdc-tab--active[disabled] .mdc-tab-indicator__content--underline
        • background-color: $c-jumbo;
        • opacity: 0.6;

Test Coverage

  • No new tests to be added.

QA Brief

  • Visit the Site Kit dashboard with Analytics connected in a gathering data state.
  • Try to interact with the tabs here: CleanShot 2022-03-29 at 21 55 05
  • They should not be accessible by either keyboard navigation nor mouse input; they should not respond to focus/hover states and essentially be totally disabled.

Also try the above steps, with the zeroDataStates enabled and a site with “zero data” for Analytics. The same outcome should be observed, eg. tabs that are entirely disabled.

Also test both states on mobile and ensure the dropdown is disabled, eg:

CleanShot 2022-03-29 at 23 54 34

The story at https://google.github.io/site-kit-wp/storybook/develop/?path=/story/analytics-module-components-dashboard-all-traffic-widget--zero-data-zerodatastates-enabled should also have disabled tabs instead of tabs that can be interacted with, as this issue also disables the tabs when in a zero data state.

Changelog entry

  • Disable All Traffic pie chart tabs when in gathering or zero data state.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
asvinbcommented, Mar 29, 2022

@tofumatt I checked and when the tabs are disabled, they are not tabb-able. I’ve updated the IB, can you review?

1reaction
tofumattcommented, Mar 28, 2022

I think disabling them here is the best compromise, but we do need to make sure they’re also not interact-able at all, including for keyboard users. So I think the IB is missing removing them from the tab order because they should have no interaction when activated. This probably means ensuring clicking on them doesn’t trigger the tab order changing—is this already the case?

The tabs currently move when there is zero data:

CleanShot 2022-03-28 at 15 59 15

But we should ensure (with a tabIndex="-1" and onClick={undefined} that nothing happens when users click/activate these, even when they appear disabled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mobile UX/UI issues on Graphs when in Gathering state #4944
The y-axis labels for any graph should be consistent regardless of whether the associated service is in "zero data" or "gathering data" state....
Read more >
It's time we learn to design a proper pie chart | by Andre Ye
What makes the pie chart a useful and standard chart is that it has some aspect of continuity — the perimeter is a...
Read more >
Top 23 Dashboard Design Principles, Best Practices & How To's
These 23 definitive dashboard design best practices will bestow you with all of the knowledge you need to create striking, results-driven data ...
Read more >
Heat Map Question - Qualtrics
The heat map question type is used to gather feedback on images. The respondent is presented with an image and invited to click...
Read more >
Data Driven Web Design: How to Build Better-Performing B2B ...
“A well-designed user interface could raise your website's conversion rate by up to a 200%, and a better UX design could yield conversion...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found