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

Try List View in a panel in post editor #25034

Closed
wants to merge 1 commit into from

Conversation

talldan
Copy link
Contributor

@talldan talldan commented Sep 3, 2020

Description

This is a very quick attempt at moving List View into a side panel in the post editor, as described in #22113. It also enables some of the List View features that have only been in the experiemental navigation editor:

  • Block Appender
  • Block Movers
  • Block Settings Menu
  • Drag and Drop

At the moment there seems to be performance issues for some reason.

Also noting that selecting a block moves focus which closes the panel.

How has this been tested?

Screenshots

Screenshot 2020-09-03 at 3 29 19 pm

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@talldan talldan added the [Feature] List View Menu item in the top toolbar to select blocks from a list of links. label Sep 3, 2020
@talldan talldan self-assigned this Sep 3, 2020
@talldan talldan added the [Type] Enhancement A suggestion for improvement. label Sep 3, 2020
@talldan talldan changed the title Try List View in a panel Try List View in a panel in post editor Sep 3, 2020
@github-actions
Copy link

github-actions bot commented Sep 3, 2020

Size Change: +686 B (0%)

Total Size: 1.17 MB

Filename Size Change
build/edit-post/index.js 305 kB +589 B (0%)
build/edit-post/style-rtl.css 6.31 kB +49 B (0%)
build/edit-post/style.css 6.29 kB +48 B (0%)
ℹ️ View Unchanged
Filename Size Change
build/a11y/index.js 1.14 kB 0 B
build/annotations/index.js 3.67 kB 0 B
build/api-fetch/index.js 3.41 kB 0 B
build/autop/index.js 2.82 kB 0 B
build/blob/index.js 620 B 0 B
build/block-directory/index.js 7.99 kB 0 B
build/block-directory/style-rtl.css 953 B 0 B
build/block-directory/style.css 952 B 0 B
build/block-editor/index.js 128 kB 0 B
build/block-editor/style-rtl.css 11 kB 0 B
build/block-editor/style.css 11 kB 0 B
build/block-library/editor-rtl.css 8.55 kB 0 B
build/block-library/editor.css 8.55 kB 0 B
build/block-library/index.js 137 kB 0 B
build/block-library/style-rtl.css 7.47 kB 0 B
build/block-library/style.css 7.47 kB 0 B
build/block-library/theme-rtl.css 741 B 0 B
build/block-library/theme.css 742 B 0 B
build/block-serialization-default-parser/index.js 1.88 kB 0 B
build/block-serialization-spec-parser/index.js 3.1 kB 0 B
build/blocks/index.js 47.7 kB 0 B
build/components/index.js 200 kB 0 B
build/components/style-rtl.css 15.5 kB 0 B
build/components/style.css 15.5 kB 0 B
build/compose/index.js 9.67 kB 0 B
build/core-data/index.js 12.3 kB 0 B
build/data-controls/index.js 1.29 kB 0 B
build/data/index.js 8.55 kB 0 B
build/date/index.js 5.38 kB 0 B
build/deprecated/index.js 772 B 0 B
build/dom-ready/index.js 568 B 0 B
build/dom/index.js 4.48 kB 0 B
build/edit-navigation/index.js 11.7 kB 0 B
build/edit-navigation/style-rtl.css 1.16 kB 0 B
build/edit-navigation/style.css 1.16 kB 0 B
build/edit-site/index.js 17.1 kB 0 B
build/edit-site/style-rtl.css 3.06 kB 0 B
build/edit-site/style.css 3.06 kB 0 B
build/edit-widgets/index.js 12 kB 0 B
build/edit-widgets/style-rtl.css 2.46 kB 0 B
build/edit-widgets/style.css 2.45 kB 0 B
build/editor/editor-styles-rtl.css 492 B 0 B
build/editor/editor-styles.css 493 B 0 B
build/editor/index.js 45.6 kB 0 B
build/editor/style-rtl.css 3.81 kB 0 B
build/editor/style.css 3.81 kB 0 B
build/element/index.js 4.65 kB 0 B
build/escape-html/index.js 733 B 0 B
build/format-library/index.js 7.71 kB 0 B
build/format-library/style-rtl.css 547 B 0 B
build/format-library/style.css 548 B 0 B
build/hooks/index.js 2.13 kB 0 B
build/html-entities/index.js 621 B 0 B
build/i18n/index.js 3.57 kB 0 B
build/is-shallow-equal/index.js 710 B 0 B
build/keyboard-shortcuts/index.js 2.52 kB 0 B
build/keycodes/index.js 1.94 kB 0 B
build/list-reusable-blocks/index.js 3.12 kB 0 B
build/list-reusable-blocks/style-rtl.css 476 B 0 B
build/list-reusable-blocks/style.css 476 B 0 B
build/media-utils/index.js 5.32 kB 0 B
build/notices/index.js 1.79 kB 0 B
build/nux/index.js 3.4 kB 0 B
build/nux/style-rtl.css 671 B 0 B
build/nux/style.css 668 B 0 B
build/plugins/index.js 2.56 kB 0 B
build/primitives/index.js 1.41 kB 0 B
build/priority-queue/index.js 789 B 0 B
build/redux-routine/index.js 2.85 kB 0 B
build/rich-text/index.js 13.9 kB 0 B
build/server-side-render/index.js 2.77 kB 0 B
build/shortcode/index.js 1.7 kB 0 B
build/token-list/index.js 1.27 kB 0 B
build/url/index.js 4.06 kB 0 B
build/viewport/index.js 1.85 kB 0 B
build/warning/index.js 1.14 kB 0 B
build/wordcount/index.js 1.17 kB 0 B

