open-consul/ui-v2/tests/unit/mixins
John Cowen 74390f2d24 ui: Async Search (#4859)
This does several things to make improving the search experience easier
moving forwards:

1. Separate searching off from filtering. 'Searching' can be thought of
as specifically 'text searching' whilst filtering is more of a
boolean/flag search.
2. Decouple the actual searching functionality to almost pure,
isolated / unit testable units and unit test. (I still import embers get
which, once I upgrade to 3.5, I shouldn't need)
3. Searching rules are now configurable from the outside, i.e. not
wrapped in Controllers or Components.
4. General searching itself now can use an asynchronous approach based on
events. This prepares for future possibilities of handing off the
searching to a web worker or elsewhere, which should aid in large scale
searching and prepares the way for other searching methods.
5. Adds the possibility of have multiple searches in one
template/route/page.

Additionally, this adds a WithSearching mixin to aid linking the
searching to ember in an ember-like way in a single place. Plus a
WithListeners mixin to aid with cleaning up of event listeners on
Controller/Component destruction.

Post-initial work I slightly changed the API of create listeners:

Returning the handler from a `remover` means you can re-add it again if you
want to, this avoids having to save a reference to the handler elsewhere
to do the same.

The `remove` method itself now returns an array of handlers, again you
might want to use these again or something, and its also more useful
then just returning an empty array.

The more I look at this the more I doubt that you'll ever use `remove`
to remove individual handlers, you may aswell just use the `remover`
returned from add. I've added some comments to reflect this, but they'll
likely be removed once I'm absolutely sure of this.

I also added some comments for WithSearching to explain possible further
work re: moving `searchParams` so it can be `hung` off the
controller object
2019-05-01 18:21:34 +00:00
..
acl UI: Catch 500 error on token endpoint and revert to legacy tokens (#4874) 2018-11-02 14:44:36 +00:00
intention UI: Simplify/refactor the actions/notification layer (#4572) + (#4573) 2018-08-29 19:14:31 +01:00
kv UI: Simplify/refactor the actions/notification layer (#4572) + (#4573) 2018-08-29 19:14:31 +01:00
policy ui: Brings the new ACLs into line with the new repo folder structure (#4857) 2018-10-26 18:40:51 +01:00
token ui: Brings the new ACLs into line with the new repo folder structure (#4857) 2018-10-26 18:40:51 +01:00
click-outside-test.js UI V2 (#4086) 2018-05-10 19:52:53 +01:00
creating-route-test.js UI: New ACLs (#4789) 2018-10-19 08:45:05 -07:00
with-blocking-actions-test.js UI: Simplify/refactor the actions/notification layer (#4572) + (#4573) 2018-08-29 19:14:31 +01:00
with-filtering-test.js UI V2 (#4086) 2018-05-10 19:52:53 +01:00
with-health-filtering-test.js UI V2 (#4086) 2018-05-10 19:52:53 +01:00
with-listeners-test.js ui: Async Search (#4859) 2019-05-01 18:21:34 +00:00
with-resizing-test.js UI: Fixes healthy node listing resize on large portrait screens (#4564) 2018-08-24 12:35:52 +02:00
with-searching-test.js ui: Async Search (#4859) 2019-05-01 18:21:34 +00:00