Automattic / Automattic/jetpack

Masterbar Module: Link to wp-admin when the site is ineligible for Gutenframe

Open
#17,097 2 comments 0 reactions 0 assignees View on GitHub
[Feature] Masterbar [Pri] Normal [Size] S Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

#### Background

We have recently deprecated the Calypso editor (classic editor running in Calypso) and if a site has the classic editor plugin installed, then we link out of Calypso to `wp-admin` for creating new or editing, posts and pages. Within the masterbar, the 'Write' button links to a Jetpack redirect URL of `calypso-edit-post`, `calypso-edit-posts`, etc.

In instances where the classic editor plugin is enabled, this will mean that someone is redirected to Calypso, which will redirect them to the `/block-editor` version of the URL. The code to load the iframe will discover that Gutenberg shouldn't be loaded and redirect them back to `wp-admin` on their own site. This seems like a convoluted route to get to the editor on their local site.

#### Question

Should we add some logic to redirect people straight to `wp-admin`? The simple answer would appear to be 'yes', but I'm not sure of the implications of that. Is there some advantage to sending the user on a round trip to WordPress.com as well as not having the routing logic in Jetpack? We could probably remove one hop, by updating the Jetpack redirects to point directly to the `/block-editor` versions of the URLs, but would we want to try and eliminate this altogether?

#### Answer

[Sounds like it will be safe](https://github.com/Automattic/jetpack/issues/17097#issuecomment-688804861) to change links, and prevent the redirect to `/block-editor`

Contributor guide

Open the contributing guide

Research direction

Start by tracing the masterbar “Write” button and its Jetpack redirect targets, including calypso-edit-post and calypso-edit-posts, for sites with the classic editor plugin enabled. Confirm the safe redirect behavior described in the issue comment, then ensure eligible links reach wp-admin directly without the unnecessary /block-editor round trip.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.