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

List View: Design updates #24419

Closed
wants to merge 8 commits into from
Closed

List View: Design updates #24419

wants to merge 8 commits into from

Conversation

shaunandrews
Copy link
Contributor

WIP

image

Still a lot to do, but this PR starts by

  • reducing the row height down (48px to 36px), and overall spacing.
  • adding the more (...) menu everywhere.
  • removing the descender lines.
  • arranging movers side-by-side.
  • adding a hover affect.

There's still a lot of work to be done. Here's how the changes look in the experimental Navigation screen, which shows the movers:

image

@github-actions
Copy link

github-actions bot commented Aug 6, 2020

Size Change: -1.19 kB (0%)

Total Size: 1.2 MB

Filename Size Change
build/block-editor/index.js 128 kB -110 B (0%)
build/block-editor/style-rtl.css 10.5 kB -535 B (5%)
build/block-editor/style.css 10.5 kB -531 B (5%)
build/components/index.js 200 kB -10 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 8.54 kB 0 B
build/block-directory/style-rtl.css 953 B 0 B
build/block-directory/style.css 952 B 0 B
build/block-library/editor-rtl.css 8.68 kB 0 B
build/block-library/editor.css 8.68 kB 0 B
build/block-library/index.js 139 kB 0 B
build/block-library/style-rtl.css 7.59 kB 0 B
build/block-library/style.css 7.58 kB 0 B
build/block-library/theme-rtl.css 754 B 0 B
build/block-library/theme.css 754 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.8 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.68 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.54 kB 0 B
build/date/index.js 31.9 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.47 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-post/index.js 305 kB 0 B
build/edit-post/style-rtl.css 6.26 kB 0 B
build/edit-post/style.css 6.25 kB 0 B
build/edit-site/index.js 19.3 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.2 kB 0 B
build/edit-widgets/style-rtl.css 2.55 kB 0 B
build/edit-widgets/style.css 2.55 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.72 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.56 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

@draganescu
Copy link
Contributor

Why is it a draft? It contains more than enough changes for an iteration 💯

@shaunandrews
Copy link
Contributor Author

image

I pushed some changes:

  • Made the popover wider
  • Forced nested blocks to always show
  • Forced the movers to show
  • Switched away from table elements to basic div's to have better control over focus and general styling
  • Added an alternative for the nested descender indicator, this time its a more subtle series of dots

Why is it a draft? It contains more than enough changes for an iteration

I'm sure it does. For now, this is kind of a sandbox to see how things feel in practice. It might be mergeable, or maybe we end up splitting it up.

@SchneiderSam
Copy link

Sooo cool. Big Game Changer....

I was about to test it with http://gutenberg.run/24419, but unfortunately it does not work. I'm getting an error. I've tried it several times... @aduth

@ZebulanStanphill ZebulanStanphill added the [Feature] List View Menu item in the top toolbar to select blocks from a list of links. label Aug 13, 2020
@enriquesanchez
Copy link
Contributor

This looks great and works as expected. I didn't notice any loss in functionality due to the use of divs.

One thing I came across is we'd probably want to truncate or do something about long strings of text:

Screen Shot 2020-08-13 at 16 00 11

Copy link
Contributor

@tellthemachines tellthemachines left a comment

Choose a reason for hiding this comment

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

This is working pretty well! Just a few comments below.

Also, if we're showing the "More options" menu (I'm not fully convinced we should 😅 ), we'll probably need to hide some of the options. E.g. trying to use "Move to" is awkward from the modal and impossible from the top toolbar navigator.
Screen Shot 2020-08-14 at 5 18 47 pm

Finally:

  • Lint checks are failing: run npm run lint-js once you've finished making changes and fix the resulting errors.
  • Treegrid snapshots need updating: run npm run test-unit -- -u to update them.

@@ -53,18 +51,15 @@ export default function BlockNavigationBlock( {
const siblingCount = rowCount - 1;
const hasSiblings = siblingCount > 0;
const hasRenderedMovers = showBlockMovers && hasSiblings;

// I'm not using the classnames that come from this,
// but maybe I should? -shaun
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to keep the is-visible class and attach the hover/focus styles to it, otherwise we're depending on focus-within and that won't work on IE 😞

}

// Hide block number and level description. (i.e. Block 2 of
// 3, Level 2). This is mostly useful for screen readers.
.block-editor-block-navigation-block-slot__description,
.block-editor-block-navigation-block-select-button__description,
.block-editor-block-navigation-appender__description {
display: none;
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't use display: none if the content is meant to be screen reader accessible.
Current best practice in this repo is to wrap the screen-reader-only component in VisuallyHidden. This ensures it'll have the appropriate styling.

@@ -150,10 +150,10 @@ export default function TreeGrid( { children, ...props } ) {
return (
<RovingTabIndexContainer>
{ /* Disable reason: A treegrid is implemented using a table element. */ }
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to update the disable reason here.

@paaljoachim
Copy link
Contributor

Here is the PR for WIP: Add drag and drop to List View
#23952

@paaljoachim
Copy link
Contributor

Can we get an update to how things are going here?
Thanks!

@paaljoachim
Copy link
Contributor

paaljoachim commented Sep 9, 2020

I was finally able to test this out by not using gutenberg.run.

I followed this doc: https://developer.wordpress.org/block-editor/tutorials/devenv/
(Which we added to the core editor handbook yesterday.)

and I am following steps in how to test run a PR. I will later today add an issue and then create a doc PR giving instructions on how to run a PR.

Here is an animated gif. Showing the Navigation screen structure.
Nav-structure

What is interesting is the clarity in when an element is selected. But the black background color creates a too strong contrast. The black could perhaps be a greyish color instead. As it might just need a much more subtitle background color. I am not sure about the dots. Having the old tree diagram lines seemed easier to follow.
All in all I am not sure about the direction seen in this PR in relation to what I experienced in the Nav screen structure.

@noahtallen
Copy link
Member

@shaunandrews is there anything specific we can do to help move this forward?

@shaunandrews
Copy link
Contributor Author

is there anything specific we can do to help move this forward?

I likely tried doing too much in this PR. I think we could probably break some of this up into smaller branches, like:

  • reducing the row height down (48px to 36px), and overall spacing.
  • removing (and potentially replacing) the descender lines.
  • arranging movers side-by-side.
  • adding a hover affect.

@shaunandrews
Copy link
Contributor Author

Cherry-picked a few things from this bigger PR into a smaller one over in #28029

@draganescu
Copy link
Contributor

@shaunandrews as the new screen has no list view anymore, is this design update maybe outside of the Navigation editor scope?

@shaunandrews
Copy link
Contributor Author

I think we'll bring the list view back to the navigation editor, so it still makes sense to improve it as part of that effort.

Base automatically changed from master to trunk March 1, 2021 15:43
@getdave
Copy link
Contributor

getdave commented Apr 21, 2021

@draganescu @shaunandrews Should we remove this from PRs pending review?

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants