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

UX: Sort plugin list and plugin search output by plugin name #646

Merged

Conversation

chandrareddyp
Copy link
Contributor

@chandrareddyp chandrareddyp commented Jan 16, 2024

What this PR does / why we need it

This pull request sorts the plugin list output first by plugin name, and then by plugin target. Sorting the list by name and then target provides a better user experience for the end user by organizing the plugins in a consistent and easy to scan order.

Which issue(s) this PR fixes

Fixes #

Describe testing done for PR

Before the fix, the tanzu plugin list output was not sorted by the plugin's name and then target. After applying the fix, the plugins list output is now sorted by plugin name first, and then by target.

  1. E2E tests are added.
  2. Manual testing has done for tanzu plugin list, below is the output:
    2.a) Before Fix: tanzu plugin list output:
    image

2.b) After Fix: tanzu plugin list output:
You can see the plugins has been sorted by plugin name's, and the 'cluster' plugin has been sorted by target.
image

  1. Manual testing has done for tanzu plugin search, below is the output:
    3.a) Before fix: tanzu plugin search output:
    image
    3.b) After Fix: tanzu plugin search output:
    image

Release note

The `tanzu plugin list` and `tanzu plugin search` outputs are now sorted by plugin names instead of by targets.

Additional information

Special notes for your reviewer

Copy link
Contributor

@marckhouzam marckhouzam left a comment

Choose a reason for hiding this comment

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

The PR also improves the list order for tanzu plugin search. Could you mention that in the PR description and especially in the release notes?

Could you make the release notes more clear? The current message: "The tanzu plugin list output is now sorted by plugin names and targets." does not convey what changed for someone not close to the CLI. How about saying "The tanzu plugin list and tanzu plugin search outputs are now sorted by plugin names instead of by targets." Note that I don't think you need to mention the second sort criteria: the users will mostly pay attention to the main sorting criteria.

The code LGTM
Thanks!

@chandrareddyp
Copy link
Contributor Author

chandrareddyp commented Jan 18, 2024

The PR also improves the list order for tanzu plugin search. Could you mention that in the PR description and especially in the release notes?

Could you make the release notes more clear? The current message: "The tanzu plugin list output is now sorted by plugin names and targets." does not convey what changed for someone not close to the CLI. How about saying "The tanzu plugin list and tanzu plugin search outputs are now sorted by plugin names instead of by targets." Note that I don't think you need to mention the second sort criteria: the users will mostly pay attention to the main sorting criteria.

The code LGTM Thanks!

@marckhouzam thank you for suggestion, actually i though of addressing the tanzu plugin search in separate PR, but the same sort logic code is being used for both, so i have added e2e tests for both use cases.

Yes i have updated the release note. thanks.

@chandrareddyp chandrareddyp changed the title UX: Sort plugin list output by plugin name UX: Sort plugin list and plugin search output by plugin name Jan 18, 2024
@chandrareddyp chandrareddyp merged commit 7eb5dff into vmware-tanzu:main Jan 18, 2024
7 checks passed
@marckhouzam marckhouzam added this to the v1.2.0 milestone Jan 18, 2024
vuil pushed a commit to vuil/tanzu-cli that referenced this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants