-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Edit Site: Implement post switcher and integrate with "navigate to link". #22543
Conversation
Noting that the border overflow in the link suggestions' active state is also present on master. |
b540617
to
3a387f8
Compare
Really cool stuff! I especially like the follow-through functionality on links. I’ll look through everything more tomorrow, but my main concern at first glance is that we’re overloading the page/category/post selector way too much. It’s really busy and seems difficult to navigate easily. Again, probably more of a design question that can be resolved in the future, but good to keep in mind. |
Thanks! Yeah, I agree. There is already a re-design in the works that moves it to a left sidebar and supports nested paths in a stack-carousel-like way. It should be pretty easy to move to that once we move |
Not sure when this bug was introduced, but I can't really switch to new templates. For example, if I select "sample page" and then create a new template and call it "page", the blocks in the editor do not change to be blank, they just stay the same as the I do see a couple of console errors: This one has been around for a while:
and
both trace to |
That's odd. I can't reproduce it. In any case, I'm following up on this PR with the new template creation flow, which doesn't allow for arbitrarily named templates, so this issue will no longer be relevant. |
isn't |
Yes, but the way templates are created will be different. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my main comments should be resolved in the future:
settings.page
should be more clear and intuitive once we move it to the store.- issues with new templates should be resolved in the new work around creating templates
so this looks good to me.
I like this feature! I am trying to test the PR at gutenberg.run. But it looks like there is no access to test out Full Site Editing. What I noticed is that the Gutenberg plugin is not installed, so I installed, activated and turned on the "Full Site Editing" experiment. Then went to the "Site Editor" to test out this feature, but end up at a blank page. http://dvbeazhy.gutenberg.run/wp-admin/admin.php?page=gutenberg-edit-site I was not able to get further. |
Did you turn on the demo templates experiment? |
that's definitely a few commits out of date. 🤔 When I load this PR in gutenberg.run (http://gutenberg.run/22543), it tells me "error" after trying to install the plugin. (could possibly happen because of the merge conflict) |
37d35fe
to
81d7994
Compare
Size Change: +670 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
I found what's causing this. It's an issue with I'll push up a fix. |
thanks for investigating! |
Description
This PR adds a post picker to the page switcher in the site editor that allows you to load a specific post and its template. For this, a minor modification was made to
LinkControl
to allow disabling direct/custom entries as these wouldn't make sense in this context unless we decide to support creating new posts here in the future.This PR also integrates this new functionality with the "navigate to link" functionality by adding support for link types and IDs to the inline link format.
This PR also fixes a small issue that these new features surfaced in the site editor when
useEntityBlockEditor
tries to parse initial content for an entity that is still loading.How has this been tested?
It was verified that navigating to a post either from the page switcher or from an inline link, as shown in the GIF below, works as expected.
Screenshots
Types of Changes
New Feature: The site editor now has a post picker in the page switcher that is integrated with the "navigate to link" functionality.
New Feature:
LinkControl
now supports a prop for disabling direct/custom entries.New Feature: The inline link format now tracks link types and IDs.
Bug Fix:
useEntityBlockEditor
now works as expected with entities that are not loaded yet.Checklist: