Adapter Catalogs can now contain InteractiveCatalogItems, in addition to plain CatalogItems. These new classes both support lazy-loading via a fetch_children() method and interactions defined as class variables.
The HarlequinDriver provides a simple interface for Adapters to take actions in the app
The DataCatalog has been totally refactored to load its nodes in the background
The Word and Member completers have been refactored to accept extensions to their catalogs after they are created.
The Catalog is no longer cached (this may change again in the future).
Why did you design your solution this way? Did you assess any alternatives? Are there tradeoffs?
Wanted an easy-ish API for adapter authors to implement both lazy loading and interactions
In the future I'd like to improve on the Completers (unloaded catalog items won't be available to the completers; it should be possible to cache completions but invalidation is hard for deleted objects)
Does this PR require a change to Harlequin's docs?
[x] Yes; I haven't opened a PR, but the gist of the change is: need to update the contributing guide for adapter authors at some point, probably with a new page for the catalog.
Did you add or update tests for this change?
[x] Yes.
[ ] No, I believe tests aren't necessary.
[ ] No, I need help with testing this change.
Please complete the following checklist:
[x] I have added an entry to CHANGELOG.md, under the [Unreleased] section heading. That entry references the issue closed by this PR.
[x] I acknowledge Harlequin's MIT license. I do not own my contribution.
Closes #491 Closes #213
What are the key elements of this solution?
Catalog
s can now containInteractiveCatalogItem
s, in addition to plainCatalogItem
s. These new classes both support lazy-loading via afetch_children()
method and interactions defined as class variables.HarlequinDriver
provides a simple interface for Adapters to take actions in the appDataCatalog
has been totally refactored to load its nodes in the backgroundWhy did you design your solution this way? Did you assess any alternatives? Are there tradeoffs?
Does this PR require a change to Harlequin's docs?
Did you add or update tests for this change?
Please complete the following checklist:
CHANGELOG.md
, under the[Unreleased]
section heading. That entry references the issue closed by this PR.