compressed-size-action

@ZebulanStanphill ZebulanStanphill added the Needs Accessibility Feedback Need input from accessibility label Sep 3, 2020
@shaunandrews
Copy link
Contributor

This shows a lot of promise. Once we get the design updates #24029 (and #24419) and fix the "moves focus which closes the panel" thing, this could be very helpful for complex documents and the Site Editor.

image

I noticed an empty descender; I'm assuming its something do to with the + button and the fact that the selected block doesn't supper InnerBlocks.

@talldan
Copy link
Contributor Author

talldan commented Sep 4, 2020

@shaunandrews Good spot, I think we need to check whether the block supports an appender before showing the descender. We can add that to the todo list!

I've started separately working on some performance improvements in #25069.

@afercia
Copy link
Contributor

afercia commented Sep 7, 2020

Noting that this PR replicates the new Inserter sidebar pattern, which has been already identified as an accessibility regression compared to the previous implementation. See #22858

Further a11y testing of the Inserter sidebar is still pending, as there are other issues to evaluate and address, see #24975.

Overall, I'd think this needs a serious, in depth, accessibility testing to understand if it's a good pattern for all users and I'd kindly ask to wait for testing to happen even if it could take a while because the accessibility team has scarce availability of time and resources.

Specific issues I noticed at a very first look of this implementation:

  • still uncertain whether the treegrid pattern is correct and actually useful, see ongoing discussion on List View Design Updates #24029
  • the nested levels aren't communicated in any way, not semantically (a list could communicate that natively) nor by other means

@SchneiderSam
Copy link

Would be really helpful seeing this PR ready for WP 5.6. Huuuuge win.

Copy link
Contributor

@afercia afercia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first accessibility feedback was given in #25034 (comment)

Also, the accessibility team is not fully convinced the "sidebar" pattern is good for accessibility in the first place. The team had an initial discussion on this but didn't come to a conclusion yet.

@afercia
Copy link
Contributor

afercia commented Sep 16, 2020

Quick consideration related to reordering. I guess blocks that can be reordered horizontally (e.g. buttons, social icons) should display the mover buttons arranged horizontally and with left/right chevron icons. Right now, they use up/down icons:

Screenshot 2020-09-16 at 14 39 44

Example of left/right reorder button icons in the block toolbar:

Screenshot 2020-09-16 at 14 42 40

@afercia
Copy link
Contributor

afercia commented Sep 16, 2020

Thinking a bit more in depth to this "List View" pattern, I'm very, very, hesitant on the idea of changing the Block navigator to a more complex UI, especially if extra features like Movers, More menu, etc. are added to it.

The original intent of the Block navigator is to provide users with a simple navigation tool to navigate through the blocks. To some extent, this also helps keyboard and screen reader users. Making it a complex UI that lives in a Sidebar (a pattern that has its own accessibility issues) and provides way more controls that are difficult to understand and navigate defeats the purpose of having a simple navigational tool. For more background, see my comment on this related issue #22113 (comment)

@SchneiderSam
Copy link

The original intent of the Block navigator is to provide users with a simple navigation tool to navigate through the blocks.

What an interesting thought. 80/20 All the way to Pareto.

I as a user really don't need more: Being able to move blocks more easily - with the navigator (many pagebuilders do that). For big posts this would be an ENORmous help and I think the sense behind it doesn't need to be discussed anymore.

