diff --git a/public/react/StatusKey/StatusKey.tsx b/public/react/StatusKey/StatusKey.tsx index 22dca846..1d75c336 100644 --- a/public/react/StatusKey/StatusKey.tsx +++ b/public/react/StatusKey/StatusKey.tsx @@ -1,24 +1,40 @@ -import { FC } from "react"; - -import React from "react"; +import React, { Children, FC, ReactNode } from "react"; import Lozenge from "@atlaskit/lozenge"; import { useTheme } from "../services/theme"; +const StatusKeyItem: FC<{ icon: ReactNode; text: ReactNode }> = ({ icon, text }) => ( +
+
+ {icon} +
+
{text}
+
+); + const StatusKey: FC = () => { const theme = useTheme(); return ( -
- {theme.map(({ backgroundCssVar, textCssVar, label }) => ( - - {label} - - ))} +
+
+ } text={"Unknown dates"} /> + + +
+
+ {Children.toArray( + theme.map(({ backgroundCssVar, textCssVar, label }) => ( + + {label} + + )) + )} +
); }; diff --git a/public/timeline-report.js b/public/timeline-report.js index 219faf90..9f1f59b3 100644 --- a/public/timeline-report.js +++ b/public/timeline-report.js @@ -95,21 +95,9 @@ export class TimelineReport extends StacheElement { primaryIssuesOrReleases:from="this.primaryIssuesOrReleases" allIssuesOrReleases:from="this.rolledupAndRolledBackIssuesAndReleases"> {{/ }} - -
- New - Not Started - On Track - Ahead - Behind - Warning - Blocked - Complete -
-
- {{/ and }} -
+ + {{/ and }} {{# and(this.routeData.derivedIssuesRequestData.issuesPromise.isResolved, not(this.primaryIssuesOrReleases.length) ) }}

{{this.primaryIssuesOrReleases.length}} issues of type {{this.routeData.primaryIssueType}}.

@@ -131,6 +119,8 @@ export class TimelineReport extends StacheElement {

Please check your JQL is correct!

{{/ if }} + +
`; static props = { @@ -226,7 +216,7 @@ export class TimelineReport extends StacheElement { }, }) ); - + createRoot(document.getElementById("status-key")).render(createElement(StatusKey, {})); }