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

Post editor: post title no longer appears in outline #47624

Open
talldan opened this issue Feb 1, 2023 · 4 comments
Open

Post editor: post title no longer appears in outline #47624

talldan opened this issue Feb 1, 2023 · 4 comments
Labels
[Package] Edit Post /packages/edit-post [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Bug An existing feature does not function as intended

Comments

@talldan
Copy link
Contributor

talldan commented Feb 1, 2023

Description

A previous issue here was solved, there's still one outstanding issue mentioned in #47624 (comment)

The heading links in the post outline no longer work.

My hunch is that this is a result of using an iframe for the editor content. The links are implemented as standard anchor links, and since the headings are no longer part of the same document, they aren't focused when selecting a link.

A fix might be to implement a click event handler that calls selectBlock, like List View does.

Step-by-step reproduction instructions

  1. Open the Gutenberg Demo post
  2. Open the List View panel
  3. Navigate to the Outline tab
  4. Select one of the heading links

Expected: The block is selected in the canvas
Actual: Nothing happens

Screenshots, screen recording, code snippet

Screen Shot 2023-02-01 at 9 26 18 am

Environment info

Brave browser on Mac OS
Gutenberg trunk.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@talldan talldan added [Type] Bug An existing feature does not function as intended [Package] Edit Post /packages/edit-post labels Feb 1, 2023
@talldan talldan moved this to ❓ Triage in WordPress 6.2 Editor Tasks Feb 1, 2023
@t-hamano
Copy link
Contributor

t-hamano commented Feb 1, 2023

I was able to reproduce it. Additionally, if the editor content is an iframe, the title area will not be displayed.

Twenty Twetny One:

tt1

Twenty Twenty Two, Twenty Twenty Three (Title area is not displayed):

tt2

@ndiego
Copy link
Member

ndiego commented Feb 3, 2023

I can confirm as well. Moving this to "Todo" for 6.2.

@ndiego ndiego added the [Type] Regression Related to a regression in the latest release label Feb 3, 2023
@ndiego ndiego moved this from ❓ Triage to 📥 Todo in WordPress 6.2 Editor Tasks Feb 3, 2023
@t-hamano
Copy link
Contributor

t-hamano commented Feb 4, 2023

To give focus to a block when an item is clicked, I think this could be accomplished with selectBlock. However, if the target element of the anchor link exists in a different document, I am concerned about the validity of the current implementation in the first place. As far as I can tell, the outline item was changed from a button to a link by #7142.

The title item is similarly implemented with standard anchor links, but the post title no longer has an id attribute. Therefore, the anchor link in the title item would not work even in the Classic theme where the editor content resides in the same document. Also, selectBlock cannot be used for the post title that does not have a clientId, so a different approach might be necessary.

@Mamaduka
Copy link
Member

Removing this from WP 6.2 project board since the editor will not be iframed in the core.

@talldan talldan changed the title Post editor: outline heading links no longer work Post editor: post title no longer appears in outline Jul 26, 2024
@talldan talldan added [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later and removed [Type] Regression Related to a regression in the latest release labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Edit Post /packages/edit-post [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants