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

Sort workflow versions based on SemVer parts #158

Merged
merged 3 commits into from
Jun 13, 2019

Conversation

johnbradley
Copy link
Contributor

@johnbradley johnbradley commented Jun 13, 2019

Adds versionSort computed field to workflow-version following the
sorting pattern used in bespin-api for sorting workflow-versions.
Changes version sorting to use this new field for routes:

  • /new/select-workflow-version/<workflow_id> - select a workflow version
  • /workflows - lists workflow versions for each workflow

Started using @each annotation to populate 'version' field in computed lists:
https://guides.emberjs.com/v2.12.0/object-model/computed-properties-and-aggregate-data/
The bug in question was only visible when viewing cached workflow versions due to
sorting done by bespin-api and the 'version' fields being null during
sort('version') operation.

Added ember-pad to work around PhantomJS missing String.padStart.

Fixes #148

Adds versionSort computed field to workflow-version following the
sorting pattern used in bespin-api for sorting workflow-versions.
Changes version sorting to use this new field for routes:
- /new/select-workflow-version/<workflow_id> - select a workflow version
- /workflows - lists workflow versions for each workflow

Started using @each annotation to populate 'version' field in computed lists:
https://guides.emberjs.com/v2.12.0/object-model/computed-properties-and-aggregate-data/
The bug in question was only visible when viewing cached workflow versions due to
sorting done by bespin-api and the 'version' fields being null during
sort('version') operation.
@johnbradley johnbradley requested a review from dleehr June 13, 2019 13:41
Copy link
Member

@dleehr dleehr left a comment

Choose a reason for hiding this comment

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

I had an existing branch to fix this issue but never made it to a PR -148-fix-version-sort. At first I was confused about how you created a different branch with the same name, but I see this one has a small typo.

Mine didn't make it into a PR yet is because of PhantomJS issues (referenced in #154) about padStart, but it looks like you found another package to address that.

It's interesting to see the different approaches though :)

@johnbradley johnbradley merged commit 7fccc90 into master Jun 13, 2019
@johnbradley johnbradley deleted the 148-fix-verison-sort branch June 13, 2019 17:30
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.

version being sorted alphabetically
2 participants