I as a user would be completely satisfied with arrows and drag and drop.

@afercia
Copy link
Contributor

afercia commented Sep 17, 2020

What an interesting thought. 80/20 All the way to Pareto.

I'm not sure I understand whether that's irony or sarcasm, also because I'm not a native English speaker. Either ways, I'm not sure that language and tone is appropriate.

I'd like to point out again that the Block navigator was designed to solve an accessibility problem amongst other things. `s such, it's a tool that keyboard users and assistive technologies users need to be as simple as possible with no extra features that would defeat its purpose by making it harder to use for these users.

@SchneiderSam
Copy link

SchneiderSam commented Sep 17, 2020

I'm not sure I understand whether that's irony or sarcasm, also because I'm not a native English speaker. Either ways, I'm not sure that language and tone is appropriate.

@afercia Oops - no, I did not want to convey that at all. I meant it seriously. And the Pareto principle is quite effective and efficient. As I understood you, you suggested not to include so many options and to use only the most important ones. Please excuse me if I am wrong here.

So I wanted to say: Your idea is really good and I as an end user do not need more.

eddit: maybe that was due to my bad English (I am from Germany). If that is the case: Sorry again ;)

@ZebulanStanphill
Copy link
Member

ZebulanStanphill commented Sep 17, 2020

Don't worry, @afercia, I'm a native English speaker, and I didn't understand it either. 😛

As someone who was initially completely in favor of adding a bunch of new controls to List View and making it a sidebar (comparing it to stuff like Divi's Layers View), I think it's important to note that I am now against the idea entirely now think it's a bad idea.

See my response to the aforementioned comment on #22113. In short, I now favor exploring the introduction of a new "Move mode" or perhaps even a "List mode", both of which would simply change the appearance and available block controls of the main editor canvas... rather than trying to solve problems through a complementary sidebar interface (which has the downsides of limited space, divided attention between it and the main canvas, and a multitude of keyboard navigation issues).

@talldan
Copy link
Contributor Author

talldan commented Sep 18, 2020

Could we all just keep things civil here. The code of conduct for the project states that "We strive to maintain a welcoming environment where everyone can feel included", and that includes overcoming misunderstandings. You can just ask for clarification if you don't understand something rather than instantly assuming the worst intent.

@ZebulanStanphill I appreciate your thoughts, but I don't really understand why you'd write something like this:

I think it's important to note that I am now against the idea entirely

That's not a very collaborative approach. I really wouldn't be very happy to see this kind of comment on a new contributor's issue or PR. That's designed to throw a roadblock down rather than work constructively to find a better solution.

@ZebulanStanphill
Copy link
Member

Good point. I've reworded my comment.

@paaljoachim
Copy link
Contributor

Testing the PR. Giving some general feedback in relation to the Nav list view.
At first I thought this PR was in relation to the general block list view in a page/post.
I then understood that it was in relation to the navigation block.

I added the Nav block. Selected to add the top level pages.
What I notice right away....
Top parent is called Navigation. If I remember correctly @shaunandrews suggested in another issue/PR that the top level Navigation should instead use the name of the menu that is selected. As the user knows that this is a nav structure and having the name of the menu at the top just seems like a good way to signal for the user which menu is being used.
I like the branching tree.
It would be nice to instead of using black for the selected menu item icon (as black is used for the inserter that the selected menu items would use a lighter color).
Drag&drop, etc are not working and it seems not relevant to this PR. As it seems this PR is about bringing the existing Navigation screen list view into the Nav block and Gutenberg content area.

One thing that I do not think have been mentioned earlier is the opportunity to click into the name similar to Mac/Windows to rename the text of a link. Meaning in the Nav screen and nav block click into the menu item to first select and then click into the name again to open the field for renaming of menu item.

Base automatically changed from master to trunk March 1, 2021 15:44
@talldan
Copy link
Contributor Author

talldan commented Mar 25, 2021

Closing this down, as I don't have time to work on this currently. List View has already been added to the site editor in the same way as this, so it may be that the work there is replicated in the post editor at some point.

That implementation has already surpassed this one, so I don't think there's any value in keeping this around.

@talldan talldan closed this Mar 25, 2021
@talldan talldan deleted the try/persistent-list-view-panel branch March 25, 2021 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] List View Menu item in the top toolbar to select blocks from a list of links. Needs Accessibility Feedback Need input from accessibility [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants