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

Improve prompting behavior for hs custom-object create #1321

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

camden11
Copy link
Contributor

@camden11 camden11 commented Jan 7, 2025

Description and Context

We recently updated hs custom-object create to prompt users for a custom object's name and JSON definition path when not provided. When testing, I found the way we're currently prompting to be a bit confusing. The command currently asks for the path of the JSON definitions before asking what kind of object you want to create, which seems non intuitive. The prompt for the name of the custom object type is also misleading, asking what you'd like to name your schema when you're not actually creating a schema. I've fixed both of these things.

Screenshots

Before:
Screenshot 2025-01-07 at 5 05 03 PM

After:
Screenshot 2025-01-07 at 5 03 57 PM

Who to Notify

@brandenrodgers @kemmerle @joe-yeager

joe-yeager
joe-yeager previously approved these changes Jan 7, 2025
Copy link
Contributor

@joe-yeager joe-yeager left a comment

Choose a reason for hiding this comment

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

LGTM! Just one question on adding the flag to the prompt text

lang/en.lyaml Outdated
@@ -214,8 +214,8 @@ en:
describe: "Schema name to add the object instance to"
success:
objectsCreated: "Objects created"
inputSchema: "What would you like to name the schema?"
inputPath: "[--path] Where is the JSON file containing the object definitions?"
inputName: "Enter the name of the schema for the custom object(s) you'd like to create:"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we prefix this with [--name]?

Copy link
Contributor

@brandenrodgers brandenrodgers 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 much better 👌 good find

@camden11 camden11 merged commit 6191ed1 into main Jan 8, 2025
1 check passed
@camden11 camden11 deleted the update-hs-custom-object-create-prompt branch January 8, 2025 15:40
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.

3 participants