Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In order to get some inspiration for the Rules UI in Drupal 8, we took a look at the current Search API 8.x UI. Great work so far, here is a list of suggestions to make it even better :)
Feel free to tackle them right away or fork them out into smaller tickets.
- use checkboxes instead of multiselect when creating an index
- if there are no bundle options, hide the configuration option when creating an index
- no server - should be selected by default when configuring an index (or the available sever, if there's just one)
- the "No server" option is never selected by default – some bug in the code
- the enabled checkbox should be dependent on the server “- no server -” option via states & make sure to disable if no server is selected.
- when configuring aggregated fields, the new fields dialog has little vertical space & scrollbars might be hidden (test on mac). instead, probably try the views add/select field/filter modal.
- in order to add a “related field” the user entity via “authored by” on a fields configuration, you first have to add authored by uid and only then can add :entity. this should be easier :)
- column priorities for responsive tables would be helpful for all tables in the search api admin ui
- currently the fields ui can be biiiiiig and no filters are available. 1) we could use views add/select dialogs, so that non-enabled fields aren’t displayed by default 2) we could add some quick filter like on the module admin page
- Change the "Index status" percentage to only show 1 digit after the decimal point.
Comment | File | Size | Author |
---|---|---|---|
#22 | suggestions_for-2471184-22.patch | 17.21 KB | edurenye |
#18 | interdiff-2471184-16-18.txt | 1.23 KB | vasike |
#18 | 2471184-18--ui_improvements.patch | 17.29 KB | vasike |
#16 | 2471184-16--ui_improvements.patch | 17.14 KB | drunken monkey |
Comments
Comment #1
Nick_vhCompletely Agree
Duh! Agreed ;-)
If there is only 1 server, that one should be selected by default.
Agreed
This is duplicate of some other issues such as #2254749: Improvements for UI in fields tab of index configuration and #2247885: Improve UI for fields with multiple properties and/or references, #2230899: UX improvements for the "Fields" tab. Please continue that conversation about the fields UI there.
Thanks for the great suggestions, are you willing to patch some of them?
Comment #2
justinchev CreditAttribution: justinchev commentedComment #3
justinchev CreditAttribution: justinchev commentedWill change this to checkboxes. Will also put in an 'open' collapsible fieldset as this list could get quite long for some sites.
By bundles do you mean the 'data types'?
Will look into this
Will look at this.
There are a couple of copy changes I will make (if you agree):
Will see if I come up with anything else
Comment #4
drunken monkeyThanks for working on this!
No. Once you click, e.g., "Comment" in the list of data types (we should really change that to "datasources", though), you get a new fieldset via AJAX containing options for that datasource. These contain the entity type's bundles. But if you have no comment bundles configured yet, it will still show the fieldset but with an empty list of bundle checkboxes.
(If an entity type doesn't support bundles at all, the whole form is already correctly hidden. We should do the same if a type supports bundles but doesn't have any yet.) (I'm not sure what we should do if there is only a single bundle, but I think we should err on the side of caution and display it then.)
I would remove the comma there.
The other suggestion is fine.
Comment #5
drunken monkeyI don't see the suggestion about responsive column priorities anywhere yet, and that would definitely make sense.
Also, it's true that we already have several issues outlining the (partially overlapping) UI reviews and recommendations of various people, but a glaring shortage of people actually implementing those suggestions.
So, I think working on them anywhere is fine. Optimally, of course, we'd go through them and bundle them either into a single one, or into one meta issue and linked child issues, and in any case close all the other ones. But as long as we don't do that, working in any of them doesn't really worsen the chaos.
Comment #6
justinchev CreditAttribution: justinchev commentedSorry to do this but I think I was a little 'over-ambitious' in trying to pick this up (being more of a front-ender). Got me into reading up on OOP and the D8 API's and stuff but think I've got quite a way to go before I'm able to decipher exactly what is going on in the module code.
What I can tell you is...
This isn't as simple as changing the $form['datasources'] type to checkboxes. Although it does change it to using checkboxes, the Ajax doesn't work. I did quite a lot of tinkering to try get it working but no joy. Might be that Ajax on checkboxes doesn't work at the moment. See the very end of this post where he says Ajax is only working with Select element http://enzolutions.com/articles/2014/11/25/how-to-work-with-drupal-8-for...
For anyone looking into this it's in /src/Form/IndexForm.php around line 220
Comment #7
giorgio79 CreditAttribution: giorgio79 commented++ Just tested the current version, and I had to select nid or some other kind of field to have custom fields that I added appear as related fields...
++++ Perhaps some kind of grouping by content type would be great as well instead of dumping all the entity bundle fields... I would imagine most users work within the node entity and 3-4 content types can really elongate the list.
Comment #8
drunken monkeyChange the "Index status" percentage to only show 1 digit after the decimal point.
Comment #9
drunken monkeyComment #10
drunken monkeyThe attached patch implements most of these suggestions. Please test and review!
Unfortunately, I currently don't have a web server at hand, so it's completely untested.
One thing I'm pretty sure will still be broken is the states of the index "status" checkbox. The code in
states.js
(around line 480) looks like it actually should work, but apparently it doesn't (according to the@todo
comment).Is this still a problem?
I also created #2863453: Use a modal dialog or some other user-friendly means of selecting aggregated fields, since that's a significantly more complicated task. Otherwise, all the suggestions here should be either implemented in my patch or out-dated (quite a few of them).
Comment #12
drunken monkeyMaybe like this?
Otherwise, contains some debugging for
IntegrationTest
.Comment #14
drunken monkeyComment #16
drunken monkeyPerhaps like this?
Comment #18
vasikethere some updates for the first fail with the patch #16.
interdiff included.
It's about the missing anonymous value both from submission and configuration.
Also there is a user entity for the testing index.
+ there are some roles i can't figured out where they come from.
toDo: fix the second test failure.
Comment #20
drunken monkeyNice work, thanks for figuring that out!
However, as I tried to explain to you in person, the
RenderedItemProperty
should actually process the form values it receives and just save a numerically indexed array of roles, not the raw key-value data it gets from the checkboxes. The$expected
field config should then also just contain the single array value,'authenticated'
. That would also solve the current processor integration test fail. (The additional roles are created by the test class when creating users with specific permissions.)Regarding the other fail, in
IntegrationTest
, it would be great if someone could run the test and check which items are left in the tracking table at the point where it fails. Are they from some other index, for example?Comment #21
drunken monkeySorry, didn't mean to change the status.
Comment #22
edurenye CreditAttribution: edurenye at ENDPHASYS Technologies commentedRebased.
Comment #23
drunken monkeyCould one of the UI experts in here maybe take a look at this: #2939405: Better UI text on what is included in the index? Thanks!