Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/interactive catalog #657

Merged
merged 21 commits into from
Oct 9, 2024
Merged

feat/interactive catalog #657

merged 21 commits into from
Oct 9, 2024

Conversation

tconbeer
Copy link
Owner

@tconbeer tconbeer commented Oct 1, 2024

Closes #491
Closes #213

What are the key elements of this solution?

  • 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?

  • No.
  • Yes, and I have opened a PR at tconbeer/harlequin-web.
  • 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?

  • Yes.
  • No, I believe tests aren't necessary.
  • No, I need help with testing this change.

Please complete the following checklist:

  • I have added an entry to CHANGELOG.md, under the [Unreleased] section heading. That entry references the issue closed by this PR.
  • I acknowledge Harlequin's MIT license. I do not own my contribution.

@tconbeer tconbeer merged commit 24eff08 into main Oct 9, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CatalogItem and performance Right click for context menu in Data Catalog
1 participant