Add a notes/info field to manifests.
jedieaston opened this issue ยท 3 comments
Description of the new feature/enhancement
An info/comment box to be added to manifests, that would be shown upon package installation.
Proposed technical implementation details (optional)
I want a space in a manifest where I can put a note that will be printed to the terminal upon the completion of package installation (or before, I suppose it doesn't matter). It doesn't need to be more than 240 characters (maybe even less than that). Just enough space to say "Google Chrome manages its own updates." or "The Windows ADK is required for most of the functionality in MDT to work. Install via winget install adk".
Chocolatey, npm, and scoop all have something similar. It may be good to have a flag in settings (or maybe just --skip-notes) to suppress it if people don't want to see them, but the character limit should be enough to make sure people don't put "jedieaston made this package!!1! check out my really cool medium blog here!" or something. And when the packages are checked into the repository, the maintainers could see them anyway and could filter.
Edit: in terms of implementation details, it would just be a new key in the YAML called "notes".
As this "shouldn't" interrupt the flow for silent install, I'm thinking of having this display after installation has completed. I also like the addition of "--suppress-notes" as a CLI argument, and a setting to perform the same action as a default, which would mean we would also need a "--display-notes" to override the setting. Maybe something like:
"displayOutput": {"postInstallNotes": "suppress"}
or
"displayOutput": {"postInstallNotes": "display"}
The "postInstallNotes" key should have a reasonable max length as you suggested. I'm leaning towards 128 256 characters initially. I tend to prefer powers of two. We should localize the "postInstallNotes" in the UI so it can be localized. That means it should also live in the defaultLocale.yaml and/or locale.yaml files.
Edited length based on the comment below.
I'm leaning towards 128 characters initially. I tend to prefer powers of two.
Sounds good to me. I only picked 240 because it's the length of a Tweet :)
edit: On second thought, there may be a case for them being a bit longer. A typical GitHub Issue link in winget-cli or winget-pkgs is ~50 characters or so, leaving only 70 characters to put a message. For example, I think something like this is reasonable as a note:
WinGet has issues determining the version number of Microsoft.Bob, as such, upgrades may not work correctly. See https://github.com/microsoft/winget-cli/issues/2031 for more info.
But it's 181 characters. Do you think we could bump it to 256? If not, we could document a preferred link shortener (although a random shortened link I can't see goes to GitHub may make me scared to click)