-
Notifications
You must be signed in to change notification settings - Fork 0
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
FF-2465 Make orderPosition 1-indexed to match UI #105
FF-2465 Make orderPosition 1-indexed to match UI #105
Conversation
09d83f2
to
ebed05a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love how you're thinking of making this as user-friendly as possible!
@@ -62,7 +62,7 @@ export class Evaluator { | |||
unmatchedAllocations.push({ | |||
key: allocation.key, | |||
allocationEvaluationCode: code, | |||
orderPosition: i, | |||
orderPosition: i + 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -103,16 +103,17 @@ export class FlagEvaluationDetailsBuilder { | |||
this.matchedAllocation = { | |||
key: allocation.key, | |||
allocationEvaluationCode: AllocationEvaluationCode.MATCH, | |||
orderPosition, | |||
orderPosition: indexPosition + 1, // orderPosition is 1-indexed to match UI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the comment! 🙏
e7e2dba
into
greg/FF-2465/evaluation-reasons
* FF-2465 rename flag-evaluation-details.ts to flag-evaluation-details-builder.ts * FF-2465 make orderPosition 1-indexed to match UI * FF-2465 include IAssignmentDetails in exports
Motivation and Context
In the new "Assignment Details" object,
orderPosition
is confusing since it's 0-indexed, when the UI shows the assignments as 1-indexed.See also: Eppo-exp/sdk-test-data#37 for test data fix
Description
Updates
orderPosition
so that it's now 1-indexed. This is part of the "Evaluation Reasons" work and will be merged in to the base branch for that feature.How has this been tested?
local testing