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

CA Admin and Commands: Use different colors on library install/update button/version #2970

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

chrieinv
Copy link
Contributor

If installation, or update, of a library fails in CA Admin, the user is now shown an alert with the error(s), previously it silently failed only logging to the console. The command for installing libraries has also been updated to display more details.

In CA Admin the update button and the install button now uses colours, these colours are also used in the commands:

  • Red => Library requires newer version of H5P Core, install/update will fail
  • Yellow => Library will replace currently installed version, i.e. patch update
  • Green => Library will be installed in addition to existing version

The command h5p:library-list required one of three arguments available, installed or outdated. If running without any argument it would just show an error, not telling what the available arguments where. The command is now split into three sub-commands and separate classes. This makes maintenance easier since the arguments had both common and unique options.

Old command New command
h5p:library-list available h5p:library-list:available
h5p:library-list installed h5p:library-list:installed
h5p:library-list outdated h5p:library-list:outdated

The commands h5p:library-install, h5p:library-list:available and h5p:library-list:outdated will not list libraries that require newer version of H5P Code unless option --ignore-core-version is given.

… button/version, show detailed error message if install/update fails
@github-actions github-actions bot added the Component: Content Author All issues that affect content author (sourcecode/apis/contentauthor) label Feb 12, 2025
@chrieinv chrieinv requested a review from emmachughes February 14, 2025 10:03
@chrieinv chrieinv merged commit eb94fc3 into master Feb 14, 2025
6 checks passed
@chrieinv chrieinv deleted the ca-admin-library-install-improvement branch February 14, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Content Author All issues that affect content author (sourcecode/apis/contentauthor)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants