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

Stats: Release new date filtering to production #97060

Merged
merged 5 commits into from
Dec 8, 2024

Conversation

dognose24
Copy link
Contributor

Related to https://github.com/Automattic/red-team/issues/274

Proposed Changes

  • Enable the feature flag stats/new-date-filtering for all environments.

Why are these changes being made?

  • Release the date filtering project by flipping the feature flag.

Testing Instructions

  • Spin this change up with the Calypso Live branch.
  • Navigate to Stats > Traffic page for any site.
  • Ensure the Traffic page applies the new design and date filtering functionalities.
截圖 2024-12-04 晚上10 20 58

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@dognose24 dognose24 added the [Feature] Stats Everything related to our analytics product at /stats/ label Dec 4, 2024
@dognose24 dognose24 requested review from ederrengifo, grbicsanja and a team December 4, 2024 14:21
@dognose24 dognose24 self-assigned this Dec 4, 2024
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 4, 2024
@matticbot
Copy link
Contributor

matticbot commented Dec 4, 2024

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~43 bytes added 📈 [gzipped])

name   parsed_size           gzip_size
stats        +91 B  (+0.0%)      +26 B  (+0.0%)
home         +36 B  (+0.0%)      +17 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

matticbot commented Dec 4, 2024

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • odyssey-stats

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/stats_release_date_filtering on your sandbox.

@grbicsanja
Copy link

In the 'Yesterday' view, I'm unable to click on the Visitors/ Likes/ Comments tabs, see video:

Screen.Recording.2024-12-04.at.09.49.40.mov

@kangzj
Copy link
Contributor

kangzj commented Dec 4, 2024

In the 'Yesterday' view, I'm unable to click on the Visitors/ Likes/ Comments tabs, see video:

@grbicsanja good catch! this is expected atm, because we don't have single day data to show for the chart. We removed the hovering effect if that's the case, which @ederrengifo suggested.

@grbicsanja
Copy link

In the 'Yesterday' view, I'm unable to click on the Visitors/ Likes/ Comments tabs, see video:

@grbicsanja good catch! this is expected atm, because we don't have single day data to show for the chart. We removed the hovering effect if that's the case, which @ederrengifo suggested.

Thanks @kangzj! Can we instead use the empty state that we usually show for other use cases? Is there a specific reason this view wouldn't work here?
Screenshot 2024-12-04 at 13 44 14

@ederrengifo
Copy link
Contributor

ederrengifo commented Dec 4, 2024

I initially suggested to communicate that the chart is unable within the tooltip, but it seems an empty state could do a be better job since it's a pattern we already use when there is no data to show. We would need to adjust the message though @kangzj cc @grbicsanja

@grbicsanja
Copy link

grbicsanja commented Dec 4, 2024

Here's the adjusted message:

No hourly data available
Try selecting a different time frame.

This will be the second use case. Visitors, comments, and likes were recorded that day, but hourly data is unavailable.

The first use case is an actual empty state where no data was recorded.

cc: @kangzj @ederrengifo
.

Copy link
Contributor

@ederrengifo ederrengifo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a couple of issues:

  • When I first load a site, I see lines go beyond the container. It fixes after refreshing the page. Could be something local?
Screenshot 2024-12-06 at 16 14 18
  • I notice we are still showing the visitors filter when selecting Today but visitors are not available in the graph. Should we just hide it for that date range?
Screenshot 2024-12-06 at 16 15 51

@kangzj kangzj force-pushed the update/stats_release_date_filtering branch from 62150a7 to 2e4515b Compare December 8, 2024 22:00
Copy link
Contributor

@kangzj kangzj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do this 🕺

@kangzj
Copy link
Contributor

kangzj commented Dec 8, 2024

Thanks for the final design review @ederrengifo and the improvements pointed out 👍

I notice we are still showing the visitors filter when selecting Today but visitors are not available in the graph. Should we just hide it for that date range?

Addressed

When I first load a site, I see lines go beyond the container. It fixes after refreshing the page. Could be something local?

This is due to some interim changes detecting whether a site is internal or not, and will not happen on production.

@kangzj kangzj dismissed ederrengifo’s stale review December 8, 2024 22:13

Feedback addressed

@kangzj kangzj merged commit 6cf2241 into trunk Dec 8, 2024
11 checks passed
@kangzj kangzj deleted the update/stats_release_date_filtering branch December 8, 2024 22:23
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Stats Everything related to our analytics product at /stats/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants