Sonataadminbundle: Make search results more ergonomic

Created on 14 Jun 2016  路  19Comments  路  Source: sonata-project/SonataAdminBundle

I have a project with a lot of admin classes.

So when we do a global search, we have this kind of result:

image

As you can see (or not), only one box has a result. This is hard to find it.

I'm thinking of two solution:

  • [ ] Colorize by default the boxes with results, with primary or info colors. An option to deactivate it may be added
  • [ ] Add a show_empty_boxes option for search. If set to false, only boxes with results will be shown

Another idea?

feature

Most helpful comment

Two proposition for colorized boxes, please vote:

:+1: for this one:

image

:-1: for this one:

image

I prefer the first one, the color is more explicit.

All 19 comments

Love your ideas 馃憤

maybe ordering them by the number of search results?

maybe ordering them by number of search results?

Not sure about that. Later, I would like to propose a feature to separate search result by section.

What's the point of showing empty boxes ?
The should never be shown IMO.

a feature to separate search result by section

The ability to query only a particular group would be also very nice.

The ability to query only a particular group would be also very nice.

Well, this will be a big change, let's start simple. :wink:

What's the point of showing empty boxes ?
The should never be shown IMO.

Empty boxes has link to create and/or go to list.

Plus, this permits to differentiate no-result boxes and not configured for search admins.

Two proposition for colorized boxes, please vote:

:+1: for this one:

image

:-1: for this one:

image

I prefer the first one, the color is more explicit.

And finally, the "Hide empty boxes" option would renders this:

image

What do you think?

Seems you prefer the first result for https://github.com/sonata-project/SonataAdminBundle/issues/3946#issuecomment-225869780.

But maybe primary color is to aggressive. I gave a try with info, it's smoother IMHO. Please vote:

:+1: for this:

image

:-1: for this:

image

Empty boxes has link to create and/or go to list.

Well then you could render boxes with results first, then the empty ones, so that relevant stuff comes first.

Or just have an option to allow empty box or not.

For my case, links on boxes are pointless. The option permits the users to have the choice.

And what about fading a bit the elements that contain no results?

Before

435acaf6-3240-11e6-8584-6a7e39f2a091_original

After

435acaf6-3240-11e6-8584-6a7e39f2a091_proposal

this looks awesome @javiereguiluz 馃憤

Nice idea @javiereguiluz! :+1:

Do you have the CSS part of what you did?

Maybe we can use a library like Masonry to fill the empty spaces too

Maybe we can use a library like Masonry to fill the empty spaces too

Would be a cool feature 馃憤

@Soullivaneuh @OskarStark @core23 Hello, guys. Any news about this feature?

Feel free to start @muspelheim 馃憤

@core23 ok, I will try to implement this.

I suggest implement 3 types of behaviors
1) show - all block will be show on result screen.
2) hide - hide empty blocks
3) fade - add opacity and gray color to empty blocks

  • Masonry looks pretty good here.

So, I implement this feature and in bottom you can see the result:

show option
show

fade option
fade

hide option
hide

what do you think about it? may be need some changes?

sry, I replaced all private info, and some buttons was removed (counter of search results and buttons, but it here 馃 )

Was this page helpful?
0 / 5 - 0 ratings