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

Prevent jumps in All Traffic widget for loading states and when switching tabs #2710

Closed
felixarntz opened this issue Jan 28, 2021 · 4 comments
Labels
Module: Analytics Google Analytics module related issues P0 High priority Type: Bug Something isn't working
Milestone

Comments

@felixarntz
Copy link
Member

felixarntz commented Jan 28, 2021

When the new All Traffic widget is in any loading state, you'll see brief jumps where the widget briefly is taller than usually. Similar inconsistencies can be noticed when switching tabs when new data needs to be loaded.

It seems that this is partly caused by the charts library, where on the initial render of any chart it uses a taller height for a split-second sometimes. If the problem here is the charts library and we cannot change that behavior, we should try to wrap it with some container that accounts for that jump, to ensure that at least not the overall widget height jumps.


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

Acceptance criteria

  • The new All Traffic widget should always show up with a consistent height. Entering or leaving a loading state in any part should not trigger the height of the overall widget to change (causing content jumps).

Implementation Brief

  • Adjust styles of the preview element in the user dimensions pie chart component to make sure it takes the same height as the loaded component.

Test Coverage

  • N/A

Visual Regression Changes

  • The All Traffic widget should have the same height no matter in which state it is (loading or rendering data).

QA Brief

  • Set up the plugin on your local;
  • Activate and connect the Analytics module;
  • Go to the dashboard page;
  • Check the All Traffic widget, it should remain in the same size when you switch tabs or select pie slices.

Changelog entry

  • Avoid content shifts in All Traffic widget due to incorrect loading UI layout.
@felixarntz felixarntz added Type: Bug Something isn't working P0 High priority Next Up Module: Analytics Google Analytics module related issues labels Jan 28, 2021
@felixarntz felixarntz assigned felixarntz and unassigned felixarntz Jan 28, 2021
@fhollis fhollis added this to the Sprint 42 milestone Jan 29, 2021
@fhollis fhollis removed the Next Up label Feb 1, 2021
@felixarntz felixarntz self-assigned this Feb 2, 2021
@felixarntz
Copy link
Member Author

felixarntz commented Feb 2, 2021

@eugene-manuilov I've by now already updated the PreviewBlocks to match their heights in 32e2be5. The only weird jump that remains on my end is that the PreviewBlock instance for the pie chart specifically jumps at some point during the loading phase, just maybe about a second before it is loaded. See here:

All-Traffic-bug.mov

So the problem here is not even between loading and non-loading state, but within loading state a jump happens. Let me know if you can replicate that, or if you see anything else that doesn't look smooth on your end.

Maybe the loading circle jump is the only thing we'll need to fix here.

@eugene-manuilov
Copy link
Collaborator

@felixarntz yeah, seems like the last bit is to adjust the size of the preview block for the user dimensions pie chart. IB is updated.

@felixarntz
Copy link
Member Author

IB ✅

@felixarntz felixarntz removed their assignment Feb 3, 2021
@asvinb asvinb self-assigned this Feb 4, 2021
@asvinb asvinb removed their assignment Feb 4, 2021
@wpdarren wpdarren self-assigned this Feb 4, 2021
@wpdarren
Copy link
Collaborator

wpdarren commented Feb 4, 2021

QA Update: Pass ✅

  • Checked the All Traffic widget, it remained in the same size when switching tabs or selecting pie slices.
all-traffic.mov

@wpdarren wpdarren removed their assignment Feb 4, 2021
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 P0 High priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants