-
Notifications
You must be signed in to change notification settings - Fork 47
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
Dexex organize docket sorting (WIP) #5556
base: staging
Are you sure you want to change the base?
Conversation
…rialSessionDetails, which does not say what it sorts by and is imported in places that seem unrelated to getting formatted trial session details, with a more intuitive sorting function that does the same thing
… adding and modifying tests
… from Case.ts and beginning to deal with the consequences of refactoring
if (isReversed) { | ||
// reversing AFTER the sort keeps sorting stable | ||
return docketEntries.reverse().sort(sortUndefined); | ||
} | ||
return docketEntries.sort(sortUndefined); |
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.
We were sorting the whole list twice rather than improving our a custom comparison function to allow us to sort once.
@@ -0,0 +1,76 @@ | |||
const getSortableDocketNumber = (docketNumber?: string) => { |
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.
This file is just logic moved over from Case.ts.
This is a work in progress. Please ignore for now.
We have several different methods for sorting docket-related things scattered throughout the codebase. This PR attempts to collect them in one place, refactoring and renaming them for clarity as need be.