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: Clicking to add top level page but deciding not to leaves "Add link..." in place #21450

Closed
paaljoachim opened this issue Apr 7, 2020 · 7 comments

Comments

@paaljoachim
Copy link
Contributor

paaljoachim commented Apr 7, 2020

Is your feature request related to a problem? Please describe.
Let's say that I decide to add a new top level page. But change my mind. That I do not need another top level nav item.

I see the "Add link..." placeholder still in the menu even when clicking away from it.

Screen Shot 2020-04-07 at 10 26 53

It remains when I click into it.
Screen Shot 2020-04-07 at 10 27 01

Describe the solution you'd like
When clicking away from creating a submenu. #21448
Or creating a top level menu item. The "Add link..." should also be removed.

Describe alternatives you've considered
Clicking into the "Add link..." I had to either remove the block through the toolbar or add some text and then select the container and click the delete key on the keyboard.

William as you worked on the Permalink PR. #12009
When not saving and clicking outside of the box the Permalink would automatically close. I am thinking the same method can be used on this issue and the related submenu issue I made.
#21448
@earnjam

@kirilzh
Copy link
Contributor

kirilzh commented Apr 9, 2020

I'm not convinced it should be automatically removed. Have you considered the scenario where you insert multiple empty links?
Screen-Recording-2020-04-09-at-1
To me the current implementation seems intuitive, if you add a block you also have to take care to remove it.

@paaljoachim
Copy link
Contributor Author

Good point Kiril!

It needs to be easier to select the border around a link either it is empty with a "Add link..." or has text content in it. Then it also becomes easier to remove the empty nav items.

@kirilzh
Copy link
Contributor

kirilzh commented Apr 15, 2020

Clicking on "Add link..." opens the toolbar menu which has a "Remove Block" option hidden in the three dots menu.

Proposed solution: adding it to the primary toolbar options

@paaljoachim
Copy link
Contributor Author

Hey Kiril.
Why would a person insert multiple empty links?
I am thinking that one would atleast write something into the empty areas.

As I still see an empty link as really no content. If one wanted to have a placeholder link that one can just type some letters into it. Or do a copy and paste of the name link for instance having that repeated in all the areas one just wants a placeholder.

@talldan
Copy link
Contributor

talldan commented Apr 20, 2020

@paaljoachim Automatically deleting empty blocks isn't a pattern employed elsewhere in the block editor, so I don't think the behaviour should be any different in the navigation block.

I think @kirilzh's point makes sense. If I know I'll have a menu with 5 items, I might add 5 empty blocks before typing in the content. In that situation having the blocks deleted automatically would be frustrating.

I'm going to close the issue, as I don't believe this is something that should be addressed for one block alone.

I think there's probably a case for a separate issue that would look into making it easier to delete empty links. Maybe pressing backspace/delete should remove one. That seems like it would be the opposite of what this issue proposes:
#18208

@talldan talldan closed this as completed Apr 20, 2020
@paaljoachim
Copy link
Contributor Author

Hey @talldan
The bottom line for me is that it just needs to be easier to delete links with or without content.

@talldan
Copy link
Contributor

talldan commented Apr 21, 2020

@paaljoachim Right, I see. I made a separate issue so that this is tracked #21743

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants