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

Site Editor/Navigation: Links to draft pages not showing up in site preview #29417

Closed
alaczek opened this issue Mar 1, 2021 · 10 comments
Closed
Labels
[Block] Navigation Link Affects the Navigation Link Block [Block] Navigation Affects the Navigation Block [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Bug An existing feature does not function as intended

Comments

@alaczek
Copy link

alaczek commented Mar 1, 2021

When I add a page link to the navigation block and select the option to create a draft page, the new nav menu item shows up in the editor but is not visible in the preview. I think this might be related to #29395 and #29397.

Steps to reproduce:

  1. Open the site editor and start editing the site header.
  2. Add navigation block, and add a new link inside. (or add a new item to the existing navigation block).
  3. Start typing a page name and select the "Create draft page" option when it's offered.
  4. The new link will be added to the menu in the editor.
  5. Save and preview. The new link is not visible on the front end.

Expected behaviour

I expected the link to the draft page to show up in preview.

Screenshots or screen recording (optional)

nQPanjRcHw

WordPress information

  • WordPress version: 5.6.2
  • Gutenberg version: 10.0.2
  • Are all plugins except Gutenberg deactivated? YES
  • Are you using a default theme (e.g. Twenty Twenty-One)? TT1 Blocks

Device information

  • Device: Desktop
  • Operating system: macOS 10.15.7
  • Browser: Chrome 88.0
@annezazu annezazu added [Block] Navigation Affects the Navigation Block [Block] Post Navigation Link Affects the Post Navigation Link Block [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Bug An existing feature does not function as intended labels Mar 3, 2021
@annezazu
Copy link
Contributor

annezazu commented Mar 3, 2021

@shaunandrews flagging for you to get your thoughts :) I imagine if you create a draft, you wouldn't expect it to show up in the menu on the front end so that aspect tracks for me and doesn't feel like a bug. However, it seems like there needs to be a way to visually show in the editor that the menu item won't yet be live on the front end of the site due to the draft state.

@jasmussen
Copy link
Contributor

We could potentially show a "Draft" indicator. The font size is really small, but it would serve more as an indicator and could come with a tooltip:

Screenshot 2021-03-04 at 16 44 50

@annezazu
Copy link
Contributor

annezazu commented Mar 4, 2021

I like that but wonder if it's enough to communicate to the user that this still won't show up on the front end (including the DRAFT part). There likely needs to be some way to indicate to the user how to resolve this 🤔

@jasmussen
Copy link
Contributor

jasmussen commented Mar 4, 2021

Actually, a better option is probably to lean into Shaun's design for the Placeholder menu item state that we shipped recently:

placeholder

To an extent, a draft page could be thought of as a placeholder, or at least sharing some DNA:

Screenshot 2021-03-04 at 19 03 26

Edit: Or this one:

Screenshot 2021-03-05 at 11 36 17

@annezazu
Copy link
Contributor

annezazu commented Mar 4, 2021

Oh I love this!! Very much helps indicate this isn't a "live" item.

@shaunandrews
Copy link
Contributor

image

This one seems like it'd be a great solution.

@ntsekouras ntsekouras added [Block] Navigation Link Affects the Navigation Link Block and removed [Block] Post Navigation Link Affects the Post Navigation Link Block labels Aug 4, 2021
@getdave
Copy link
Contributor

getdave commented Nov 16, 2021

@jasmussen @shaunandrews Where are we with this one? I assumed Draft Pages should

  • not show on the frontend
  • not show up in the Link UI search

Is there a design above that is current enough to be worked on?

@jasmussen
Copy link
Contributor

I think this PR meant to address this: #31716 CC: @vcanales

@vcanales
Copy link
Member

I think this PR meant to address this: #31716 CC: @vcanales

It is, I'll try to wrap up ASAP — I got sidetracked while I was in the process of implementing some of the final suggestions.

@kathrynwp
Copy link

It looks like this did get wrapped up – draft menu items now say (Draft) in the editor, per the discussion above – so I'll go ahead and close this out.

If anyone thinks this should be reopened, please comment with what still needs to be done and I'll be glad to reopen it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Link Affects the Navigation Link Block [Block] Navigation Affects the Navigation Block [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

8 participants