Hi,
admin pages like this
http://../admin/config/search/facetapi/search_api%40product/block/title/edit
have a suboptimal navigation.
Nice would be:
Tabs to "sibling" pages
http://../admin/config/search/facetapi/search_api%40product/block/title/edit
http://../admin/config/search/facetapi/search_api%40product/block/title/dependencies
http://../admin/config/search/facetapi/search_api%40product/block/title/filters
Breadcrumb parent should be
http://../admin/config/search/search_api/index/product/facets
Solution:
Tabs:
I'm not sure if local actions go well together with local tasks? I am totally inexperienced with local actions..
Breadcrumbs:
If the path were not admin/config/search/facetapi/.. but admin/config/search/search_api/facetapi/.., this would solve the problem, or not?
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | facetapiuifix.zip | 1.59 KB | donquixote |
Comments
Comment #1
cpliakas commentedHi donquixote.
I'm not completely clear on what the problem is. My gut tells me things are suboptimal, but it would be good to really spell it out in this issue. One thing to keep in mind is that we had to do some funky things to support contextual links, so that might be why local actions we added is seemingly inappropriate places. Review #1147588: Improve code for contextual links for more info.
Chris
Comment #2
donquixote commentedoh yes.. my issue summary really sucks :)
E.g. I get this breadcrumb
Home » Administration » Configuration » Search and metadata (» Configure facet display for Price » Amount)
and no tabs
Instead, breadcrumb should be
Home » Administration » Configuration » Search and metadata » Search API » Products index » Facets( » Price: Amount)
Tabs for the page should be
[Display] [Dependencies] [Filters] ...
Comment #3
cpliakas commentedGreat info. Thanks!
Yeah this seems wrong. It might be difficult to make breadcrumbs work correctly in Facet API since it works with multiple modules, but I am open for suggestions. If you search the monolog.admin.inc file for "drupal_set_breadcrumb", you will see that I had to do a ton of manipulation of breadcrumbs to make them work correctly. I suspect we will have to do that here as well.
Chris
Comment #4
donquixote commentedYou could write a Crumbs plugin :)
Then you only need to specify a few parent-child relationships that are not obvious from the path, and you are done.
Comment #5
donquixote commentedThis said, it might be better to restructure the paths in a way that they reflect the natural hierarchy. This will also improve the admin menu.
Comment #6
donquixote commentedThe following, combined with Crumbs, will give a nice breadcrumb on the facet config pages.
E.g. Home » Administration » Configuration » Search and metadata » Search API » Index: Products index » Facets »
Although, to get the "Index: Products index" to show up instead of just "View index", another implementation is necessary. This time it's search_api.
Comment #7
donquixote commentedActually the second part is not needed, if search api would fix this issue:
#2700879: Move search_api_admin_item_title() to main *.module file
The first part still totally works, and it would be nice if it could be added somewhere.
Comment #8
donquixote commentedMaybe it would be nice if the "admin/config/search/facetapi/%/%/%/edit" would be a "default local task", and "admin/config/search/facetapi/%/%/%" would be the tab root. This would allow jumping between the admin sub-pages of one facet.
Comment #9
donquixote commentedIf you want to support older PHP versions where closures are not possible, just register a regular callback function. Or create a class.
All the stuff can reside in the main facetapi.module file.
Comment #10
donquixote commentedComment #11
donquixote commentedI don't have time to write a patch atm.
But here is a module that I use myself to improve the UI of facetapi.
Should be not too hard to turn this into a patch..
Comment #12
donquixote commentedSee https://www.drupal.org/project/facetapiuifix
I think it is ok for now to have this as a distinct module, because it depends on Crumbs.