Skip to content

Move pin suggestion CTA to the project version message#1848

Merged
rwjblue merged 1 commit intovolta-cli:mainfrom
charlespierce:move_pin_cta
Aug 15, 2024
Merged

Move pin suggestion CTA to the project version message#1848
rwjblue merged 1 commit intovolta-cli:mainfrom
charlespierce:move_pin_cta

Conversation

@charlespierce
Copy link
Copy Markdown
Contributor

Closes #1847

Info

Currently, the call-to-action suggestion to use volta pin is printed as part of the "success" message on every call to volta install. However, that message is confusing when you aren't in a project. Additionally, it's only necessary if the current project itself has a pinned version of the tool.

We actually already have a message sent after installing if the project has an overlapping version: a note that the local version is different. This message seems like the ideal place to have the CTA, so that it lets users know what they can do to update the local version in case that's what they intended.

Changes

  • Removed the volta pin CTA from the info_installed message
  • Updated the info_project_version message to include a volta pin CTA
  • Updated calls to info_project_version to include the information about the newly-installed version as well.
  • Cleaned up some of the generic requirements and removed some unnecessary #[inline] attributes.

Tested

  • Ran locally both in and out of a package to verify the messages make sense in all scenarios

Screenshots

Outside of a package Volta message when run outside of a package
Inside a package with no pinned version Volta message when run in a package without a pinned version
Inside a package with a pinned version Volta message when run in a package with a pinned version

Currently, the call-to-action suggestion to use `volta pin` is printed
as part of the "success" message on every call to `volta install`.
However, that message is confusing when you aren't in a project.
Additionally, it's only necessary if the current project itself has a
pinned version of the tool.

We actually already have a message sent after installing if the project
has an overlapping version: a note that the local version is different.
This message seems like the ideal place to have the CTA, so that it lets
users know what they can do to update the local version in case that's
what they intended.
@rwjblue rwjblue merged commit 3f8f9fc into volta-cli:main Aug 15, 2024
@charlespierce charlespierce deleted the move_pin_cta branch August 16, 2024 17:54
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.

Helper CTA about install vs pin is confusing when not in a project

2 participants