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

Preserve the box rocket_activation_notice with update #6120

Merged
merged 5 commits into from
Sep 19, 2023

Conversation

engahmeds3ed
Copy link
Contributor

@engahmeds3ed engahmeds3ed commented Aug 28, 2023

Description

Preserve the box rocket_activation_notice with update.

Fixes #5889

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).

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

No

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.

If not, detail what you could not test.

Please describe any additional tests you performed.

@engahmeds3ed engahmeds3ed self-assigned this Aug 28, 2023
@engahmeds3ed engahmeds3ed marked this pull request as ready for review August 28, 2023 09:35
@Mai-Saad Mai-Saad self-requested a review September 6, 2023 11:10
@Mai-Saad
Copy link
Contributor

Mai-Saad commented Sep 6, 2023

@engahmeds3ed Thanks for the PR. Please find exploratory test notes below:
1- If we dismiss the notice then deactivate WPR and activate WPR again. Notice will be displayed.
2- If we update from the previous version to the PR without dismissing notice before the update. it will be automatically dismissed.

@engahmeds3ed
Copy link
Contributor Author

@engahmeds3ed Thanks for the PR. Please find exploratory test notes below: 1- If we dismiss the notice then deactivate WPR and activate WPR again. Notice will be displayed. 2- If we update from the previous version to the PR without dismissing notice before the update. it will be automatically dismissed.

Good catch, based on the current code yes this is expected after checking this old code.
Let me try fixing that without affecting other boxes.

@engahmeds3ed
Copy link
Contributor Author

@Tabrisrp do u remember why do we clear all rocket boxes with update?

@remyperona
Copy link
Contributor

I do not, it's something that was there before my time. It probably made sense at some point, but not anymore.

@engahmeds3ed
Copy link
Contributor Author

Thanks @Tabrisrp

Summary: the used function we remove all dismissed notices for all users and only fire dismissing the following boxes with every update:

One or more plugins have been enabled or disabled, clear the cache if they affect the front end of your site.

and the second box is the activation notice.

Even if the user didn't dismiss both boxes, both will be dismissed based on the current code.

So based on the above discussion we have three solutions here:

  1. Replace this code with a direct query to delete all user boxes and keep only the dismissed boxes but this is bad from performance point of view.
  2. Don't remove all boxes with update at all and keep what's ignored kept ignored.
  3. Accept the PR as is with the issues that @Mai-Saad mentioned above as known issues.

I believe we need the @wp-media/productrocket decision here.

@piotrbak
Copy link
Contributor

@engahmeds3ed @Tabrisrp Do you see any reason why the boxes might be cleared? It doesn't seem to be making sense currently

@engahmeds3ed
Copy link
Contributor Author

@engahmeds3ed @Tabrisrp Do you see any reason why the boxes might be cleared? It doesn't seem to be making sense currently

Really I don't know.

@piotrbak
Copy link
Contributor

@engahmeds3ed Let's go with 2 then.

@Mai-Saad
Copy link
Contributor

Scenario 2 here #6120 (comment) is fixed, while 1 is still there

@engahmeds3ed
Copy link
Contributor Author

Thanks @Mai-Saad it should work now, can u plz also validate this old issue #5423 as it was touched here in this PR.

@Mai-Saad
Copy link
Contributor

Working as expected now both 1,2 are fine

@Mai-Saad Mai-Saad added this pull request to the merge queue Sep 19, 2023
Merged via the queue into develop with commit ffa71e1 Sep 19, 2023
8 checks passed
@Mai-Saad Mai-Saad deleted the fix/5889-activation-notice-with-update branch September 19, 2023 12:52
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.

The activation notice shows up after every update
4 participants