Skip to content
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

🐛 "Effort" with supplemental text info via tooltip #1846

Merged
merged 15 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
"details": "Details",
"displayName": "Display name",
"effort": "Effort",
"totalEffort": "Total Effort",
"effortEstimate": "Effort estimate",
"email": "Email",
"error": "Error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
DropdownItem,
Modal,
Tooltip,
Text,
} from "@patternfly/react-core";
import { PencilAltIcon, TagIcon } from "@patternfly/react-icons";
import {
Expand Down Expand Up @@ -109,6 +110,9 @@ import { useFetchArchetypes } from "@app/queries/archetypes";
import { ApplicationFormModal } from "../components/application-form";
import { ManageColumnsToolbar } from "./components/manage-columns-toolbar";

import { QuestionCircleIcon } from "@patternfly/react-icons";
import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing";

export const ApplicationsTable: React.FC = () => {
const { t } = useTranslation();
const history = useHistory();
Expand Down Expand Up @@ -845,9 +849,33 @@ export const ApplicationsTable: React.FC = () => {
<Th {...getThProps({ columnKey: "tags" })} width={10} />
)}
{getColumnVisibility("effort") && (
<Th {...getThProps({ columnKey: "effort" })} width={10} />
<Th
{...getThProps({ columnKey: "effort" })}
style={{ paddingRight: 0 }}
>
<div style={{ display: "flex", alignItems: "center" }}>
<div>
<span>Effort</span>
</div>
<Tooltip
content={
<>
<Text>
This column shows the total application effort.
</Text>
</>
}
position="right"
>
<div
className={`${spacing.mlSm} pf-v5-c-icon pf-m-info`}
>
<QuestionCircleIcon />
</div>
</Tooltip>
</div>
</Th>
)}
<Th />
</TableHeaderContentWithControls>
</Tr>
</Thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Toolbar,
ToolbarContent,
ToolbarItem,
Tooltip,
} from "@patternfly/react-core";
import { useTranslation } from "react-i18next";
import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table";
Expand Down Expand Up @@ -36,6 +37,8 @@ import {
} from "../helpers";
import { IssueDetailDrawer } from "../issue-detail-drawer";
import { TablePersistenceKeyPrefix } from "@app/Constants";
import { QuestionCircleIcon } from "@patternfly/react-icons";
import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing";

interface IAffectedApplicationsRouteParams {
ruleset: string;
Expand All @@ -60,7 +63,7 @@ export const AffectedApplications: React.FC = () => {
name: "Name",
description: "Description",
businessService: "Business service",
effort: "Total Effort",
effort: "Effort",
kpunwatk marked this conversation as resolved.
Show resolved Hide resolved
incidents: "Incidents",
},
isFilterEnabled: true,
Expand Down Expand Up @@ -181,7 +184,34 @@ export const AffectedApplications: React.FC = () => {
<Th {...getThProps({ columnKey: "name" })} />
<Th {...getThProps({ columnKey: "description" })} />
<Th {...getThProps({ columnKey: "businessService" })} />
<Th {...getThProps({ columnKey: "effort" })} />
<Th
{...getThProps({ columnKey: "effort" })}
style={{ paddingRight: 0 }}
>
<div style={{ display: "flex", alignItems: "center" }}>
kpunwatk marked this conversation as resolved.
Show resolved Hide resolved
<div>
<span>Effort</span>
kpunwatk marked this conversation as resolved.
Show resolved Hide resolved
</div>
<Tooltip
content={
<>
<Text>
This column shows the total calculated effort
for all incidents related to this file.
</Text>
</>
}
position="right"
>
<div
style={{ display: "flex", alignItems: "center" }}
className={`${spacing.mlSm} pf-v5-c-icon pf-m-info`}
>
<QuestionCircleIcon />
</div>
</Tooltip>
</div>
</Th>
<Th {...getThProps({ columnKey: "incidents" })} />
</TableHeaderContentWithControls>
</Tr>
Expand Down
27 changes: 26 additions & 1 deletion client/src/app/pages/issues/issues-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import { AffectedAppsLink } from "./affected-apps-link";
import { ConditionalTooltip } from "@app/components/ConditionalTooltip";
import { IssueDetailDrawer } from "./issue-detail-drawer";
import { IssueDescriptionAndLinks } from "./components/issue-description-and-links";
import { QuestionCircleIcon } from "@patternfly/react-icons";

export interface IIssuesTableProps {
mode: "allIssues" | "singleApp";
Expand Down Expand Up @@ -328,7 +329,31 @@ export const IssuesTable: React.FC<IIssuesTableProps> = ({ mode }) => {
<Th {...getThProps({ columnKey: "category" })} />
<Th {...getThProps({ columnKey: "source" })} />
<Th {...getThProps({ columnKey: "target" })} />
<Th {...getThProps({ columnKey: "effort" })} />
<Th
{...getThProps({ columnKey: "effort" })}
style={{ paddingRight: 0 }}
>
<div style={{ display: "flex", alignItems: "center" }}>
<div>
<span>Effort</span>
</div>
<Tooltip
content={
<>
<Text>
This column shows the effort weight for a single issue
incident.
</Text>
</>
}
position="right"
>
<div className={`${spacing.mlSm} pf-v5-c-icon pf-m-info`}>
<QuestionCircleIcon />
</div>
</Tooltip>
</div>
</Th>
<Th {...getThProps({ columnKey: "affected" })} />
</TableHeaderContentWithControls>
</Tr>
Expand Down
Loading