GithubHelp home page GithubHelp logo

Comments (9)

jarekmorawski avatar jarekmorawski commented on June 3, 2024 1

The empty state is a slightly different use case (it appears without additional user input, like filtering), but I agree it'd use a similar treatment. Here's an attempt. The word pattern appears twice because it's good for the button to have a descriptive label.

Empty

It'd be nice to make the empty state extensible so third-party plugins could add extra elements, like buttons and buttons, without writing custom code.

from gutenberg.

jameskoster avatar jameskoster commented on June 3, 2024

In cases where no records exist, "No results found" reads a little strange, as does the accompanying text. In that scenario the messaging could be more focussed around adding the first $post_type.

from gutenberg.

jameskoster avatar jameskoster commented on June 3, 2024

I wonder if it would make sense to implement this as a dedicated component, cc @WordPress/gutenberg-components.

from gutenberg.

ntsekouras avatar ntsekouras commented on June 3, 2024

I wonder if it would make sense to implement this as a dedicated component

I think if we did that, it would make sense to be in dataviews package and just be a think wrapper with some base styles (border maybe, etc..). We have to think about what consumer would want there and if lots of flexibility is needed, they should be allowed to pass a component of their own.

from gutenberg.

keoshi avatar keoshi commented on June 3, 2024

I agree that we could build a unified design pattern, even if it's being shared between two different components:

  • Empty state, for no existing content yet.
  • No results found, for search/filtering.

Explored both of these in the context of A4A and have a few suggestions:

  • In the case of the empty state:
    • Add a primary CTA so that it demands action.
    • Disable search/filtering and view options since none can be applied.
  • In the case of the no results state:
    • Potentially add a β€œReset X” as the default action.
    • Disable view options since none can be applied.
  • Common:
    • Adding to option to include an illustration or an icon to the top.

Screenshots:
image
image

from gutenberg.

tyxla avatar tyxla commented on June 3, 2024

I wonder if it would make sense to implement this as a dedicated component, cc @WordPress/gutenberg-components.

Sounds like a very niche use case that I wouldn't recommend a generic component for. I don't see a good need for it because there's little to no interaction going on inside it. Also, there's a high chance that adding structure and providing a certain API won't cover certain use cases, making the component either useless or too limiting.

from gutenberg.

jameskoster avatar jameskoster commented on June 3, 2024

I think if we did that, it would make sense to be in dataviews package and just be a think wrapper with some base styles

Sounds good to me. The motivation is to be consistent in terms of design across data views, but still offer some flexibility. Features would likely include:

  • Slot for a graphic / icon (optional)
  • Heading
  • Description
  • Single primary action (optional)
  • Secondary actions (optional)

from gutenberg.

ntsekouras avatar ntsekouras commented on June 3, 2024

Sounds like we need some mockups then πŸ˜„

from gutenberg.

jameskoster avatar jameskoster commented on June 3, 2024

Yup we should make a detailed spec, the concepts shared already by Jarek and Filipe seem like good starting points.

from gutenberg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.