-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: Remote editor exceptions #109
Draft
dcalhoun
wants to merge
21
commits into
trunk
Choose a base branch
from
fix/remote-editor-failures
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+491
−192
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 tasks
Base automatically changed from
refactor/avoid-private-use-block-editor-settings
to
trunk
March 26, 2025 13:04
The URL checking was added to ensure tapping links within the editor opened in the OS browser, rather than the WebView. However, basing this upon the URL is problematic, as JavaScript can also trigger navigation events. Instead, we now open the URL in the browser if it is user-initiated--i.e., a user tapped a link.
Filtering by path is brittle and complex. It began failing recently, presumably due to an inaccurate RegEx pattern or server path change.
Some APIs offer multiple namespace patterns--e.g, site domain or site ID--so we must receive both to accurately detect the presence of either in an API request.
Allow the host app to configure the URL used for fetching editor assets.
Some APIs server both global and site-specific paths.
The editor WebView should not navigate for user-initiated navigation (link taps) or script navigation (window.location), as it will lead to odd experiences rendering full web pages in the editor view.
Some WordPress plugins rely upon environment globals. Allowing the host to set these enables support for these plugins.
Allow a development environment where both the bundled (local) and site-specific (remote) editor is available, so that the host app may load either editor based on flags or configuration.
This is necessary to detect the namespace when the host can use more than one format. E.g., `site/<id>` or `site/<domain>`.
Some endpoints are global, not site specific.
Make editor configuration more readable. Mirror the iOS implementation.
Some editor scripts rely upon global properties for configuration.
Replace the "pull" approach with "push", as this new approach seems to work consistently. This "pull" was originally implemented in: 9d1600a
Inlined CSS was incorrectly externalized, causing breakages.
74bc5ee
to
f263817
Compare
This was referenced Mar 27, 2025
Avoid intermittent errors: ``` Explain: FATAL EXCEPTION: main Process: com.jetpack.android. prealpha, PID: 13279 java.lang.IllegalArgumentException: Parcel: unknown type for value WebViewGlobal(name=_ currentSiteType, value=StringValue(value= simple) ) at android.os.Parcel.getValueType( Parcel. java: 2421) at android.os.Parcel.writeValue( Parcel. java: 2320) with tag AndroidRuntime ```
Ensure the WebView manages all editor-centric requests, and sends everything else to the OS browser.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related:
What?
Fix breakages and expand the robustness of the remote, site-specific editor implementation.
Why?
Prepare the prototype to be an experimental feature available for some users.
How?
Testing Instructions
See the iOS and Android PRs:
Accessibility Testing Instructions
N/A, no user-facing changes.
Screenshots or screencast
N/A