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

Closes #6152: Add license type to what is reported to Mixpanel #6189

Merged
merged 3 commits into from
Oct 6, 2023

Conversation

Miraeld
Copy link
Contributor

@Miraeld Miraeld commented Sep 26, 2023

Description

This will help see how representative is the current sample from opted-in users vs our current users and how reliable data collected from them to help with product decisions.

A new function has been created that returns the type of license. As this functionality is used in different files, it has been modified to use the newly created function.

Fixes #6152

Type of change

  • Enhancement (non-breaking change which improves an existing functionality).

Is the solution different from the one proposed during the grooming?

Yes

Checklists

Generic development checklist

  • My code follows the style guidelines of this project, with adapted comments and without new warnings.
  • I have added unit and integration tests that prove my fix is effective or that my feature works.
  • The CI passes locally with my changes (including unit tests, integration tests, linter).
  • Any dependent changes have been merged and published in downstream modules.
  • If applicable, I have made corresponding changes to the documentation. Provide a link to the documentation.

Test summary

  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I validated all Acceptance Criteria of the related issues. (If applicable, provide proof).
  • I validated all test plan the QA Review asked me to.

@Miraeld Miraeld added type: enhancement Improvements that slightly enhance existing functionality and are fast to implement priority: medium Issues which are important, but no one will go out of business. effort: [XS] < 1 day of estimated development time labels Sep 26, 2023
@Miraeld Miraeld requested a review from a team September 26, 2023 13:02
@Miraeld Miraeld self-assigned this Sep 26, 2023
Copy link
Contributor

@engahmeds3ed engahmeds3ed left a comment

Choose a reason for hiding this comment

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

Good job @Miraeld in ur first PR.

I didn't fully review it yet but I noticed this important point.

Also plz run the command

composer phpcs:fix

to automatically fix most of those reported coding standard issues.

inc/functions/admin.php Outdated Show resolved Hide resolved
@Miraeld Miraeld force-pushed the enhancement/6152-add_license_type_mixpanel branch from 8f1b652 to 20067c0 Compare September 26, 2023 13:19
Copy link
Contributor

@remyperona remyperona left a comment

Choose a reason for hiding this comment

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

The code needs to be updated to follow our coding standards (errors are available in the CS GH action)

@Miraeld Miraeld force-pushed the enhancement/6152-add_license_type_mixpanel branch 2 times, most recently from 143ae1e to ab8ea04 Compare September 26, 2023 13:51
Copy link
Contributor

@engahmeds3ed engahmeds3ed left a comment

Choose a reason for hiding this comment

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

Minor adjustments

inc/functions/admin.php Outdated Show resolved Hide resolved
inc/functions/admin.php Outdated Show resolved Hide resolved
inc/functions/admin.php Outdated Show resolved Hide resolved
@Miraeld Miraeld force-pushed the enhancement/6152-add_license_type_mixpanel branch from ab8ea04 to 9917482 Compare September 27, 2023 07:54
@vmanthos vmanthos self-requested a review October 3, 2023 06:44
@vmanthos vmanthos added this to the 3.15.2 milestone Oct 3, 2023
@vmanthos
Copy link
Contributor

vmanthos commented Oct 3, 2023

@Miraeld Thank you for the PR!
I see the license_type is added to the data sent to Mixpanel. 👍

@wp-media/productrocket The new info that will be collected is not listed here:
image

Also, the CTA (Activate Rocket Analytics) is displayed even when Rocket Analytics is enabled.

Please confirm (or not) that:

  1. The license type info should be included in the data collection table.
  2. The CTA should not be displayed if Rocket Analytics is already enabled.

@DahmaniAdame
Copy link
Contributor

DahmaniAdame commented Oct 4, 2023

The license type info should be included in the data collection table.

Yes, it should show.

The CTA should not be displayed if Rocket Analytics is already enabled.

No, there is no need to redisplay it if the consent is already given.

@Miraeld Miraeld force-pushed the enhancement/6152-add_license_type_mixpanel branch 2 times, most recently from 7c4f3d3 to bdaf22b Compare October 5, 2023 08:46
Adds the license type to data sent to Mixpanel.
@Miraeld Miraeld force-pushed the enhancement/6152-add_license_type_mixpanel branch 2 times, most recently from ccec829 to 041cc58 Compare October 5, 2023 10:30
@Miraeld Miraeld requested a review from a team October 5, 2023 10:45
@vmanthos
Copy link
Contributor

vmanthos commented Oct 6, 2023

@Miraeld Thank you for the fixes.

The CTA button is not displayed but with that, the following text is hidden as well:
image

Since that's a disclaimer notice it should stay in place.

Also, and this is a late notice on my part, there is inconsistency in how various info is displayed as far as the used fonts go:
image

This has to do with some of it being wrapped in <code></code> and that results in the use of a monospace font.

Unless there is a specific reason to have some part in <code>, maybe we can go with a uniform look there.

@DahmaniAdame What's your take on this?

@DahmaniAdame
Copy link
Contributor

@vmanthos yes, uniformizing it is the way to go.
code looks nicer, but not consistent and practical (doesn't look good when lines are wrapped).
Uniformizing it without the code would make sense.

@Miraeld Miraeld force-pushed the enhancement/6152-add_license_type_mixpanel branch from f9f59de to d03608a Compare October 6, 2023 09:09
@Miraeld
Copy link
Contributor Author

Miraeld commented Oct 6, 2023

@vmanthos I've corrected the cta, now only the button is not displayed once rocket analytics is enabled.

@vmanthos @DahmaniAdame I've taken off the <code></code> tags to standardize the formatting.

Copy link
Contributor

@vmanthos vmanthos left a comment

Choose a reason for hiding this comment

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

Thank you for the fixes, @Miraeld !

This is working as expected. 👍

@vmanthos vmanthos added this pull request to the merge queue Oct 6, 2023
Merged via the queue into develop with commit c2172ca Oct 6, 2023
8 checks passed
@vmanthos vmanthos deleted the enhancement/6152-add_license_type_mixpanel branch October 6, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: [XS] < 1 day of estimated development time priority: medium Issues which are important, but no one will go out of business. type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add license type to what is reported to Mixpanel
6 participants