Skip to content

Conversation

@kemmerle
Copy link
Contributor

Description and Context

Randy S suggested this UX improvement via Slack.

Currently, if a customer runs the hs account auth command and declines to migrate or merge a deprecated config, we continue to create the new global config file and add an account to it. I've changed the behavior of the command to be more intuitive for the customer and give them more info.

Screenshots

If customer declines to migrate the deprecated config (and no global config exists):

Screenshot 2025-04-23 at 10 41 56 AM

If the customer declines to merge a deprecated and global config:

Screenshot 2025-04-23 at 10 47 44 AM

TODO

  • Address feedback

Who to Notify

@brandenrodgers @camden11 @joe-yeager

@brandenrodgers
Copy link
Contributor

Should we allow users to continue with authenticating a new account if they have an existing hubspot.config.yml file? Having both the global config and the current config files can lead to some confusing scenarios. I'm not sure that we should allow the users to continue in the flow if they choose "no".A

I also think we might want to take a look at the way we're explaining the command's behavior. It's not super clear what selecting "yes" in this prompt will do, or why the prompt is being shown.

@kemmerle kemmerle requested a review from joe-yeager April 24, 2025 18:43
@brandenrodgers
Copy link
Contributor

Looking at the feedback:

I kinda expected that if I say no to migration, things would stay as they are. I don’t think we should let the user keep going in that case. It should be more like, "either migrate or you can't add a new account." or we just keep using the old file

Rather than letting the user continue to migrate, we should just exit the command if they select the "no" option. That should lead to the fewest awkward edge-case scenarios. We should minimize the number of ways for people to get into a situation where they have both a non-global and a global config simultaneously. If they don't want to merge configs, then that's essentially saying that they aren't ready to opt into the new config.

If we do want to let the user continue to auth an account even though they have an existing hubspot.config.yaml file, we might want to turn this message into a warning to make it stand out more. We could also add some spacing above and below it. We should make it clear that the config will continue to exist, but it won't be used anymore because the global config takes precedence.

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.

lgtm!

@kemmerle kemmerle merged commit 8ece588 into main Apr 24, 2025
1 check passed
@kemmerle kemmerle deleted the fix/account-auth-bug branch April 24, 2025 22:04
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.

4 participants