Skip to content

Commit

Permalink
util: Coverage Report additions (#563)
Browse files Browse the repository at this point in the history
- Add "other" content to coverage report
- Add spacer row between expansions/other triggers
- Have coverage report use zone label where appropriate
- Clean up duplicate `kPrefixToCategory`
- Add `Comments` column and associated field to `TriggerSet`
- Add `Status` column
- Add colors
- Add PRs
  • Loading branch information
valarnin authored Jan 12, 2025
1 parent a925291 commit a1008d5
Show file tree
Hide file tree
Showing 9 changed files with 1,096 additions and 346 deletions.
869 changes: 677 additions & 192 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
"@babel/preset-typescript": "^7.14.5",
"@dprint/json": "^0.16.0",
"@dprint/typescript": "^0.75.0",
"@octokit/core": "^6.1.3",
"@octokit/plugin-paginate-rest": "^11.4.0",
"@types/argparse": "^1.0.38",
"@types/chai": "^4.3.1",
"@types/inquirer": "^9.0.7",
Expand Down Expand Up @@ -112,6 +114,7 @@
"postcss": "^8.3.5",
"proxy-agent": "^5.0.0",
"recast": "^0.20.4",
"simple-git": "^3.27.0",
"style-loader": "^3.3.1",
"stylelint": "^14.8.2",
"stylelint-config-standard": "^25.0.0",
Expand Down Expand Up @@ -145,7 +148,7 @@
"eslint --max-warnings=0"
],
"*.ts": [
"eslint --max-warnings=0 --plugin tsc --rule 'tsc/config: [2, {configFile: \"./tsconfig.json\"}]'"
"eslint --max-warnings=0 --plugin tsc --rule 'tsc/config: [2, {configFile: \"./tsconfig.eslint.json\"}]'"
],
"*.md": "markdownlint",
"ui/(raidboss|oopsyraidsy)/data/**": [
Expand Down
2 changes: 2 additions & 0 deletions types/trigger.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ export type BaseTriggerSet<Data extends RaidbossData> = {
timelineTriggers?: TimelineTrigger<Data>[];
timelineReplace?: TimelineReplacement[];
timelineStyles?: TimelineStyle[];
// Comments to be displayed alongside this trigger set where appropriate
comments?: LocaleText;
};

// If Data contains required properties that are not on RaidbossData, require initData
Expand Down
2 changes: 1 addition & 1 deletion ui/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const kDirectoryDefaultText = {
};

// Translating data folders to a category name.
const kPrefixToCategory = {
export const kPrefixToCategory = {
'00-misc': {
en: 'General Triggers',
de: 'General Trigger',
Expand Down
2 changes: 1 addition & 1 deletion util/coverage/coverage.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ body > div {

#zone-grid {
display: grid;
grid-template-columns: max-content repeat(6, minmax(60px, max-content));
grid-template-columns: max-content repeat(8, minmax(60px, max-content));
column-gap: 20px;
row-gap: 10px;
justify-items: left;
Expand Down
23 changes: 23 additions & 0 deletions util/coverage/coverage.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Lang } from '../../resources/languages';
import { LocaleText } from '../../types/trigger';
import { MissingTranslationErrorType } from '../find_missing_translations';

export type CoverageEntry = {
label?: LocaleText;
triggers: {
num: number;
};
Expand All @@ -18,6 +20,13 @@ export type CoverageEntry = {
[type in MissingTranslationErrorType]?: number;
};
};
comments?: LocaleText;
files: {
name: string;
commit?: string;
tag?: string;
}[];
lastModified: number;
};

export type Coverage = { [zoneId: string]: CoverageEntry };
Expand Down Expand Up @@ -47,3 +56,17 @@ export type TranslationTotals = {
errors: number;
};
};

export type Tags = {
[tagName: string]: {
tagDate: number;
tagHash: string;
};
};

export type Pulls = {
url: string;
number: number;
title: string;
files: string[];
}[];
Loading

0 comments on commit a1008d5

Please sign in to comment.