Various fixes and improvements by popara96 · Pull Request #582 · GlitchEnzo/NuGetForUnity (original) (raw)
I apologize upfront for a bit larger PR. Wanted to fix a couple of small things but one thing led to another and we ended up with this. Basically the only 'larger' change here is how the Update tab works, and how the tab responsibilities are split, other than that it's really just minor fixes.
Changes introduced:
Fixed
refreshAssetspropagation
We are now refreshing assets only for the topmost package when installing/updating packages. This will make sure that while installing or updating we refresh the assets only once. It also fixes one dependency being marked as explicit wrongly during installation.
2. ### Fixed update tab for V2 packages
Until now every version of the package newer than the version installed was shown as a separate package. This is now fixed by showing the dropdown selection list (similar to how V3 looks), with stacking Release Notes in the Details section showing release notes for every newer version in descending order.
3. ### Cleaner tab responsibilities
Every tab now has a separate reponsibility depending on what it should do:
Onlinetab will show dropdown list of versions along withInstallbutton if the package is not installed, otherwise it will only showInstalled Versionto indicate what is already installed.Installedtab shows what version is installed and options to uninstall packages or mark dependencies as explicit packages.Updatestab shows installed version and shows, in a dropdown list, selection of newer versions withUpdatebutton (ifShow Downgradesis not checked), or lower versions withDowngradebutton (ifShow Downgradesis checked).Update Allbutton is now shown only ifShow Downgradesis not checked as we don't want to offer downgrading all packages at once. Default selected versions in dropdown lists are always the highest newer or highest lower version, depending on the checkbox, and the dropdown does NOT contain the currently installed version.
NOTE: when fetching packages, list of versions is now packed in descending instead of ascending order. This is done so we don't have to sort them by descending order every time we refresh the dropdown list of available packages, so as not to throttle the UI.
Fixed finding best framework group dependencies
Small fix that caches the framework group after we first find it, this also fixes logging the best target framework group every time we expand Details on a package.