-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1891 from jplag/report-viewer/file-sorting
Add file sorting
- Loading branch information
Showing
6 changed files
with
154 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { ToolTipLabel } from './ToolTip' | ||
|
||
export enum FileSortingOptions { | ||
ALPHABETICAL, | ||
MATCH_COVERAGE, | ||
MATCH_COUNT, | ||
MATCH_SIZE | ||
} | ||
|
||
export const fileSortingTooltips: Record<FileSortingOptions, ToolTipLabel> = { | ||
[FileSortingOptions.ALPHABETICAL]: { | ||
displayValue: 'Alphabetical', | ||
tooltip: 'Sort files alphabetically, similar to package structure.' | ||
}, | ||
[FileSortingOptions.MATCH_COVERAGE]: { | ||
displayValue: 'Match Coverage', | ||
tooltip: 'Sort files by the percentage of tokens included in a match.' | ||
}, | ||
[FileSortingOptions.MATCH_COUNT]: { | ||
displayValue: 'Match Count', | ||
tooltip: 'Sort files by the number of matches found.' | ||
}, | ||
[FileSortingOptions.MATCH_SIZE]: { | ||
displayValue: 'Match Size', | ||
tooltip: 'Sort files by match size, with the largest matches at the top.' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters