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

Pm search for packages - filters #14322

Merged
merged 22 commits into from
Sep 13, 2023
Merged

Conversation

dnenov
Copy link
Collaborator

@dnenov dnenov commented Aug 25, 2023

Purpose

Continuation of the work done on the Package Manager. This PR focuses on the implementation of new Filters in the first tab of the PM - the Search for Packages tab.

  • 3 new subcategories of filters created:
  1. Host (existing filters)
  2. Status (New, Updated, Deprecated)
  3. Package Dependency (with and without dependencies)

Filter tag bubbles added to the UI with the expected functionality.

UI Changes

Screenshot 2023-09-13 132510

filters - dependency, no dependency toggle

filter stay open

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

  • new context menu items added to the Filters menu
  • Sorting changed - default priority now to 'votes reverted back to last update
  • FilterTag bubble custom control created
  • clear all button clears all currently applied filters
  • no selected package when opening the package manager for the first time
  • standardized UI styles
  • uses FilterEntity between host and non-host filters (reusing the logic of the existing host filter VM as much as possible)
  • the filter context menu now stays open while the user interacts with it allowing multiple filters to be applied consecutively
  • has dependency and has no dependency filters toggle each other out, if positive (they are mutually exclusive)

Reviewers

@QilongTang
@reddyashish

FYIs

@Amoursol

dnenov added 6 commits August 25, 2023 16:13
- moving 'SearchForPackages' PR into smaller PRs
- main chunk of work on the PackageManagerSearchControl
-- context menu
-- filter tags
- added all filters to the GetAllPackages routine
- removed the `active` filter
- introduced `new` and `updated` as status filters
- added 'clear all' to resources
- no selected package when opening the package manager for the first time
- correctly assigned the `clear all` button text
@QilongTang QilongTang added this to the 3.0 milestone Aug 29, 2023
dnenov added 3 commits August 29, 2023 19:11
- replaced boolean propertie representing the new filters with FilterEntity
- added tests for the new filters
- standardized ui element styles
@dnenov dnenov marked this pull request as ready for review August 30, 2023 08:25
- 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
- reverted default sorting back to `LastUpdate`
Copy link
Contributor

@QilongTang QilongTang left a comment

Choose a reason for hiding this comment

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

Some comments then LGTM, also some merge conflicts because the version PR merged today

- added tooltips for all new filters,
- updated old filters,
- changed styling
- added comments for the public properties of the FilterTagControl
/// `Has Dependency` and `Has No Dependency` filters are mutually exclusive
/// </summary>
[Test]
public void PackageSearchDialogSearchTestDependencyFilters()
Copy link
Contributor

Choose a reason for hiding this comment

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

@dnenov Thank you for covering these tests.

- replaced hard-coded string value with nameof property
//private bool showDeprecated;
//private bool showDependencies;
//private bool showNoDependencies;
//private bool isAnyFilterOn;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this commented code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, absolutely, sorry for the mess.

Copy link
Contributor

@QilongTang QilongTang left a comment

Choose a reason for hiding this comment

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

LGTM with one minor comment left. Also @dnenov can you remind me if we covered the fix that first time launching Dynamo PM the first package entry is always highlighted somewhere?

@dnenov
Copy link
Collaborator Author

dnenov commented Sep 13, 2023

LGTM with one minor comment left. Also @dnenov can you remind me if we covered the fix that first time launching Dynamo PM the first package entry is always highlighted somewhere?

Yup, we did it in this commit part of this PR. The initial index is set to -1.

@QilongTang QilongTang merged commit 9abe5ef into DynamoDS:master Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants