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

Nav Unification: Remove preferred-view param after update #21632

Merged
merged 2 commits into from
Nov 4, 2021

Conversation

mmtr
Copy link
Member

@mmtr mmtr commented Nov 3, 2021

Fixes Automattic/wp-calypso#54204.

Changes proposed in this Pull Request:

In order to change the preferred view of a screen, we rely on the preferred-view param that indicates what's the newly preferred view.

However, there are some WP Admin screens like upload.php which present issues if there are unexpected params in the URL.

To prevent these issues, this PR ensures that the preferred-view param is removed from the URL after the new preference has been updated.

Jetpack product discussion

N/A.

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

  • Prepare the testing environment:
    • Simple sites: Apply D69520-code to your WP.com sandbox, and sandbox both the API and a Simple site.
    • Atomic sites: Install Jetpack Beta and switch to the remove/nav-unification-preferred-view-param branch.
  • Go to https://wordpress.com and switch to your test site.
  • Go to "Media > Add new".
  • Open the "Screen Options" tab and switch to the classic view.
  • Make sure the preferred-view param is removed from the URL.
  • Make sure you can successfully upload a new media item, and the loading bar shows up during the upload.

@mmtr mmtr added [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Status] Needs Team Review labels Nov 3, 2021
@mmtr mmtr self-assigned this Nov 3, 2021
@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Nov 3, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2021

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: December 7, 2021.
  • Scheduled code freeze: November 30, 2021.

@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello mmtr! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D69520-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@mmtr mmtr requested a review from a team November 3, 2021 13:31
BogdanUngureanu
BogdanUngureanu previously approved these changes Nov 3, 2021
Copy link
Contributor

@BogdanUngureanu BogdanUngureanu left a comment

Choose a reason for hiding this comment

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

Works as expected, nice job! 🚢 🚢

@mmtr mmtr added this to the jetpack/10.4 milestone Nov 3, 2021
Base automatically changed from fix/nav-unification-set-default-view to master November 3, 2021 15:38
@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Nov 3, 2021
@mmtr mmtr merged commit 39fb67b into master Nov 4, 2021
@mmtr mmtr deleted the remove/nav-unification-preferred-view-param branch November 4, 2021 09:39
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Nov 4, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2021

Great news! One last step: head over to your WordPress.com diff, D69520-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@mmtr
Copy link
Member Author

mmtr commented Nov 4, 2021

Deployed to WP.com in r234503-wpcom.

davidlonjon added a commit that referenced this pull request Nov 5, 2021
# By Brad Jorsch (2) and others
# Via GitHub
* master:
  Boost: Fix the official name to the JavaScript word reference (#21638)
  tools: Allow extra spaces in next-version tags (#21647)
  Publicize: always add an alt text to Open Graph Images (#21520)
  js-tools: Add missing eslint plugin dep (#21642)
  * Deactivate SSO in e2e environment (#21644)
  Publicize: Handling feature availability information and upgrading (#21567)
  Nav Unification: Remove `preferred-view` param after update (#21632)
  [Plugin] Backup: Update/upgrade button link (#21590)

# Conflicts:
#	projects/plugins/boost/app/assets/src/js/pages/settings/sections/Modules.svelte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Touches WP.com Files Unit Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uploading files on the Media Library on Safari is not showing the loading bar
4 participants