Automattic / Automattic/wp-calypso

Nav Sidebar 'add new page' + Start Page Templates - SPT back button to lead back to previous editor screen.

Open
#48,652 4 comments 0 reactions 0 assignees View on GitHub
[Status] Stale Editing Toolkit Enhancement Page Layouts
Dominant language
TypeScript
Stars
12.6k
Forks
2k
Avg merge
1d 17h
Merged PRs (30d)
552

Description

As noted by @joanrho in #48370 - when a new page is created from inside the editor through the nav sidebar flow, the back button in the Starter Page Template modal should lead back to the last editor instance where the creation was triggered from. Currently, this button is set to close the editor and lead back to the appropriate calypso entry point (as managed by the calypsoifyGutenberg.closeUrl global).

To Reproduce:
* Open the editor from calypso. Open the nav sidebar, and select "add new page" from the bottom:

![Screen Shot 2021-01-04 at 2 46 08 PM](https://user-images.githubusercontent.com/28742426/103573153-c5c74380-4e9b-11eb-83b6-7b708d67bdc0.png)
* The new page should load with the SPT modal open. Clicking the back button in the SPT modal takes the user back to calypso, as opposed to the previous editor screen.

![Screen Shot 2021-01-04 at 2 46 31 PM](https://user-images.githubusercontent.com/28742426/103573205-dd9ec780-4e9b-11eb-9dfd-4d8dbf8dd6fb.png)

In the case that new page creation is triggered from within the editor, this back button needs to lead back to that previous editor screen as opposed to a calypso or wp-admin management screen.

Contributor guide

Open the contributing guide

Research direction

Start with the nav sidebar's “add new page” flow and the Starter Page Template modal, then trace how the calypsoifyGutenberg.closeUrl global is set and used. Reproduce the flow from an existing editor screen; done means the modal's back button returns to that editor instead of Calypso or wp-admin.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.