-
Notifications
You must be signed in to change notification settings - Fork 120
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
feat: gauge, goal and bullet graph (alpha) #614
Merged
Merged
Changes from 5 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
b3c94b1
feat: gauge, goal and bullet graph
monfera bfac9aa
refactor: peer type and util references for now
monfera 4a9ba3e
test: added story for full circle
monfera d354521
chore: export lint
monfera 092bfe9
test: story images
monfera 2339a81
chore: name for later DRYing w/ pie
monfera 11d69b3
chore: index.css
monfera 181f725
chore: remove comment
monfera c41c9d5
chore: remove Partition
monfera f56b6c3
chore: indicate alpha
monfera 4445f21
fix: export accessor type
monfera 3d0b0b1
fix: internals
monfera f914eb2
fix: consistent aboveBaseCount
monfera 0189f45
refactor: sideways reference
monfera eca7d62
refactor: no spartan; Object.fromEntries
monfera 77b9f48
fix: refer to enum/type; generic for configMap
monfera 1724a80
test: image renames due to alpha moniker
monfera adb1fda
fix: more internal exports
monfera 6b6e057
Merge branch 'master' into gauge
monfera 499b696
Merge branch 'master' into gauge
monfera 0b14320
Merge branch 'master' into gauge
monfera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+20.5 KB
...isual-tests-for-all-stories-goal-band-in-band-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.5 KB
...eline-visual-tests-for-all-stories-goal-basic-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.2 KB
...l-tests-for-all-stories-goal-confidence-level-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.3 KB
...visual-tests-for-all-stories-goal-full-circle-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.1 KB
...seline-visual-tests-for-all-stories-goal-gaps-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.4 KB
...-tests-for-all-stories-goal-gauge-with-target-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.4 KB
...sual-tests-for-all-stories-goal-goal-negative-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.4 KB
...al-tests-for-all-stories-goal-goal-plus-minus-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+19.6 KB
...visual-tests-for-all-stories-goal-half-circle-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10 KB
...ual-tests-for-all-stories-goal-horizontal-bar-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.4 KB
...-tests-for-all-stories-goal-horizontal-bullet-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.7 KB
...ests-for-all-stories-goal-horizontal-negative-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.1 KB
...ts-for-all-stories-goal-horizontal-plus-minus-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+32.1 KB
...al-tests-for-all-stories-goal-irregular-ticks-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.5 KB
...isual-tests-for-all-stories-goal-minimal-band-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+19 KB
...eline-visual-tests-for-all-stories-goal-range-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.5 KB
...-visual-tests-for-all-stories-goal-side-gauge-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.3 KB
...e-visual-tests-for-all-stories-goal-small-gap-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.3 KB
...isual-tests-for-all-stories-goal-spartan-goal-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.2 KB
...tests-for-all-stories-goal-spartan-horizontal-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.9 KB
...eline-visual-tests-for-all-stories-goal-third-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.8 KB
...ual-tests-for-all-stories-goal-three-quarters-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.5 KB
...-visual-tests-for-all-stories-goal-two-thirds-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.55 KB
...al-tests-for-all-stories-goal-vertical-bullet-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.68 KB
...-tests-for-all-stories-goal-vertical-negative-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.83 KB
...ests-for-all-stories-goal-vertical-plus-minus-visually-looks-correct-1-snap.png
Oops, something went wrong.
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,68 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. */ | ||
|
||
import { Config } from '../types/config_types'; | ||
import { TAU } from '../../../partition_chart/layout/utils/math'; | ||
|
||
export const configMetadata = { | ||
angleStart: { dflt: Math.PI + Math.PI / 4, min: -TAU, max: TAU, type: 'number' }, | ||
angleEnd: { dflt: -Math.PI / 4, min: -TAU, max: TAU, type: 'number' }, | ||
|
||
// shape geometry | ||
width: { dflt: 300, min: 0, max: 1024, type: 'number', reconfigurable: false }, | ||
height: { dflt: 150, min: 0, max: 1024, type: 'number', reconfigurable: false }, | ||
margin: { | ||
type: 'group', | ||
values: { | ||
left: { dflt: 0, min: -0.25, max: 0.25, type: 'number' }, | ||
right: { dflt: 0, min: -0.25, max: 0.25, type: 'number' }, | ||
top: { dflt: 0, min: -0.25, max: 0.25, type: 'number' }, | ||
bottom: { dflt: 0, min: -0.25, max: 0.25, type: 'number' }, | ||
}, | ||
}, | ||
|
||
// general text config | ||
fontFamily: { | ||
dflt: 'Sans-Serif', | ||
type: 'string', | ||
}, | ||
|
||
// fill text config | ||
minFontSize: { dflt: 8, min: 0.1, max: 8, type: 'number', reconfigurable: true }, | ||
maxFontSize: { dflt: 64, min: 0.1, max: 64, type: 'number' }, | ||
|
||
backgroundColor: { dflt: '#ffffff', type: 'color' }, | ||
sectorLineWidth: { dflt: 1, min: 0, max: 4, type: 'number' }, | ||
}; | ||
|
||
// todo switch to `io-ts` style, generic way of combining static and runtime type info | ||
function configMap(mapper: Function, configMetadata: any): Config { | ||
const result: Config = Object.assign( | ||
{}, | ||
...Object.entries(configMetadata).map(([k, v]: [string, any]) => { | ||
if (v.type === 'group') { | ||
return { [k]: configMap(mapper, v.values) }; | ||
} else { | ||
return { [k]: mapper(v) }; | ||
} | ||
}), | ||
) as Config; | ||
return result; | ||
} | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
export const config: Config = configMap((item: any) => item.dflt, configMetadata); |
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,43 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. */ | ||
|
||
import { Pixels, SizeRatio } from '../../../partition_chart/layout/types/geometry_types'; | ||
import { FontFamily } from '../../../partition_chart/layout/types/types'; | ||
import { Color } from '../../../../utils/commons'; | ||
|
||
// todo switch to `io-ts` style, generic way of combining static and runtime type info | ||
export interface Config { | ||
angleStart: number; | ||
angleEnd: number; | ||
|
||
// shape geometry | ||
width: number; | ||
height: number; | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
margin: { left: SizeRatio; right: SizeRatio; top: SizeRatio; bottom: SizeRatio }; | ||
|
||
// general text config | ||
fontFamily: FontFamily; | ||
|
||
// fill text config | ||
minFontSize: Pixels; | ||
maxFontSize: Pixels; | ||
|
||
// other | ||
backgroundColor: Color; | ||
sectorLineWidth: Pixels; | ||
} |
108 changes: 108 additions & 0 deletions
108
src/chart_types/goal_chart/layout/types/viewmodel_types.ts
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,108 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. */ | ||
|
||
import { Config } from './config_types'; | ||
|
||
import { Pixels, PointObject } from '../../../partition_chart/layout/types/geometry_types'; | ||
import { config } from '../config/config'; | ||
import { SpecTypes } from '../../../../specs/settings'; | ||
import { BandFillColorAccessorInput, GOAL_SUBTYPES } from '../../specs/index'; | ||
|
||
interface BandViewModel { | ||
value: number; | ||
fillColor: string; | ||
} | ||
|
||
interface TickViewModel { | ||
value: number; | ||
text: string; | ||
} | ||
|
||
export interface BulletViewModel { | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
subtype: string; | ||
base: number; | ||
target: number; | ||
actual: number; | ||
bands: Array<BandViewModel>; | ||
ticks: Array<TickViewModel>; | ||
labelMajor: string; | ||
labelMinor: string; | ||
centralMajor: string; | ||
centralMinor: string; | ||
highestValue: number; | ||
lowestValue: number; | ||
aboveBaseCount: number; | ||
belowBaseCount: number; | ||
} | ||
|
||
export type PickFunction = (x: Pixels, y: Pixels) => Array<BulletViewModel>; | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
export type ShapeViewModel = { | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
config: Config; | ||
bulletViewModel: BulletViewModel; | ||
chartCenter: PointObject; | ||
pickQuads: PickFunction; | ||
}; | ||
|
||
const commonDefaults = { | ||
specType: SpecTypes.Series, | ||
subtype: GOAL_SUBTYPES[0], | ||
base: 0, | ||
target: 100, | ||
actual: 50, | ||
ticks: [0, 25, 50, 75, 100], | ||
}; | ||
|
||
export const defaultGoalSpec = { | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
...commonDefaults, | ||
bands: [50, 75, 100], | ||
bandFillColor: ({ value, base, highestValue, lowestValue }: BandFillColorAccessorInput) => { | ||
const aboveBase = value > base; | ||
const ratio = aboveBase | ||
? (value - base) / (Math.max(base, highestValue) - base) | ||
: (value - base) / (Math.min(base, lowestValue) - base); | ||
const level = Math.round(255 * ratio); | ||
return aboveBase ? `rgb(0, ${level}, 0)` : `rgb( ${level}, 0, 0)`; | ||
}, | ||
tickValueFormatter: ({ value }: BandFillColorAccessorInput) => String(value), | ||
labelMajor: ({ base }: BandFillColorAccessorInput) => String(base), | ||
labelMinor: ({}: BandFillColorAccessorInput) => 'unit', | ||
centralMajor: ({ base }: BandFillColorAccessorInput) => String(base), | ||
centralMinor: ({ target }: BandFillColorAccessorInput) => String(target), | ||
}; | ||
|
||
export const nullGoalViewModel = { | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
...commonDefaults, | ||
bands: [], | ||
ticks: [], | ||
labelMajor: '', | ||
labelMinor: '', | ||
centralMajor: '', | ||
centralMinor: '', | ||
highestValue: 100, | ||
lowestValue: 0, | ||
aboveBaseCount: 3, | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
belowBaseCount: 0, | ||
}; | ||
|
||
export const nullShapeViewModel = (specifiedConfig?: Config, chartCenter?: PointObject): ShapeViewModel => ({ | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
config: specifiedConfig || config, | ||
bulletViewModel: nullGoalViewModel, | ||
chartCenter: chartCenter || { x: 0, y: 0 }, | ||
pickQuads: () => [], | ||
}); |
106 changes: 106 additions & 0 deletions
106
src/chart_types/goal_chart/layout/viewmodel/viewmodel.ts
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,106 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. */ | ||
|
||
import { TextMeasure } from '../../../partition_chart/layout/types/types'; | ||
import { Config } from '../types/config_types'; | ||
import { BulletViewModel, PickFunction, ShapeViewModel } from '../types/viewmodel_types'; | ||
import { GoalSpec } from '../../specs/index'; | ||
|
||
export function shapeViewModel(textMeasure: TextMeasure, spec: GoalSpec, config: Config): ShapeViewModel { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: |
||
const { width, height, margin } = config; | ||
|
||
const innerWidth = width * (1 - Math.min(1, margin.left + margin.right)); | ||
const innerHeight = height * (1 - Math.min(1, margin.top + margin.bottom)); | ||
|
||
const chartCenter = { | ||
x: width * margin.left + innerWidth / 2, | ||
y: height * margin.top + innerHeight / 2, | ||
}; | ||
|
||
const pickQuads: PickFunction = (x, y) => { | ||
return -innerWidth / 2 <= x && x <= innerWidth / 2 && -innerHeight / 2 <= y && y <= innerHeight / 2 | ||
? [bulletViewModel] | ||
: []; | ||
}; | ||
|
||
const { | ||
subtype, | ||
base, | ||
target, | ||
actual, | ||
bands, | ||
ticks, | ||
bandFillColor, | ||
tickValueFormatter, | ||
labelMajor, | ||
labelMinor, | ||
centralMajor, | ||
centralMinor, | ||
} = spec; | ||
|
||
const [lowestValue, highestValue] = [base, target, actual, ...bands, ...ticks].reduce( | ||
([min, max], value) => [Math.min(min, value), Math.max(max, value)], | ||
[Infinity, -Infinity], | ||
); | ||
|
||
const aboveBaseCount = bands.filter((b: number) => b > base).length; | ||
const belowBaseCount = bands.filter((b: number) => b <= base).length; | ||
|
||
const callbackArgs = { | ||
base, | ||
target, | ||
actual, | ||
highestValue, | ||
lowestValue, | ||
aboveBaseCount, | ||
belowBaseCount, | ||
}; | ||
|
||
const bulletViewModel: BulletViewModel = { | ||
subtype, | ||
base, | ||
target, | ||
actual, | ||
bands: bands.map((value: number, index: number) => ({ | ||
value, | ||
fillColor: bandFillColor({ value, index, ...callbackArgs }), | ||
})), | ||
ticks: ticks.map((value: number, index: number) => ({ | ||
value, | ||
text: tickValueFormatter({ value, index, ...callbackArgs }), | ||
})), | ||
labelMajor: typeof labelMajor === 'string' ? labelMajor : labelMajor({ value: NaN, index: 0, ...callbackArgs }), | ||
labelMinor: typeof labelMinor === 'string' ? labelMinor : labelMinor({ value: NaN, index: 0, ...callbackArgs }), | ||
centralMajor: | ||
typeof centralMajor === 'string' ? centralMajor : centralMajor({ value: NaN, index: 0, ...callbackArgs }), | ||
centralMinor: | ||
typeof centralMinor === 'string' ? centralMinor : centralMinor({ value: NaN, index: 0, ...callbackArgs }), | ||
highestValue, | ||
lowestValue, | ||
aboveBaseCount, | ||
belowBaseCount, | ||
}; | ||
|
||
// combined viewModel | ||
return { | ||
config, | ||
chartCenter, | ||
bulletViewModel, | ||
pickQuads, | ||
}; | ||
} |
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,9 @@ | ||
.echCanvasRenderer { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
padding: 0; | ||
margin: 0; | ||
border: 0; | ||
background: transparent; | ||
} | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit: We can avoid exporting this, it is not used anywhere except at the end of this file