Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 May 2017 at 08:08 UTC
Updated:
1 Jul 2017 at 07:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jzavrl commentedJust did something similar regarding UX on the add fields page, can take a look at this as well.
Comment #3
jzavrl commentedHere we go. Are tests necessary for this kind of a cosmetic update? The only way I can think of testing this is with unit tests, run the same
uasortfunction and checking against the original array. If that would be necessary that is.Comment #4
borisson_I don't think we need tests. But I also don't see the need to add this to the interface. That only adds overhead. Let's make that method protected instead.
Comment #5
jzavrl commentedDo you mean completely remove the uasort callback from the
FieldsHelperor just from the interface?Comment #6
borisson_I'd suggest removing it from the interface, but maybe @drunken monkey feels differently.
Comment #7
jzavrl commentedHere is a patch without the interface addition. I do think however, it should be in the
FieldsHelperservice. Which would also mean to leave the method as public.Comment #8
jzavrl commentedReattached, to run the tests again (just to be sure).
Comment #9
drunken monkeyThanks a lot for the patch!
However, there are several problem with it, or at least things I'd prefer differently:
$a['label']['#markup']) to be included in a service. Let's just keep it on the form class.#themeafter sorting, we don't need those safety checks for unexpected structures being passed, but can just rely on the two compared items looking as they should.Revised patch attached, please test/review!
In any case, I agree, we don't need tests for that.
Comment #10
borisson_This looks good, makes it a lot slimmer. Would love to have @jzavrl confirm that this also works.
Comment #11
jzavrl commentedYou're right, I forgot about the nested properties. Patch looks good, confirming RTBC.
Comment #13
drunken monkeyThanks for the review and the confirmation, good to hear!
Committed.
Thanks again, everyone!