Skip to content

feat: chart category and new routing#186

Merged
epszaw merged 9 commits into
mainfrom
navigation-charts
May 29, 2025
Merged

feat: chart category and new routing#186
epszaw merged 9 commits into
mainfrom
navigation-charts

Conversation

@todti

@todti todti commented May 26, 2025

Copy link
Copy Markdown
Collaborator
  • integrated Charts to Awesome layout
  • new dropdown for sections to extend functionality(Charts at first)
image image

@todti todti requested a review from epszaw May 26, 2025 06:25

@epszaw epszaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 🔴 there are two footers now
image
  • 🔴 I don't see the section picker in the header, but the charts are configured properly (sandbox config hasn't been changed during testing)
image
  • 🔴 move common chart code (components, utils etc.) to web-components packages and use them directly from the package in web-awesome and web-dashboards packages

Comment thread packages/sandbox/allurerc.mjs Outdated
fileName: "allure-report.csv",
},
},
csv: {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move back to plugins. The config is broken now

Comment thread packages/sandbox/allurerc.mjs Outdated
singleFile: false,
reportLanguage: "en",
open: false,
chartLayout: chartData

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's name the field just charts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is empty

rootAriaLabel?: string;
}

export const TrendChartWidget = ({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's extract common chart components/utils to web-components package and use them in awesome and dashboard web packages

@todti todti force-pushed the navigation-charts branch 3 times, most recently from 1898b37 to 919d58e Compare May 27, 2025 07:39
@todti todti force-pushed the navigation-charts branch from 919d58e to 1d540ef Compare May 27, 2025 19:54
@todti todti requested a review from epszaw May 27, 2025 22:03
@epszaw epszaw requested a review from Viperwow May 28, 2025 10:27
Comment thread packages/web-dashboard/src/index.html Outdated
<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" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why base is changed?

slices={chartData.slices}
min={chartData.min}
max={chartData.max}
translates={{ "no-results": empty("no-results") }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't see where it's used

@@ -0,0 +1,43 @@
import type { Statistic, TestStatus } from "@allurereport/core-api";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 />}*/}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment

return (
<div className={styles["side-by-side"]} data-testId={"split-layout"}>
<Header className={styles.header} />
{/* <Header className={styles.header} />*/}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comments

overflow: hidden;
overflow-y: scroll;
height: calc(100vh - var(--footer-header-sizes));
//height: calc(100vh - var(--footer-header-sizes));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments

return (
<>
{!isSplitMode.value && <TrHeader testResult={testResult} />}
{/* {!isSplitMode.value && <TrHeader testResult={testResult} />}*/}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments

const { t: tEnvironments } = useI18n("environments");
const { currentTab } = useTabsContext();
const { id: routeId } = route.value;
const routeId = route.value.params?.testResultId ?? null;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?? null is not necessary because it's undefined when nothing is present by the path

@Viperwow Viperwow May 29, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like this is because of specific type usage. Need to double check and fix types

Comment thread packages/web-awesome/src/index.html Outdated
"layout": "split",
"allureVersion": "3.0.0-beta.8"
"allureVersion": "3.0.0-beta.8",
// defaultSection: "charts",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment

@todti todti requested a review from epszaw May 28, 2025 14:29
@@ -34,6 +33,7 @@ export const MetadataButton: FunctionalComponent<MetadataButtonProps> = ({
iconSize={"s"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For strings we can use simplified version of parameter (e.g. iconSize="s") for consistency

return (
<Menu
size="m"
placement={"bottom-start"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@epszaw epszaw merged commit 886da0d into main May 29, 2025
5 checks passed
@epszaw epszaw deleted the navigation-charts branch May 29, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants