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

Page navigation in the block editor #41298

Closed
johnHackworth opened this issue Apr 20, 2020 · 21 comments
Closed

Page navigation in the block editor #41298

johnHackworth opened this issue Apr 20, 2020 · 21 comments
Assignees
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Goal] Editor Improvements [Goal] Gutenberg Working towards full integration with Gutenberg [Type] Task

Comments

@johnHackworth
Copy link
Contributor

johnHackworth commented Apr 20, 2020

Let's add a dropdown to the block editor, when you are editing a page, that lets you navigate to one of the existing pages in your site or create a new one.

Previous attempt:
#39826

image

image

Páginas ‹ Press any key to start — WordPress com

@johnHackworth johnHackworth added [Feature] Post/Page Editor The editor for editing posts and pages. [Goal] Gutenberg Working towards full integration with Gutenberg labels Apr 20, 2020
@p-jackson
Copy link
Member

Given that #41294 is almost done, does it still make sense that this isone of the "very nice to haves" for the soft launch? pbAok1-BW-p2

Given that there won't be any other starter pages they won't need to edit them before launching (just thinking of keeping the project scope to onboarding and activation only)

@ramonjd
Copy link
Member

ramonjd commented Apr 23, 2020

Given that #41294 is almost done, does it still make sense that this isone of the "very nice to haves" for the soft launch? pbAok1-BW-p2

Good point.

Unless this is a general wish list for the WordPress.com editor, in which case I think it could still be punted upfield, metaphorically speaking.

@ramonjd
Copy link
Member

ramonjd commented Apr 24, 2020

This could also get wily if we list hierarchical pages, and there are dozens of them.

@johnHackworth
Copy link
Contributor Author

johnHackworth commented Apr 24, 2020 via email

@ramonjd
Copy link
Member

ramonjd commented Apr 27, 2020

I've been looking at this task today, and various ways we might achieve what we want.

I've come up with three possibilities. There may be more :)

The first is to carry on with #39826

From a data perspective, this would be the most convenient. The Calypso store has most of the data we need already, and we can reuse any Calypso lib/component.

The downside is that it's not really part of the editor, and so we'll need to juggle the element's position hoping that it won't interrupt use of the tool bar underneath.

Apr-27-2020 14-12-56

Create a must-use Gutenberg sidebar plugin

Sitting beside the Jetpack plugin sidebar icon, our unnamed plugin allows users to view and add pages from the Gutenberg sidebar. Docs: https://developer.wordpress.org/block-editor/developers/slotfills/plugin-sidebar/

Screen Shot 2020-04-27 at 3 43 09 pm

Creating a Gutenberg plugin would be extra work, but the integration would be more compatible with the block editor.

Showing users that it's there would be another matter. Through the welcome modal perhaps.

Extend the block editor in apps/wpcom-block-editor

I haven't fully tested this, but we might be able to append a <select /> element filled with page options and other elements. Similar to what we do in Gutenberg overrides.

We can fetch and search pages using the WP rest API (/wp/v2/pages), and there's the possibility of passing info such as the current page id through the iframe messenger.

This third option feels like the most error-prone and fiddly.

@p-jackson What do you reckon? Do you wanna take a stab at this task and let us know what you think the right direction might be?

@ramonjd
Copy link
Member

ramonjd commented Apr 29, 2020

Some discussion kicked off over at pbAok1-Ii-p2 on whether we can add this functionality to a side bar

@ramonjd
Copy link
Member

ramonjd commented Apr 30, 2020

Given the comments on pbAok1-Ii-p2, I think we should work with design on this one and maybe consider the sidebar option.

It might be that a sidebar solves more than just the need for a page navigation widget, in which case we would see a better return on development investment.

Whether we can come up with consistent functionality across wp-admin and Calypso is something that we'll need to crack regardless.

@vindl
Copy link
Member

vindl commented May 19, 2020

Just a heads up that I've recently seen some design mockups for page navigation in core FSE that seem to overlap this. It would be cool if we could reuse that instead of duplicating it (provided that we do end up taking that route).

Screenshot 2020-05-19 at 22 48 36

@ramonjd
Copy link
Member

ramonjd commented May 19, 2020

Just a heads up that I've recently seen some design mockups for page navigation in core FSE that seem to overlap this. It would be cool if we could reuse that instead of duplicating it (provided that we do end up taking that route).

Thanks for raising this @vindl

@p-jackson has made a healthy start to this already in the FSE plugin.

We should keep @olaolusoga in the loop on the design front if it's all good to continue with that work. 👍

@p-jackson
Copy link
Member

Linking a more recent mockup from @shaunandrews in this tracking issue

recent pages sidebar
#41703 (comment)

@ramonjd
Copy link
Member

ramonjd commented Jul 2, 2020

ramonjd unassigned p-jackson, johnHackworth and ramonjd 24 seconds ago

no one saw anything

@p-jackson
Copy link
Member

p-jackson commented Jul 7, 2020

Todo before shipping. I've put them in the order I think is most important before shipping.

@p-jackson
Copy link
Member

Latest mockup pbAok1-185-p2#comment-2345

screen-capture-on-2020-07-08-at-14-44-39-1

@ramonjd
Copy link
Member

ramonjd commented Jul 15, 2020

Hi @olaolusoga

Should we be matching @shaunandrews's work in WordPress/gutenberg#23939 for the sidebar before we launch it?

@olaolusoga
Copy link

Not all of it since there's chatter still going on. I can mock up the small adjustments we should include, and share shortly.

Is the preview in Shaun's GIF possible with what we're doing?

@p-jackson
Copy link
Member

Is the preview in Shaun's GIF possible with what we're doing?

Might be possible, but certainly not trivial. We might be able to use the same technique that the fullscreen layout picker uses, but it wouldn't be a short term thing. I worry a about performance there too, if you're already on a very large sluggish page, then loading a preview of another large sluggish page could even crash the browser tab. A skeleton preview might be a way around it i.e. just showing block outlines as boxes and removing the actual images/text from the preview.

@olaolusoga
Copy link

Might be possible, but certainly not trivial.

Makes sense. Let's punt on the previewer for now; core can figure it out, and we'll roll it into FSE on dotcom.

@p-jackson
Copy link
Member

p-jackson commented Jul 27, 2020

Issues so far from Call for Testing:

@p-jackson
Copy link
Member

Page navigation has now been shipped to 100% users. There are some tasks/issues on the board for small improvements we could make, but the main task is now done.

@ramonjd
Copy link
Member

ramonjd commented Aug 12, 2020

Page navigation has now been shipped to 100% users. There are some tasks/issues on the board for small improvements we could make, but the main task is now done.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Goal] Editor Improvements [Goal] Gutenberg Working towards full integration with Gutenberg [Type] Task
Projects
None yet
Development

No branches or pull requests

5 participants