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

🐛 Fix effort width & visibility conditional removed in app table #1947

Merged
merged 5 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@ import {
DropdownItem,
Modal,
Tooltip,
Flex,
FlexItem,
} from "@patternfly/react-core";
import {
PencilAltIcon,
QuestionCircleIcon,
TagIcon,
} from "@patternfly/react-icons";
import { PencilAltIcon, TagIcon } from "@patternfly/react-icons";
import {
Table,
Thead,
Expand Down Expand Up @@ -847,25 +841,15 @@ export const ApplicationsTable: React.FC = () => {
{getColumnVisibility("tags") && (
<Th {...getThProps({ columnKey: "tags" })} width={10} />
)}
<Th {...getThProps({ columnKey: "effort" })}>
<Flex
flexWrap={{ default: "nowrap" }}
spaceItems={{ default: "spaceItemsSm" }}
alignItems={{ default: "alignItemsCenter" }}
>
<FlexItem>{t("terms.effort")}</FlexItem>
<FlexItem>
<Tooltip
content={t("message.applicationEffortTooltip")}
position="top"
>
<Flex>
<QuestionCircleIcon />
</Flex>
</Tooltip>
</FlexItem>
</Flex>
</Th>
{getColumnVisibility("effort") && (
<Th
{...getThProps({ columnKey: "effort" })}
width={10}
info={{
tooltip: `${t("message.applicationEffortTooltip")}`,
}}
/>
)}
<Th width={10} />
</TableHeaderContentWithControls>
</Tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import * as React from "react";
import {
Breadcrumb,
BreadcrumbItem,
Flex,
FlexItem,
PageSection,
PageSectionVariants,
Text,
TextContent,
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 @@ -39,7 +36,6 @@ import {
} from "../helpers";
import { IssueDetailDrawer } from "../issue-detail-drawer";
import { TablePersistenceKeyPrefix } from "@app/Constants";
import { QuestionCircleIcon } from "@patternfly/react-icons";

interface IAffectedApplicationsRouteParams {
ruleset: string;
Expand Down Expand Up @@ -187,26 +183,10 @@ export const AffectedApplications: React.FC = () => {
<Th {...getThProps({ columnKey: "businessService" })} />
<Th
{...getThProps({ columnKey: "effort" })}
style={{ paddingRight: 0 }}
>
<Flex
flexWrap={{ default: "nowrap" }}
spaceItems={{ default: "spaceItemsSm" }}
alignItems={{ default: "alignItemsCenter" }}
>
<FlexItem>{t("terms.effort")}</FlexItem>
<FlexItem>
<Tooltip
content={t("message.applicationEffortTooltip")}
position="top"
>
<Flex>
<QuestionCircleIcon />
</Flex>
</Tooltip>
</FlexItem>
</Flex>
</Th>
info={{
tooltip: `${t("message.applicationEffortTooltip")}`,
}}
/>
<Th {...getThProps({ columnKey: "incidents" })} />
</TableHeaderContentWithControls>
</Tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import * as React from "react";
import { useTranslation } from "react-i18next";
import {
Button,
Flex,
FlexItem,
Toolbar,
ToolbarContent,
ToolbarItem,
Tooltip,
} from "@patternfly/react-core";
import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table";
import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing";
Expand All @@ -29,7 +26,6 @@ import { SimplePagination } from "@app/components/SimplePagination";
import { FileIncidentsDetailModal } from "./file-incidents-detail-modal";
import { FilterToolbar, FilterType } from "@app/components/FilterToolbar";
import PathDisplay from "./path-display";
import { QuestionCircleIcon } from "@patternfly/react-icons";

export interface IIssueAffectedFilesTableProps {
issue: AnalysisIssue;
Expand Down Expand Up @@ -140,25 +136,14 @@ export const IssueAffectedFilesTable: React.FC<
{...getThProps({ columnKey: "incidents" })}
modifier="nowrap"
/>
<Th {...getThProps({ columnKey: "effort" })}>
<Flex
flexWrap={{ default: "nowrap" }}
spaceItems={{ default: "spaceItemsSm" }}
alignItems={{ default: "alignItemsCenter" }}
>
<FlexItem>{t("terms.effort")}</FlexItem>
<FlexItem>
<Tooltip
content={t("message.affectedAppEffortTooltip")}
position="top"
>
<Flex>
<QuestionCircleIcon />
</Flex>
</Tooltip>
</FlexItem>
</Flex>
</Th>
<Th
{...getThProps({ columnKey: "effort" })}
width={10}
info={{
tooltip: `${t("message.affectedAppEffortTooltip")}`,
}}
modifier="nowrap"
/>
</TableHeaderContentWithControls>
</Tr>
</Thead>
Expand Down
26 changes: 6 additions & 20 deletions client/src/app/pages/issues/issues-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ 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 @@ -329,25 +328,12 @@ export const IssuesTable: React.FC<IIssuesTableProps> = ({ mode }) => {
<Th {...getThProps({ columnKey: "category" })} />
<Th {...getThProps({ columnKey: "source" })} />
<Th {...getThProps({ columnKey: "target" })} />
<Th {...getThProps({ columnKey: "effort" })}>
<Flex
flexWrap={{ default: "nowrap" }}
spaceItems={{ default: "spaceItemsSm" }}
alignItems={{ default: "alignItemsCenter" }}
>
<FlexItem>{t("terms.effort")}</FlexItem>
<FlexItem>
<Tooltip
content={t("message.issuesEffortTooltip")}
position="top"
>
<Flex>
<QuestionCircleIcon />
</Flex>
</Tooltip>
</FlexItem>
</Flex>
</Th>
<Th
{...getThProps({ columnKey: "effort" })}
info={{
tooltip: `${t("message.issuesEffortTooltip")}`,
}}
/>
<Th {...getThProps({ columnKey: "affected" })} />
</TableHeaderContentWithControls>
</Tr>
Expand Down
Loading