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

(#545) Update to better support advanced installation #910

Conversation

AdmiringWorm
Copy link
Member

Description Of Changes

This pull request updates the advanced installation view to better support those scenarios, by fixing a few bugs as well as adding some very basic disabling/hiding of arguments when they do not make sense to be used.

Additionally, there is a couple of bug fixes for the changing of the Languages that are used to prevent sources to be reloaded during language change, and to set the correct WPF Element languages.

Motivation and Context

This is done to better support scenarios where advanced installation is to be done, and to make it a bit easier for the user to know what can/should not be used together.

Testing

  1. Tested by installing different packages, with a mix of different features enabled and disabled.
  2. Tested by toggling features on and off to see that the expected elements was either disabled, or removed from the view.
  3. Tested that settings page could not be accessed when advanced installation window is open (and about section).
  4. Tested that changing a language when the last viewed page is the remote source did not trigger a reload of the packages.
  5. Tested that a cache directory can be set, and browsed to using the correct button.
  6. Tested that that changing the language would also correctly set the language (seen by navigating to a package details page after the change to see if the numbers and datetime is in the correct format).
  7. Probably something else as well, but can not remember.

NOTE: While the correct flow direction is also set, consider this unsupported still until there is feedback from users using a language with right to left support to figure out if it is correctly displayed or not.

Change Types Made

  • Bug fix (non-breaking change)
  • Feature / Enhancement (non-breaking change)
  • Breaking change (fix or feature that could cause existing functionality to change)
  • PowerShell code changes.

Related Issue

Fixes #545
A couple of bug fixes fo #533

Change Checklist

  • Requires a change to the documentation
  • Documentation has been updated
  • Tests to cover my changes, have been added
  • All new and existing tests passed. (There aren't any)
  • PowerShell v2 compatibility checked. (No PowerShell scripts have been touched)

This commit adds a new entry for the Cache Location when doing
advanced installations. This new entry allows the user to browse
to a directory to select the location where cached installers and
archives ends up.
This comit updates the configuration description when doing
advanced installation by removing the parts of the string
that need to be formatted with the value that have the
current configuration have as defaults.

Additional, the mention of which Chocolatey versions that
support the respective feature have been removed from
the view.
This commit adds support for specifying a specific log file path,
unfortunately as there are changes needed to be made in Chocolatey
CLI we are unable to enable this support for users at the moment.
This commit updates the code necessary to make the version
combobox editable while allowing the user to select the latest version,
or the version they opened the Advanced Installation window on.

Additionally, due to known issues with populating available versions for
the user (both on CCR, Nexus and Artifactory) fetching of remote versions
are disabled until further notice.
…d/closed

This commit updates the Dialog Service and the ShellView to make
sure that a dialog being open is marked correctly.

This is done to ensure that buttons for Settings and About views
are not clickable when the Advanced Installation window is open.
This commit fixes an issue where if the remote sources view was
selected before going into the settings view, when the language
is then changed it would reload the packages that was already
acquired which at some rare times could result in an endless
loop.

This fix changes that, to instead only reload the sources if the
remote sources view is active, and as thus checks for the sources
when the view gets activated the first time instead of during
the initialization phase.
This comit adds missing code that should have been set WPF
elements with the correct language code (and direction) when
a language is initially set, or when the language gets changed.

The right to left changes is not perfect, but until there is feedback
from users that uses such a locale it is the best we can do at the
moment.
@AdmiringWorm AdmiringWorm self-assigned this Jan 28, 2022
This commit updates the Advanced Installation view to disable
some features, and other arguments when they do not make sense
to be able to be passed.

As an example, when skip powershell is selected it do not make
sense to being able to input package parameters, installation arguments,
override arguments, pass in not silent or any of the checksum related
arguments.
This commit removes any trailing space, and fixes the xmlns statements
for the advanced installation view.
@AdmiringWorm AdmiringWorm force-pushed the 545-Allow-for-passing-in-package-parameters-/-installer-arguments-maybe-other-arguments-directly-to-choco branch from 98e2eac to 85da888 Compare January 28, 2022 17:13
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this isn't directly associated with the work that you have done here, there is one thing missing in the new advanced install function, and I think we should address it here in this PR...

Currently, within the Package View, the ability to click the Install command is controlled by this behaviour:

https://github.com/chocolatey/chocolateygui/blob/develop/Source/ChocolateyGui.Common.Windows/Views/PackageView.xaml#L86-L89

We should have the same behaviour on the install advanced command. If the user isn't allowed to install a package, they shouldn't be allowed to do an advanced install of a package. Can you get this added to this PR?

@gep13
Copy link
Member

gep13 commented Jan 31, 2022

Other than the above comment, this looks really good, and once fixed up, we can get this approved and merged.

This commit updates the install advanced button to add the
tooltip behavior to it when it is disabled.
This commit updates both the install and the advanced install
buttons to be disabled if the user running the application are
not allowed to install any backages (only relevant when a
Chocolatey licensed and Chocolatey GUI licensed extensions
are installed).
@AdmiringWorm
Copy link
Member Author

@gep13 the PR have been updated with your requested changes

@gep13 gep13 merged commit aab86b8 into chocolatey:develop Feb 1, 2022
@gep13
Copy link
Member

gep13 commented Feb 1, 2022

@AdmiringWorm thanks for getting this updated, and for verifying that this is all working as expected!

@AdmiringWorm AdmiringWorm deleted the 545-Allow-for-passing-in-package-parameters-/-installer-arguments-maybe-other-arguments-directly-to-choco branch February 1, 2022 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants