gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Use allow-list for mobile editor settings endpoint

Open mkevins opened this issue 2 years ago • 4 comments

Description

This PR introduces an "allow-list" for the mobile endpoint for block editor settings. This gives us a greater degree of control over what the client apps are consuming, and helps avoid prematurely introducing changes which do not yet have support in the mobile apps.

What?

Why?

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

mkevins avatar Nov 22 '23 09:11 mkevins

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! :heart:

View changed files
:grey_question: lib/experimental/block-editor-settings-mobile-allowed.php
:grey_question: lib/load.php

github-actions[bot] avatar Nov 22 '23 09:11 github-actions[bot]

Flaky tests detected in 9c19187a4394697fa3e676b44462a10101063e66. Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6966908351 📝 Reported issues:

  • #48887 in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js
  • #48566 in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js
  • #48568 in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js
  • #46868 in specs/editor/plugins/block-directory-add.test.js
  • #43174 in /test/e2e/specs/editor/plugins/wp-editor-meta-box.spec.js
  • #46869 in specs/editor/plugins/block-directory-add.test.js
  • #48774 in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js
  • #50034 in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js
  • #36939 in /test/e2e/specs/editor/plugins/custom-post-types.spec.js
  • #48572 in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js
  • #47916 in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js
  • #48687 in specs/editor/various/allowed-patterns.test.js
  • #46870 in specs/editor/various/allowed-patterns.test.js
  • #47896 in /test/e2e/specs/site-editor/template-revert.spec.js

github-actions[bot] avatar Nov 22 '23 10:11 github-actions[bot]

Thank you @dcalhoun for your review (and for your helpful commits)! I've pushed a few more commits to address your feedback, so this is ready for another pass.

Note: I have not yet marked this as "ready for review" because I haven't had time to add some unit tests. But, if you have further feedback about the approach, it is welcome 🙂 .

mkevins avatar Nov 23 '23 07:11 mkevins

Thank you @dcalhoun for your review (and for your helpful commits)! I've pushed a few more commits to address your feedback, so this is ready for another pass.

Note: I have not yet marked this as "ready for review" because I haven't had time to add some unit tests. But, if you have further feedback about the approach, it is welcome 🙂 .

@mkevins the implementation looks sound to me. I do not have further feedback at this time.

I pushed a commit addressing the PHP unit test failures by running npm run format:php. The E2E test failures appear unrelated, we should likely rebase this branch atop the latest trunk to see if it resolves the failures.

From what I gathered, a version of these changes were deployed internally. So, for better or worse, I suppose further stability testing of these changes is happening live. If that appears to go well, then it increases confidence that these proposed changes include all the necessary attributes for the allow list.

dcalhoun avatar Nov 27 '23 15:11 dcalhoun