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

DYN-6337 Dropdown Show Version Descending #14828

Merged
merged 1 commit into from
Jan 11, 2024
Merged

DYN-6337 Dropdown Show Version Descending #14828

merged 1 commit into from
Jan 11, 2024

Conversation

RobertGlobant20
Copy link
Contributor

Purpose

I've modified the PackageVersions list so it will return the packages versions descending (as is shown in the package detail).
adding @dnenov since is mentioned in the Jira task

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

I've modified the PackageVersions list so it will return the packages versions descending (as is shown in the package detail).

Reviewers

@QilongTang

FYIs

@dnenov

I've modified the PackageVersions list so it will return the packages versions descending (as is shown in the package detail).
@RobertGlobant20
Copy link
Contributor Author

GIF showing the expected behavior.
EGoZh00gxc

Copy link

UI Smoke Tests

Test: success. 2 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests - net8.0

@@ -36,7 +36,7 @@ public int Votes
public string LatestVersion { get { return Header.versions != null ? Header.versions[Header.versions.Count - 1].version : String.Empty; } }
public string LatestVersionCreated { get { return Header.versions[Header.versions.Count - 1].created; } }

public IEnumerable<string> PackageVersions { get { return Header.versions.Select(x => x.version); } }
public IEnumerable<string> PackageVersions { get { return Header.versions.OrderByDescending(x => x.version).Select(x => x.version); } }
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need both OrderByDescending(x => x.version) and Select(x => x.version)? I thought only the first call is enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OrderByDescending(x => x.version) will return the PackageVersion object array and is expecting an string array that's why we need to use .Select(x => x.version)
image

@QilongTang QilongTang merged commit 06ac24b into DynamoDS:master Jan 11, 2024
20 of 21 checks passed
QilongTang pushed a commit that referenced this pull request Jan 11, 2024
I've modified the PackageVersions list so it will return the packages versions descending (as is shown in the package detail).
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.

2 participants