-
Notifications
You must be signed in to change notification settings - Fork 384
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
[AMP Stories] Fix default Inserter in the Toolbar #1966
Comments
There was a recent bug fix in Gutenberg for the global inserter in the toolbar: WordPress/gutenberg#14020. It will be included in 5.3. Let's test this with the current development version to see if anything changed for us. After all we do some on-the-fly filtering there. |
I just installed 5.3 RC 1 and it seems to work fine now!
When a page or no block at all is selected, then the global inserter only allows you to insert pages. |
The flow when editing a page and I want to insert components to it does not work as expected. For example: I am on a blank page, click on the inserter on the top left corner, and only the page block is available. The expected scenario is for the user to see all the blocks that can be inserted, and also the possibility of adding a new page. |
@amedina That's the default behavior of the Inserter of Gutenberg -- it always shows what you can insert after the currently selected block. For example, if a Page is selected then you can insert only another Page after it and that's why only a Page shows, since the other blocks can't be inserter after the Page, they could only be inserter inside the Page. On a blank page by default no block is selected, that's why the inserter shows only the Page -- this would insert a new Page. If it would show other blocks there, too, then it wouldn't be clear where they could be inserter. By default to the root element, but these are not allowed there. Perhaps ideally if a Page is selected then other blocks would also be displayed and if a non-Page block would be inserted, it would be inserted as the last block of the selected Page. |
Agreed. We turn Gutenberg a bit on its head with the way stories are edited, so changing the behavior here makes sense.
Neither am I. There are some issues surrounding the inserter, e.g. WordPress/gutenberg#14515, so we'd have to take a deeper look. |
We need to devise a solution because the flow is broken. One approach would be to have always a page selected, either explicitly by the user or by default following some heuristic (e.g. the leftmost page, the most recent, etc). |
For clarification, we already have a page that is always the "current" page. It's the one in the center of the screen. Having this block always selected (i.e. block toolbar and drag handles are always shown) sounds a bit odd, and as Miina said, wouldn't solve the issue anyway:
|
Verified in QA |
Currently, the Inserter in the upper Toolbar doesn't seem to work as expected. It seems to allow adding a Page within a Page and not allow the allowed child blocks.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: