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

Add RRM module settings. #8965

Merged
merged 22 commits into from
Jul 10, 2024
Merged

Conversation

ankitrox
Copy link
Collaborator

@ankitrox ankitrox commented Jul 4, 2024

Summary

Addresses issue:

Relevant technical choices

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

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

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

Base automatically changed from enhancement/8791-get-publications-endpoint to develop July 5, 2024 22:04
@ankitrox ankitrox marked this pull request as ready for review July 8, 2024 14:28
Copy link

github-actions bot commented Jul 8, 2024

Build files for 063a2e9 have been deleted.

Copy link

github-actions bot commented Jul 8, 2024

Size Change: +116 B (+0.01%)

Total Size: 1.57 MB

Filename Size Change
./dist/assets/js/googlesitekit-activation-********************.js 23.8 kB -1 B (0%)
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 59.4 kB -4 B (-0.01%)
./dist/assets/js/googlesitekit-api-********************.js 10.1 kB -2 B (-0.02%)
./dist/assets/js/googlesitekit-data-********************.js 2.36 kB +1 B (+0.04%)
./dist/assets/js/googlesitekit-datastore-location-********************.js 2.08 kB +1 B (+0.05%)
./dist/assets/js/googlesitekit-datastore-user-********************.js 25.1 kB -3 B (-0.01%)
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 75.7 kB +5 B (+0.01%)
./dist/assets/js/googlesitekit-main-dashboard-********************.js 125 kB -1 B (0%)
./dist/assets/js/googlesitekit-modules-ads-********************.js 29.5 kB -3 B (-0.01%)
./dist/assets/js/googlesitekit-modules-adsense-********************.js 113 kB -20 B (-0.02%)
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 145 kB -22 B (-0.02%)
./dist/assets/js/googlesitekit-modules-********************.js 22.1 kB -5 B (-0.02%)
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 22.7 kB +1 B (0%)
./dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 11.4 kB +163 B (+1.46%)
./dist/assets/js/googlesitekit-modules-search-console-********************.js 58.2 kB -2 B (0%)
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 31.9 kB +2 B (+0.01%)
./dist/assets/js/googlesitekit-settings-********************.js 61.6 kB +2 B (0%)
./dist/assets/js/googlesitekit-splash-********************.js 72.7 kB -7 B (-0.01%)
./dist/assets/js/googlesitekit-user-input-********************.js 48.1 kB -3 B (-0.01%)
./dist/assets/js/googlesitekit-vendor-********************.js 320 kB +7 B (0%)
./dist/assets/js/googlesitekit-widgets-********************.js 62.9 kB -1 B (0%)
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 61.6 kB +8 B (+0.01%)
ℹ️ View Unchanged
Filename Size
./dist/assets/css/googlesitekit-admin-css-********************.min.css 55.1 kB
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11.2 kB
./dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 770 B
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 7.47 kB
./dist/assets/js/30-********************.js 2.76 kB
./dist/assets/js/31-********************.js 2.25 kB
./dist/assets/js/32-********************.js 3.64 kB
./dist/assets/js/33-********************.js 935 B
./dist/assets/js/34-********************.js 892 B
./dist/assets/js/35-********************.js 3.12 kB
./dist/assets/js/analytics-advanced-tracking-********************.js 776 B
./dist/assets/js/googlesitekit-adminbar-********************.js 34.7 kB
./dist/assets/js/googlesitekit-components-gm2-********************.js 5.87 kB
./dist/assets/js/googlesitekit-components-gm3-********************.js 10.1 kB
./dist/assets/js/googlesitekit-consent-mode-********************.js 836 B
./dist/assets/js/googlesitekit-datastore-forms-********************.js 9.07 kB
./dist/assets/js/googlesitekit-datastore-site-********************.js 19.8 kB
./dist/assets/js/googlesitekit-datastore-ui-********************.js 10 kB
./dist/assets/js/googlesitekit-events-provider-contact-form-7-********************.js 644 B
./dist/assets/js/googlesitekit-events-provider-easy-digital-downloads-********************.js 623 B
./dist/assets/js/googlesitekit-events-provider-mailchimp-********************.js 629 B
./dist/assets/js/googlesitekit-events-provider-ninja-forms-********************.js 731 B
./dist/assets/js/googlesitekit-events-provider-optin-monster-********************.js 674 B
./dist/assets/js/googlesitekit-events-provider-popup-maker-********************.js 634 B
./dist/assets/js/googlesitekit-events-provider-woocommerce-********************.js 657 B
./dist/assets/js/googlesitekit-events-provider-wpforms-********************.js 632 B
./dist/assets/js/googlesitekit-i18n-********************.js 3.92 kB
./dist/assets/js/googlesitekit-polyfills-********************.js 377 B
./dist/assets/js/runtime-********************.js 1.3 kB

compressed-size-action

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

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

Hi @ankitrox, nice work so far. I've left a handful of comments, generally pretty minor ones. Please take a look.

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

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

LGTM, nice one @ankitrox

@techanvil techanvil merged commit 97816cc into develop Jul 10, 2024
24 of 26 checks passed
@techanvil techanvil deleted the enhancement/8793-rrm-module-settings branch July 10, 2024 10:49
*/
public function on_deactivation() {
$this->get_settings()->delete();
$this->reset_data_available();
Copy link
Collaborator

Choose a reason for hiding this comment

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

The Reader Revenue Manager module, as it currently stands, does not have any data to work with, hence, it should neither use the Module_With_Data_Available_State_Trait trait, nor call the reset_data_available function.

Is there a specific reason this was added? If not, I'm happy to remove this as part of one of my upcoming PRs.

Copy link
Collaborator

@techanvil techanvil Jul 17, 2024

Choose a reason for hiding this comment

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

Good spot @nfmohit 🦅 👁️! I missed this in CR. I believe this should indeed be removed, if you can do it via one of your forthcoming PRs that would be great.

protected function get_sanitize_callback() {
return function ( $option ) {
if ( isset( $option['publicationID'] ) ) {
if ( ! preg_match( '/^[a-zA-Z0-9]+$/', $option['publicationID'] ) ) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ankitrox This is inconsistent with the related check we have in JS and does not allow for a valid ID that I am trying to test with. See #8948 (comment)
@techanvil

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for spotting this @aaemnnosttv, sorry I missed it during CR. As mentioned on Slack, I've got a followup PR ready if we want to reopen this issue, otherwise I'll create a separate issue for the fix.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Update: The above PR has now been merged.

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