-
Notifications
You must be signed in to change notification settings - Fork 126
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
Show a warning when there are multiple CLI installations #4629
Open
gonzaloriestra
wants to merge
13
commits into
main
Choose a base branch
from
multiple-installations-warning
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+107
−23
Open
Changes from 7 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1771fc8
Show a warning when there are multiple CLI installations
gonzaloriestra f435e23
Show a warning when there are multiple CLI installations
gonzaloriestra 03b39a6
Add changeset
gonzaloriestra c729022
Merge branch 'multiple-installations-warning' of https://github.com/S…
gonzaloriestra 447a25a
Remove console.log
gonzaloriestra 75fc0e9
Merge with current global CLI warning
gonzaloriestra ff9de0d
Clean up
gonzaloriestra a74f30b
Update documentation link
gonzaloriestra 5fd47d8
WIP
gonzaloriestra b6c6080
Update message to show current versions
gonzaloriestra 54cae9c
Merge branch 'main' into multiple-installations-warning
gonzaloriestra cb38917
Fix tests
gonzaloriestra 2b4fde9
Update message
gonzaloriestra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@shopify/cli-kit': patch | ||
'@shopify/app': patch | ||
--- | ||
|
||
Show a warning when there are multiple CLI installations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good, we might want to check this copy with product though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe link to this doc: https://shopify.dev/docs/apps/build/cli-for-apps#switch-to-a-global-executable-or-local-dependency
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jessehoek could you review this new message? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing! Can we use the headline to let the user know which one (and which version) will be used for the current command?
Eg
In the local case:
In the global case:
I think it's helpful to confirm which one is being used, and which version that is. Thoughts? Also, do we recommend removing the Global CLI if you are using the local one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! That makes total sense, and showing the versions will be very useful, because they are usually confused about what they are using.
About the recommendation, I think we prefer them to use the global CLI. And I guess most of the times they are using it by mistake. If they prefer to keep using that, they can check the documentation to uninstall the global one or simply ignore the warning.
One more doubt: is it ok to show this as an
info
banner? Or maybe better as awarning
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I might suggest a slight rewording then, so that it doesn't feel like a dev is doing something wrong if they really want to use the local dependency approach. And I think
info
works well, since there's not anything we know is dangerous or wrong.In the local case:
In the global case:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that looks much better. I've updated the code and the screenshot in the description. I've just changed two details:
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Small thing - For the very last line, is it possible to only make the "Shopify CLI documentation" text the link, instead of the whole sentence?