Skip to content

Commit

Permalink
👻 Refactor remaining legacy tables (#1877)
Browse files Browse the repository at this point in the history
Closes #1283

---------

Signed-off-by: Ian Bolton <[email protected]>
Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Co-authored-by: Radoslaw Szwajkowski <[email protected]>
  • Loading branch information
ibolton336 and rszwajko authored Apr 25, 2024
1 parent 312b8b8 commit a6e9afb
Show file tree
Hide file tree
Showing 14 changed files with 587 additions and 856 deletions.
1 change: 1 addition & 0 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@
"teamMember": "team member",
"ticket": "Ticket",
"trivialButMigratable": "Trivial but migratable",
"type": "Type",
"unassessedOrUnknown": "Unassessed or unknown",
"unassessed": "Unassessed",
"unassigned": "Not yet assigned",
Expand Down
57 changes: 33 additions & 24 deletions client/src/app/components/AppTableActionButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { Button } from "@patternfly/react-core";
import { Button, Flex, FlexItem } from "@patternfly/react-core";
import { applicationsWriteScopes, RBAC, RBAC_TYPE } from "@app/rbac";
import { ConditionalTooltip } from "./ConditionalTooltip";
import { Td } from "@patternfly/react-table";
Expand All @@ -26,30 +26,39 @@ export const AppTableActionButtons: React.FC<AppTableActionButtonsProps> = ({
rbacType={RBAC_TYPE.Scope}
>
<Td isActionCell>
<Button
id="edit-button"
aria-label="edit"
variant="secondary"
onClick={onEdit}
<Flex
direction={{ default: "row" }}
flexWrap={{ default: "nowrap" }}
style={{ minWidth: "100%" }}
>
{t("actions.edit")}
</Button>
</Td>
<Td isActionCell>
<ConditionalTooltip
isTooltipEnabled={isDeleteEnabled}
content={tooltipMessage}
>
<Button
id="delete-button"
aria-label="delete"
variant="link"
onClick={onDelete}
isAriaDisabled={isDeleteEnabled}
>
{t("actions.delete")}
</Button>
</ConditionalTooltip>
<FlexItem spacer={{ default: "spacerSm" }} />
<FlexItem spacer={{ default: "spacerSm" }}>
<Button
id="edit-button"
aria-label="edit"
variant="secondary"
onClick={onEdit}
>
{t("actions.edit")}
</Button>
</FlexItem>
<FlexItem spacer={{ default: "spacerSm" }}>
<ConditionalTooltip
isTooltipEnabled={isDeleteEnabled}
content={tooltipMessage}
>
<Button
id="delete-button"
aria-label="delete"
variant="link"
onClick={onDelete}
isAriaDisabled={isDeleteEnabled}
>
{t("actions.delete")}
</Button>
</ConditionalTooltip>
</FlexItem>
</Flex>
</Td>
</RBAC>
);
Expand Down
81 changes: 0 additions & 81 deletions client/src/app/components/AppTableWithControls.tsx

This file was deleted.

Loading

0 comments on commit a6e9afb

Please sign in to comment.