-
Notifications
You must be signed in to change notification settings - Fork 12
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(agora): migrate Agora to use shared boxplot component (AG-1460) #2956
base: main
Are you sure you want to change the base?
Conversation
<agora-score-barchart | ||
[shouldResize]="false" | ||
[score]="20" | ||
[barColor]="'#8B8AD1'" | ||
[data]="scoreDistribution" | ||
> | ||
</agora-score-barchart> |
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.
Not included in the original About page, so removed it here.
"styles": [ | ||
"apps/agora/app/src/styles.scss", | ||
"node_modules/primeicons/primeicons.css", | ||
"node_modules/primeng/resources/primeng.min.css" | ||
], | ||
"stylePreprocessorOptions": { | ||
"includePaths": ["libs/agora/styles/src/lib", "libs/agora/themes/src/lib"] | ||
} |
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.
Boilerplate except for this section which imports Agora's styles, as described here
@@ -260,18 +261,21 @@ export class BoxplotChart { | |||
max: yAxisMax ? yAxisMax + yAxisPadding : undefined, | |||
}, | |||
tooltip: { | |||
confine: true, |
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.
Prevents tooltips on individual points from overflowing the screen
extraCssText: | ||
'opacity: 0.9; width: auto; max-width: 300px; white-space: pre-wrap; text-align: center;', |
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.
More closely match style of current point tooltips
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.
LGTM! The PR description, along with the preview one, is top-notch. I've shared a couple of comments.
libs/agora/charts/src/lib/box-plot-chart/box-plot-chart.component.ts
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,24 @@ | |||
import { boxPlotChartItem } from '@sagebionetworks/agora/models'; | |||
|
|||
export const boxPlotChartItemsMock: boxPlotChartItem[] = [ |
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.
There is a similar mock in agora-testing
, but I ran into issues importing that library when running Storybook. For simplicity, I created the mock here. However, long term, we may want to consider either pulling this data from the agora-testing
library or creating a separate agora-mocks
library.
1f7f273
to
9f32839
Compare
Description
Migrates Agora boxplots to use shared boxplot component.
Related Issue
Changelog
Preview
Boxplot:
AG-1460_boxplot.mov
Comparison:
Run shared storybook with
nx run agora-storybook:storybook
.View at http://localhost:4400/: