feat: chart category and new routing#186
Conversation
epszaw
left a comment
There was a problem hiding this comment.
- 🔴 there are two footers now
- 🔴 I don't see the section picker in the header, but the charts are configured properly (sandbox config hasn't been changed during testing)
- 🔴 move common chart code (components, utils etc.) to
web-componentspackages and use them directly from the package inweb-awesomeandweb-dashboardspackages
| fileName: "allure-report.csv", | ||
| }, | ||
| }, | ||
| csv: { |
There was a problem hiding this comment.
Move back to plugins. The config is broken now
| singleFile: false, | ||
| reportLanguage: "en", | ||
| open: false, | ||
| chartLayout: chartData |
There was a problem hiding this comment.
Let's name the field just charts
| rootAriaLabel?: string; | ||
| } | ||
|
|
||
| export const TrendChartWidget = ({ |
There was a problem hiding this comment.
Let's extract common chart components/utils to web-components package and use them in awesome and dashboard web packages
1898b37 to
919d58e
Compare
| <title>Allure Dashboard</title> | ||
| <link rel="icon" href="data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M22.232 4.662a3.6 3.6 0 0 1 5.09.035c2.855 2.894 4.662 6.885 4.662 11.295a3.6 3.6 0 0 1-7.2 0c0-2.406-.981-4.61-2.587-6.24a3.6 3.6 0 0 1 .035-5.09Z' fill='url(%23a)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.392 3.6a3.6 3.6 0 0 1 3.6-3.6c4.41 0 8.401 1.807 11.296 4.662a3.6 3.6 0 1 1-5.056 5.126C20.602 8.18 18.398 7.2 15.992 7.2a3.6 3.6 0 0 1-3.6-3.6Z' fill='url(%23b)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 15.992C0 7.157 7.157 0 15.992 0a3.6 3.6 0 0 1 0 7.2A8.789 8.789 0 0 0 7.2 15.992c0 2.406.981 4.61 2.588 6.24a3.6 3.6 0 0 1-5.126 5.056C1.807 24.393 0 20.402 0 15.992Z' fill='url(%23c)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.661 22.232a3.6 3.6 0 0 1 5.091-.035c1.63 1.606 3.834 2.587 6.24 2.587a3.6 3.6 0 0 1 0 7.2c-4.41 0-8.401-1.807-11.295-4.661a3.6 3.6 0 0 1-.036-5.091Z' fill='url(%23d)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M28.384 12.392a3.6 3.6 0 0 1 3.6 3.6c0 8.835-7.157 15.992-15.992 15.992a3.6 3.6 0 0 1 0-7.2 8.789 8.789 0 0 0 8.792-8.792 3.6 3.6 0 0 1 3.6-3.6Z' fill='url(%23e)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M28.385 12.392a3.6 3.6 0 0 1 3.6 3.6v12.392a3.6 3.6 0 0 1-7.2 0V15.992a3.6 3.6 0 0 1 3.6-3.6Z' fill='url(%23f)'/%3E%3Cg clip-path='url(%23g)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M22.232 4.662a3.6 3.6 0 0 1 5.091.035c2.855 2.894 4.662 6.885 4.662 11.295a3.6 3.6 0 0 1-7.2 0c0-2.406-.982-4.61-2.588-6.24a3.6 3.6 0 0 1 .035-5.09Z' fill='url(%23h)'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='a' x1='26.4' y1='9.6' x2='28.8' y2='15' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%237E22CE'/%3E%3Cstop offset='1' stop-color='%238B5CF6'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='26.8' y1='9.4' x2='17.8' y2='3.6' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23EF4444'/%3E%3Cstop offset='1' stop-color='%23DC2626'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' x1='3.6' y1='14' x2='5.4' y2='24.8' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%2322C55E'/%3E%3Cstop offset='1' stop-color='%2315803D'/%3E%3C/linearGradient%3E%3ClinearGradient id='d' x1='4.8' y1='22.2' x2='14.4' y2='29.2' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%2394A3B8'/%3E%3Cstop offset='.958' stop-color='%2364748B'/%3E%3Cstop offset='1' stop-color='%2364748B'/%3E%3C/linearGradient%3E%3ClinearGradient id='e' x1='28.4' y1='22.173' x2='22.188' y2='28.384' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D97706'/%3E%3Cstop offset='1' stop-color='%23FBBF24'/%3E%3C/linearGradient%3E%3ClinearGradient id='f' x1='29.2' y1='54.4' x2='30.626' y2='54.256' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23FBBF24'/%3E%3Cstop offset='1' stop-color='%23FBBF24'/%3E%3C/linearGradient%3E%3ClinearGradient id='h' x1='26.4' y1='9.6' x2='28.8' y2='15' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%237E22CE'/%3E%3Cstop offset='1' stop-color='%238B5CF6'/%3E%3C/linearGradient%3E%3CclipPath id='g'%3E%3Cpath fill='%23fff' transform='translate(24.8 12)' d='M0 0h7.2v8H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E" /> | ||
| <base href="http://localhost:8080" /> | ||
| <base href="http://localhost:8081" /> |
| slices={chartData.slices} | ||
| min={chartData.min} | ||
| max={chartData.max} | ||
| translates={{ "no-results": empty("no-results") }} |
There was a problem hiding this comment.
Let's rename the property to translations or locales. translates sounds more like a verb, than noun
| closeMenuOnClick?: boolean; | ||
| ariaLabel?: string; | ||
| setIsOpened?: (isOpened: boolean) => void; | ||
| className?: string; |
| @@ -0,0 +1,43 @@ | |||
| import type { Statistic, TestStatus } from "@allurereport/core-api"; | |||
There was a problem hiding this comment.
Don't we need to move these files to web-components too and re-use them across awesome and dashboard plugins?
| return ( | ||
| <> | ||
| {!isSplitMode.value && <Header />} | ||
| {/* {!isSplitMode.value && <Header />}*/} |
| return ( | ||
| <div className={styles["side-by-side"]} data-testId={"split-layout"}> | ||
| <Header className={styles.header} /> | ||
| {/* <Header className={styles.header} />*/} |
| overflow: hidden; | ||
| overflow-y: scroll; | ||
| height: calc(100vh - var(--footer-header-sizes)); | ||
| //height: calc(100vh - var(--footer-header-sizes)); |
| return ( | ||
| <> | ||
| {!isSplitMode.value && <TrHeader testResult={testResult} />} | ||
| {/* {!isSplitMode.value && <TrHeader testResult={testResult} />}*/} |
| const { t: tEnvironments } = useI18n("environments"); | ||
| const { currentTab } = useTabsContext(); | ||
| const { id: routeId } = route.value; | ||
| const routeId = route.value.params?.testResultId ?? null; |
There was a problem hiding this comment.
?? null is not necessary because it's undefined when nothing is present by the path
There was a problem hiding this comment.
it looks like this is because of specific type usage. Need to double check and fix types
| "layout": "split", | ||
| "allureVersion": "3.0.0-beta.8" | ||
| "allureVersion": "3.0.0-beta.8", | ||
| // defaultSection: "charts", |
| @@ -34,6 +33,7 @@ export const MetadataButton: FunctionalComponent<MetadataButtonProps> = ({ | |||
| iconSize={"s"} | |||
There was a problem hiding this comment.
For strings we can use simplified version of parameter (e.g. iconSize="s") for consistency
| return ( | ||
| <Menu | ||
| size="m" | ||
| placement={"bottom-start"} |
There was a problem hiding this comment.
Almost every type can be extracted to the web-commons or changed for already included (e.g. ChartType here is a duplicate of one from the web-commons already)
Uh oh!
There was an error while loading. Please reload this page.