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

WordAds Stats: fix broken links in Odyssey #72360

Merged
merged 3 commits into from
Jan 26, 2023
Merged

WordAds Stats: fix broken links in Odyssey #72360

merged 3 commits into from
Jan 26, 2023

Conversation

kangzj
Copy link
Contributor

@kangzj kangzj commented Jan 20, 2023

Proposed Changes

Restores clicking behaviours on the Ads page:

  • Restore information icon clicking
  • Bars clicking
  • Tabs clicking

We should avoid use window.location object directly for Stats, as in Odyssey the paths are actually hashes. We should use context.path, context.query and context.pathname instead, which are injected by page.js.

Testing Instructions

  • Verify Odyssey with Option 1 in PejTkB-3E-p2
  • Enable WordAds - /wp-admin/admin.php?page=jetpack#/traffic?term=wordads
  • Open /wp-admin/admin.php?page=stats&flags=stats%2Fads-page
  • Ensure Ads page generally works
  • Ensure the click actions for bars, tabs and information icon works
  • Open live branch link
  • Enusre Ads page work for WPCOM

image

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 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-ajp-p2)?

@kangzj kangzj added [Feature] Stats Everything related to our analytics product at /stats/ [Status] In Progress Odyssey Stats Calypso Stats in Jetpack labels Jan 20, 2023
@kangzj kangzj requested a review from a team January 20, 2023 01:38
@kangzj kangzj self-assigned this Jan 20, 2023
@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 Jan 20, 2023
@github-actions
Copy link

github-actions bot commented Jan 20, 2023

@matticbot
Copy link
Contributor

matticbot commented Jan 20, 2023

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

Sections (~32 bytes removed 📉 [gzipped])

name   parsed_size           gzip_size
stats        -34 B  (-0.0%)      -32 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.

@kangzj kangzj marked this pull request as ready for review January 24, 2023 04:08
@kangzj kangzj force-pushed the fix/ads-page-clicks branch from adf1365 to 38b8aa9 Compare January 24, 2023 20:53
@wilmersondasilva
Copy link
Contributor

I tried to test this one, but unfortunately, I couldn't make the Ads page works properly. The code looks fine though!

Copy link
Contributor

@wilmersondasilva wilmersondasilva left a comment

Choose a reason for hiding this comment

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

I was able to make it work now.

I tested both on Odyssey and on WPCOM and it's working as expected. 👍

Copy link
Contributor

@jsnmoon jsnmoon left a comment

Choose a reason for hiding this comment

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

Clicking on the info icon in the Totals table redirects me to the traffic page, which isn't a desired behavior.

2023-01-25 13-48-30 2023-01-25 13_49_11

Also, the new highlight section of the ads page was missing (though that's unrelated to this PR).

@kangzj
Copy link
Contributor Author

kangzj commented Jan 25, 2023

Hey @jsnmoon Thanks for the review 👍

it works okay for me. Could you please pull the new changes, try to rebuild Odyssey and try again - the totals section should be replaced by the highlights after the merge.

image

Thanks

Copy link
Contributor

@jsnmoon jsnmoon left a comment

Choose a reason for hiding this comment

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

I rebuilt the assets using the latest checkout, and everything appears to work as expected 👍

@kangzj kangzj merged commit 3a741c9 into trunk Jan 26, 2023
@kangzj kangzj deleted the fix/ads-page-clicks branch January 26, 2023 00:14
@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 Jan 26, 2023
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/ Odyssey Stats Calypso Stats in Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants