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

Design Picker: Track the selection of the categories #97161

Merged
merged 8 commits into from
Dec 10, 2024

Conversation

arthur791004
Copy link
Contributor

@arthur791004 arthur791004 commented Dec 6, 2024

Related to pbxlJb-6Hz-p2

Proposed Changes

  • Use the query string parameter for the selected categories
  • Track the Free only toggle
  • Track the selection of categories
  • Add the common properies to the event of the big sky button

Filters

Select Deselect
image image
image image

Free Only Filter

Select Deselect
image image

Why are these changes being made?

  • We want to track the behavior of the category selection

Testing Instructions

  • Create a new site
  • On the Goals screen, select any goals
  • On the Design Picker screen
    • Select any features
    • Select any subjects
    • Toggle the free-only filter
    • Ensure the track event is sent with the correct properties

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

@arthur791004 arthur791004 self-assigned this Dec 6, 2024
@matticbot
Copy link
Contributor

matticbot commented Dec 6, 2024

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

App Entrypoints (~119 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
entry-stepper       +250 B  (+0.0%)     +119 B  (+0.0%)
entry-main          +210 B  (+0.0%)     +119 B  (+0.0%)
entry-login         +210 B  (+0.0%)     +119 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

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.

@arthur791004 arthur791004 force-pushed the feat/track-design-picker-filter branch from 0f9bdaa to a13f767 Compare December 6, 2024 10:33
@arthur791004 arthur791004 requested a review from a team as a code owner December 6, 2024 10:33
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 6, 2024
@arthur791004 arthur791004 changed the title WIP Design Picker: Track the selection of the categories Design Picker: Track the selection of the categories Dec 6, 2024
@arthur791004 arthur791004 requested a review from a team December 6, 2024 10:35
@taipeicoder
Copy link
Contributor

Seems that the is_filter_included_with_plan_enabled property is not tracking with the correct value:

Screen.Capture.on.2024-12-09.at.13-11-53.mp4

@arthur791004
Copy link
Contributor Author

Seems that the is_filter_included_with_plan_enabled property is not tracking with the correct value:

I was unsure what's the correct value. The property, is_filter_included_with_plan_enabled, is one of the common properties, so I thought it should be the value when the click happened rather than the value after the click. What do you think?

@arthur791004 arthur791004 force-pushed the feat/track-design-picker-filter branch 2 times, most recently from fc99992 to a135215 Compare December 9, 2024 05:55
@taipeicoder
Copy link
Contributor

taipeicoder commented Dec 9, 2024

Seems that the is_filter_included_with_plan_enabled property is not tracking with the correct value:

I was unsure what's the correct value. The property, is_filter_included_with_plan_enabled, is one of the common properties, so I thought it should be the value when the click happened rather than the value after the click. What do you think?

Hmm good point, but it might be a bit odd that if I wanted to track users that have enabled the toggle, I'd have to use is_filter_included_with_plan_enabled = false 😅

@arthur791004
Copy link
Contributor Author

You can use calypso_design_picker_select_filter with the filter_type: included_with_plan 😆

@taipeicoder
Copy link
Contributor

Could you confirm if the preselected_filters prop works as intended? I'm seeing empty on my end but I was expecting blog and newsletter 😕

Screen.Capture.on.2024-12-09.at.14-55-26.mp4

@arthur791004
Copy link
Contributor Author

Could you confirm if the preselected_filters prop works as intended? I'm seeing empty on my end but I was expecting blog and newsletter 😕

It works on my side. Could you help to check again? There may be some problems earlier 🤔

image

@arthur791004
Copy link
Contributor Author

Could you confirm if the preselected_filters prop works as intended? I'm seeing empty on my end but I was expecting blog and newsletter 😕

Confirmed. The issue happened only when categories were not loaded. Fixed it by a7a6b14

Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

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

Quick question, should we also rename the tracked values feature: and subject: to type: and topic: as per #97224? Or are those just client-side labeling?

(Just verifying if we won't get confused down the line.)

@fushar
Copy link
Contributor

fushar commented Dec 10, 2024

Quick question, should we also rename the tracked values feature: and subject: to type: and topic: as per #97224? Or are those just client-side labeling?

Nevermind, not sure if it's a good idea because the taxonomy itself is still called Theme Feature and Theme Subject in the "backend".

@taipeicoder
Copy link
Contributor

There are all theme subjects when it comes to taxonomy. The differentiation is only on the client-side 🙈
Makes sense to me to update them to type/topic instead of feature/subject

@fushar
Copy link
Contributor

fushar commented Dec 10, 2024

There are all theme subjects when it comes to taxonomy. The differentiation is only on the client-side 🙈

The more I know... 😄

@arthur791004
Copy link
Contributor Author

I'd prefer to keep it for now and see the final copy before the release 😆

@arthur791004 arthur791004 force-pushed the feat/track-design-picker-filter branch from a7a6b14 to 0c2bcb2 Compare December 10, 2024 02:38
@taipeicoder
Copy link
Contributor

Another thing I noticed is that if no goals are selected, the preselected filter is "Blog" but the event props preselected_filters is empty.

@arthur791004
Copy link
Contributor Author

Another thing I noticed is that if no goals are selected, the preselected filter is "Blog" but the event props preselected_filters is empty.

Let's fix it via https://github.com/Automattic/dotcom-forge/issues/10101. Does it make senses?

@taipeicoder
Copy link
Contributor

Sounds good 👍

@arthur791004 arthur791004 merged commit 5b246f6 into trunk Dec 10, 2024
11 checks passed
@arthur791004 arthur791004 deleted the feat/track-design-picker-filter branch December 10, 2024 10: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 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants