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

Navigation List View: Add a block appender #45445

Closed
scruffian opened this issue Nov 1, 2022 · 5 comments
Closed

Navigation List View: Add a block appender #45445

scruffian opened this issue Nov 1, 2022 · 5 comments
Labels
[Block] Navigation Affects the Navigation Block [Type] Enhancement A suggestion for improvement.

Comments

@scruffian
Copy link
Contributor

scruffian commented Nov 1, 2022

As outlined in #42257 we need to add a block appender to the Navigation List View to allow users to add more items to their navigation:

Screenshot 2022-11-01 at 11 37 21

This will probably require us fixing this issue at some point: #18295

@getdave
Copy link
Contributor

getdave commented Nov 18, 2022

FYI the end of this video has a small snippet where the expected UI is detailed

Update: here's a screenshot

Screen Shot 2022-11-21 at 13 20 39

@getdave
Copy link
Contributor

getdave commented Nov 18, 2022

@SaxonF I wonder could you confirm how you see this appender working? Is it always at the end of the list of items as per the prototypes? Or can it appear elsewhere?

Any other detail, mockups or guidance at this point before we go too far would be much appreciated 🙇

@SaxonF
Copy link
Contributor

SaxonF commented Nov 21, 2022

@getdave let's start with always at the end but the "trigger" for the add menu item dialog should be able to appear anywhere so that we can play with its position easily in future.

@getdave
Copy link
Contributor

getdave commented Nov 21, 2022

@ajlende Status update: I continued working on your PR to add the necessarily functionality but it started getting unwieldy pretty quickly.

I spoken with @scruffian and decided to also explore a simpler approach using the standard inserter from the canvas.

So we have x2 PRs that are variations on the same effort:

The basic problem is:

  • there are only two standardised appender components in Gutenberg Core - block and default
  • neither fit use case for what is in design (above)
  • creating a custom appender is possible either by passing props to existing appenders or using <Inserter> directly. Both pose problems and require reimplementing logic (see my PRs).
  • we need to avoid getting bogged down in refactoring when we are not sure of the solution we want to achieve.

At this point both PRs need review and feedback.

The next step is to break out the changes to the Offcanvas List View that diverge it from primary LV into a separate PR:

  • adding clientId prop
  • include a custom style.scss file

We can also invite design feedback and fix any items from code review.

I was aiming to merge a simple PR that "just works" and then move on to address the other UX issues in follow ups. The most important is making the inserter popup appear in the sidebar not the canvas.

@getdave
Copy link
Contributor

getdave commented Nov 30, 2022

Done in #46013. cc @SaxonF

@getdave getdave closed this as completed Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants