Skip to content

Commit

Permalink
Pm search for packages - filters (#14322)
Browse files Browse the repository at this point in the history
* Initial PR transition

- moving 'SearchForPackages' PR into smaller PRs
- main chunk of work on the PackageManagerSearchControl
-- context menu
-- filter tags

* filter search results

- added all filters to the GetAllPackages routine

* `new` and `updated` status filters, removed `active`

- removed the `active` filter
- introduced `new` and `updated` as status filters

* clear all button to resources

- added 'clear all' to resources

* remove initially selected package

- no selected package when opening the package manager for the first time

* clear filters button resource assigned

- correctly assigned the `clear all` button text

* refactor

- replaced boolean propertie representing the new filters with FilterEntity

* added tests

- added tests for the new filters

* stylize control components

- standardized ui element styles

* fixed failing tests

* filters context menu stay open

- the user will be able to select multiple filters without the context menu closing

* dependency filters toggle active states

- the two dependency filters (package 'has decency' and 'has no dependency') cannot be both in positive states
- adjusted tests to take that change into account

* comments

- reverted default sorting back to `LastUpdate`

* filter tooltips

- added tooltips for all new filters,
- updated old filters,
- changed styling

* reconciling differences

* reconciling differences

* comments for FilterTagControl public properties

- added comments for the public properties of the FilterTagControl

* nameof instead of string

- replaced hard-coded string value with nameof property
  • Loading branch information
dnenov authored Sep 13, 2023
1 parent dea73fb commit 9abe5ef
Show file tree
Hide file tree
Showing 14 changed files with 1,179 additions and 96 deletions.
10 changes: 10 additions & 0 deletions src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<None Remove="Packages\SplashScreen\build\index.bundle.js" />
<None Remove="Packages\SplashScreen\build\index.html" />
<None Remove="UI\Images\Canvas\canvas-button-geometry-scaling.png" />
<None Remove="UI\Images\close_16px.png" />
<None Remove="UI\Images\caret_drop_down.png" />
<None Remove="UI\Images\NodeStates\package-64px.png" />
<None Remove="UI\Images\PackageManager\empty-state-first-use-light-gray.png" />
Expand Down Expand Up @@ -432,6 +433,7 @@
<DependentUpon>SurveyPopupWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Input\ParameterEditor.cs" />
<Compile Include="Views\PackageManager\Controls\FilterTagControl.xaml.cs" />
<Compile Include="Views\PackageManager\Controls\LoadingAnimationStripeControl.xaml.cs" />
<Compile Include="Views\PackageManager\Controls\NumericUpDownControl.xaml.cs" />
<Compile Include="Views\PackageManager\Controls\PackageManagePackageAnimationControl.xaml.cs" />
Expand Down Expand Up @@ -643,6 +645,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\PackageManager\Controls\FilterTagControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Menu\TrustedPathView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -788,6 +794,7 @@
<Resource Include="UI\Images\caret_drop_down.png" />
<Resource Include="UI\Images\caret_up.png" />
<EmbeddedResource Include="Views\GuidedTour\HtmlPages\Resources\ArtifaktElement-Regular.woff" />
<Resource Include="UI\Images\close_16px.png" />
<Resource Include="UI\Images\cursors.psd" />
<Resource Include="UI\Images\cursors1.psd" />
</ItemGroup>
Expand Down Expand Up @@ -1713,6 +1720,9 @@
<Resource Include="UI\Images\not-authenticated.png" />
</ItemGroup>
<ItemGroup>
<None Update="Views\PackageManager\Controls\FilterTagControl.xaml">
<Generator>MSBuild:Compile</Generator>
</None>
<None Update="Views\PackageManager\Controls\NumericUpDownControl.xaml">
<Generator>MSBuild:Compile</Generator>
</None>
Expand Down
119 changes: 118 additions & 1 deletion src/DynamoCoreWpf/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 40 additions & 1 deletion src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1710,13 +1710,52 @@ Next assemblies were loaded several times:
<data name="PackageUploadStateUploading" xml:space="preserve">
<value>Uploading...</value>
</data>
<data name="PackageFilterByHost" xml:space="preserve">
<value>HOST</value>
</data>
<data name="PackageFilterByStatus" xml:space="preserve">
<value>STATUS</value>
</data>
<data name="PackageFilterNewTooltip" xml:space="preserve">
<value>Published in the last 30 days</value>
</data>
<data name="PackageFilterUpdatedTooltip" xml:space="preserve">
<value>Updated in the last 30 days</value>
</data>
<data name="PackageFilterDeprecatedTooltip" xml:space="preserve">
<value>Discontinued packages</value>
</data>
<data name="PackageFilterByDependency" xml:space="preserve">
<value>DEPENDENCY</value>
</data>
<data name="PackageFilterHasDependenciesTooltip" xml:space="preserve">
<value>Packages that require other packages to be installed</value>
</data>
<data name="PackageFilterHasNoDependenciesTooltip" xml:space="preserve">
<value>Stand-alone packages</value>
</data>
<data name="PackageSearchViewContextMenuFilterActive" xml:space="preserve">
<value>Active</value>
</data>
<data name="PackageSearchViewContextMenuFilterDeprecated" xml:space="preserve">
<value>Deprecated</value>
</data>
<data name="PackageSearchViewContextMenuFilterDependencies" xml:space="preserve">
<value>Has dependecies</value>
</data>
<data name="PackageSearchViewContextMenuFilterNoDependencies" xml:space="preserve">
<value>Has no dependecies</value>
</data>
<data name="PackageUseNewerDynamoMessageBoxTitle" xml:space="preserve">
<value>Package Uses Newer Version of {0}!</value>
</data>
<data name="PackageWarningMessageBoxTitle" xml:space="preserve">
<value>Package Warning</value>
<comment>Message box title</comment>
</data>
<data name="PackageManagerClearAllButtonText" xml:space="preserve">
<value>Clear all</value>
</data>
<data name="Periodic" xml:space="preserve">
<value>Periodic</value>
</data>
Expand Down Expand Up @@ -2187,7 +2226,7 @@ Uninstall the following packages: {0}?</value>
<value>Filter packages that depend on applications outside Dynamo. This feature currently can only filter packages which have been marked manually by package authors during publish.</value>
</data>
<data name="PackageHostDependencyFilterContextItem" xml:space="preserve">
<value>Packages contain node(s) that depend on specified application outside Dynamo.</value>
<value>Packages that depend on selected external application</value>
</data>
<data name="MessageUninstallSamePackage" xml:space="preserve">
<value>"The package {0} is already installed. To reinstall it, you must first uninstall it and restart to complete the uninstall. Would you like to mark {0} for uninstall?"</value>
Expand Down
41 changes: 40 additions & 1 deletion src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,9 @@ To avoid unintended behavior, uninstall the conflicting loaded package(s), resta
<value>Package Warning</value>
<comment>Message box title</comment>
</data>
<data name="PackageManagerClearAllButtonText" xml:space="preserve">
<value>Clear all</value>
</data>
<data name="UnsavedChangesMessageBoxTitle" xml:space="preserve">
<value>Unsaved changes</value>
</data>
Expand Down Expand Up @@ -1526,6 +1529,42 @@ If the toggle is off custom packages that are not already loaded will load once
<data name="PackageUploadStateUploading" xml:space="preserve">
<value>Uploading...</value>
</data>
<data name="PackageFilterByHost" xml:space="preserve">
<value>HOST</value>
</data>
<data name="PackageFilterByStatus" xml:space="preserve">
<value>STATUS</value>
</data>
<data name="PackageFilterNewTooltip" xml:space="preserve">
<value>Published in the last 30 days</value>
</data>
<data name="PackageFilterUpdatedTooltip" xml:space="preserve">
<value>Updated in the last 30 days</value>
</data>
<data name="PackageFilterDeprecatedTooltip" xml:space="preserve">
<value>Discontinued packages</value>
</data>
<data name="PackageFilterHasDependenciesTooltip" xml:space="preserve">
<value>Packages that require other packages to be installed</value>
</data>
<data name="PackageFilterHasNoDependenciesTooltip" xml:space="preserve">
<value>Stand-alone packages</value>
</data>
<data name="PackageFilterByDependency" xml:space="preserve">
<value>DEPENDENCY</value>
</data>
<data name="PackageSearchViewContextMenuFilterActive" xml:space="preserve">
<value>Active</value>
</data>
<data name="PackageSearchViewContextMenuFilterDeprecated" xml:space="preserve">
<value>Deprecated</value>
</data>
<data name="PackageSearchViewContextMenuFilterDependencies" xml:space="preserve">
<value>Has dependecies</value>
</data>
<data name="PackageSearchViewContextMenuFilterNoDependencies" xml:space="preserve">
<value>Has no dependecies</value>
</data>
<data name="PortViewContextMenuUserDefaultValue" xml:space="preserve">
<value>Use Default Value</value>
</data>
Expand Down Expand Up @@ -2462,7 +2501,7 @@ Uninstall the following packages: {0}?</value>
<value>Sort Packages.</value>
</data>
<data name="PackageHostDependencyFilterContextItem" xml:space="preserve">
<value>Packages contain node(s) that depend on specified application outside Dynamo.</value>
<value>Packages that depend on selected external application</value>
</data>
<data name="MessageUninstallSamePackage" xml:space="preserve">
<value>"The package {0} is already installed. To reinstall it, you must first uninstall it and restart to complete the uninstall. Would you like to mark {0} for uninstall?"</value>
Expand Down
Binary file added src/DynamoCoreWpf/UI/Images/close_16px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9abe5ef

Please sign in to comment.