Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2015 at 21:17 UTC
Updated:
24 Nov 2024 at 19:59 UTC
Jump to comment: Most recent, Most recent file
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 commentedComment #3
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 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 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@todocomment).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
RenderedItemPropertyshould 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$expectedfield 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 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!
Comment #24
scott_euser commentedI know these issues are ancient, but I was trying to browse through the user interface related issues to see if there are any plans in place in general. We started leveraging Search API for the 'AI Search' sub-module of AI and have extended some form classes. Would be interested in contributing to modernising the 'Add fields' wizard/edit approaches to match Drupal Core more (also so things like Gin/Claro/etc all adapt nicely). Is this the best issue still to work from? Or start fresh with new issue and "Closed (outdated)" some of these old ones?
Comment #25
borisson_I think we can still work on this issue, or if we move to another issue we need to credit the people who helped already here. I think it's a safe move to reuse this issue.
Comment #26
drunken monkeyI agreee, please feel free to keep working in these old issues.
Comment #27
drunken monkeyComment #28
scott_euser commentedSounds good thanks both!
Comment #30
scott_euser commentedOkay I reviewed the options here. I think the Add/Edit fields screen needs more significant thought and rework to bring it more in line with drupal core forms to allow it to more easily feel at home in Claro/Gin so I am suggesting I create a separate issue for that (and work on it) and keep this limited to the original issue summary.
I have crossed out items that are no longer a problem (ie, over the last 7 years must have been fixed elsewhere) and I completed the ones that do exist.
Comment #31
scott_euser commentedFollow-up created here: #3484811: Improve the Search API admin UI for adding/editing fields
Comment #32
drunken monkeyThanks a lot, great job!
I just had some minor adjustments, the most relevant being that the
#disabledsetting on the “Enabled” checkbox makes even less sense now than before, so I removed it.If you are fine with these changes then I can merge. In any case, thanks a lot again!
Reviews from others of course also welcome.
Comment #33
scott_euser commentedThanks! Just gave your changes a quick run adding a new index again and all looks good. Code perspective, no concerns with the changes. And thanks for the quick review!
Comment #34
borisson_Haven't tested it out locally, but the code changes look great.
Comment #35
drunken monkeyGreat to hear, thanks for reviewing!
Merged.
Thanks again!
Comment #37
scott_euser commentedThanks for the quick review & merge!
Re the comment on raising an issue in Core, I raised that here now and added test coverage to demonstrate: #3486574: Ajax cannot be triggered from within a table row. Should I create a new MR here to update that comment?
Comment #38
scott_euser commentedAh whoops, cross posted on that last comment, was meant for #3484811: Improve the Search API admin UI for adding/editing fields sorry!