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

Initial catalog implementation #2815

Merged
merged 24 commits into from
Dec 8, 2023
Merged

Conversation

levkohimins
Copy link
Contributor

@levkohimins levkohimins commented Nov 30, 2023

Description

Add a new CLI command catalog that launches the user interface for searching and managing Terraform modules.

Fixes #2796.

Copy link
Member

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is terrific! I left a bunch of comments.

High level question: do we have some sort of integration test that shows the catalog command really works? That is, downloads a repo, parses the code, shows the table, etc?

cli/app_test.go Show resolved Hide resolved
cli/commands/catalog/action.go Outdated Show resolved Hide resolved
cli/commands/catalog/command.go Outdated Show resolved Hide resolved
cli/commands/catalog/module/repo.go Outdated Show resolved Hide resolved
cli/commands/catalog/module/repo.go Outdated Show resolved Hide resolved
),
Filter: key.NewBinding(
key.WithKeys("/"),
key.WithHelp("/", "filter"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "filter / search"? I think some folks will be looking for the word "search."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, what content is getting indexed? Is it just the README for each module? The module name and folder name? Something else? And is it doing exact matches? Or fuzzy matching? Case sensitive?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "filter / search"? I think some folks will be looking for the word "search."

It's better to set only one of them, otherwise / can be confused with a hotkey

1  tmuxinator local 2023-12-07 at 10 33 29 PM

I renamed to "search", I agreed it's clearer.

Also, what content is getting indexed? Is it just the README for each module? The module name and folder name? Something else? And is it doing exact matches? Or fuzzy matching? Case sensitive?

Only the module name is indexed with fuzzy and case-insensitive matching.

1  tmuxinator local 2023-12-07 at 10 42 40 PM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roger!

Could you add a follow-up ticket to index the module README as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, created the GH issue #2833.

docs/_docs/04_reference/cli-options.md Outdated Show resolved Hide resolved
docs/_docs/04_reference/cli-options.md Outdated Show resolved Hide resolved
docs/_docs/04_reference/cli-options.md Outdated Show resolved Hide resolved
cli/commands/catalog/tui/models/page/model.go Outdated Show resolved Hide resolved
@levkohimins levkohimins requested a review from brikis98 December 7, 2023 22:30
brikis98
brikis98 previously approved these changes Dec 8, 2023
Copy link
Member

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Let's get this shipped 🎉

@brikis98
Copy link
Member

brikis98 commented Dec 8, 2023

Ah, but make sure tests pass before merging!

@levkohimins
Copy link
Contributor Author

LGTM! Let's get this shipped 🎉

Thanks for the review!

@levkohimins levkohimins requested a review from brikis98 December 8, 2023 17:31
Copy link
Member

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woot! Ship it!

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.

Implement catalog command
2 participants