Skip to content

Commit 7cc50c4

Browse files
AsmaaNabilBakrjoshriyitsushiTheGostKasperyiannistri
authored
fix duplicate icons (#3846)
* fix duplicate icons * policy icon size * fix audit icon size * update icon * refactor: refactor away from deprecated wait.Poll calls With the update, some other calls had to be updated: - `NewDiscoveryRESTMapper` expects an extra `HTTPClient` argument - `client` does not have `NewDelegatingClient` anymore, instead we can create the same resource with `client.New(...)` Resolves #3812 References: - #3812 - kubernetes-sigs/controller-runtime#2150 - https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0 Signed-off-by: Balazs Nadasdi <balazs@weave.works> * try to update github.com/fluxcd/pkg/runtime to the earliest version with updated controller-runtime Signed-off-by: Balazs Nadasdi <balazs@weave.works> * Cleanup datatable (#4091) * cleanup datatable * sort filtered items by `sortValue || value` * Update pkg/run/session/connect/connect.go Co-authored-by: Yiannis Triantafyllopoulos <8741709+yiannistri@users.noreply.github.com> * Refactoring Status column (#4098) * fix: Remove GitOps Run CLI commands * Replace the Sync/Suspend/Resume controls, used in the `SyncActions` and `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component) (#4080) * Create the new `SyncControls` component for Sync/Suspend/Resume controls. * Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder. * Update the related UI snapshot. * Add `SyncControls` to exports. * Move custom actions to the start (left) of `SyncControls` buttons. * Re-arrange icons in `IconType` alphabetically. * add new svg icon as CLusterDiscovery icon * fix typo * update import order * build(deps): Bump google.golang.org/grpc from 1.51.0 to 1.56.3 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.51.0 to 1.56.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.51.0...v1.56.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): Bump github.com/weaveworks/tf-controller/api version * build(deps): Bump postcss from 8.4.21 to 8.4.31 in /website Bumps [postcss](https://github.com/postcss/postcss) from 8.4.21 to 8.4.31. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](postcss/postcss@8.4.21...8.4.31) --- updated-dependencies: - dependency-name: postcss dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * chore: Remove GitOps Run components * build(deps): Remove gitops bucket server from build * chore: Remove unused code previously used for GitOps Run * build(deps): Bump @babel/traverse from 7.20.13 to 7.23.2 in /website Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.20.13 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * fix duplicate icons * remove extra space --------- Signed-off-by: Balazs Nadasdi <balazs@weave.works> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Joshua Israel <joshua.israel@weave.works> Co-authored-by: Balazs Nadasdi <balazs@weave.works> Co-authored-by: a.shabaan <ahmed.shabaan@weave.works> Co-authored-by: Yiannis Triantafyllopoulos <8741709+yiannistri@users.noreply.github.com> Co-authored-by: Luiz Filho <luizbafilho@gmail.com> Co-authored-by: yiannis <yiannis@weave.works> Co-authored-by: opudrovs <opudrovs@gmail.com> Co-authored-by: ahussein3 <ahmed.magdy@weave.works> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent c6725bb commit 7cc50c4

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

ui/components/Icon.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import NavigateNextIcon from "@material-ui/icons/NavigateNext";
2424
import PauseIcon from "@material-ui/icons/Pause";
2525
import PersonIcon from "@material-ui/icons/Person";
2626
import PlayIcon from "@material-ui/icons/PlayArrow";
27-
import Policy from "@material-ui/icons/Policy";
2827
import Remove from "@material-ui/icons/Remove";
2928
import RemoveCircleIcon from "@material-ui/icons/RemoveCircle";
3029
import SaveAltIcon from "@material-ui/icons/SaveAlt";
@@ -266,10 +265,10 @@ function getIcon(i: IconType) {
266265
return PlayIcon;
267266

268267
case IconType.PoliciesIcon:
269-
return PoliciesIcon;
268+
return () => <PoliciesIcon filled={false} />;
270269

271270
case IconType.Policy:
272-
return Policy;
271+
return () => <PoliciesIcon filled />;
273272

274273
case IconType.PolicyConfigsIcon:
275274
return PolicyConfigsIcon;

ui/components/NavIcons/PoliciesIcon.tsx

+22-17
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
import * as React from "react";
2-
3-
function PoliciesIcon() {
2+
import { useTheme } from "styled-components";
3+
function PoliciesIcon({ filled }) {
4+
const theme = useTheme();
45
return (
56
<svg
7+
width="24"
8+
height="24"
69
viewBox="0 0 24 24"
710
fill="none"
811
xmlns="http://www.w3.org/2000/svg"
9-
strokeLinecap="round"
10-
strokeMiterlimit={10}
1112
>
12-
<g>
13+
<g opacity={filled ? "0" : "100"}>
1314
<path
14-
className="path-fill"
15-
d="m12,4.09l6,2.58v4.56c-.54,6.18-4.84,8.25-6,8.7-1.16-.45-5.46-2.52-6-8.7v-4.56s6-2.58,6-2.58m0-1.09h0s-7,3.02-7,3.02v5.26c.66,7.85,7,9.71,7,9.71h0s6.34-1.86,7-9.71v-5.26s-7-3.01-7-3.01h0Z"
15+
d="M12 4.09L18 6.67V11.23C17.46 17.41 13.16 19.48 12 19.93C10.84 19.48 6.54 17.41 6 11.23V6.67L12 4.09ZM12 3L5 6.02V11.28C5.66 19.13 12 20.99 12 20.99C12 20.99 18.34 19.13 19 11.28V6.02L12 3.01V3Z"
16+
fill={theme.colors.neutral30}
17+
/>
18+
<path
19+
d="M11.98 10.0601C12.51 10.0601 13.01 10.2701 13.38 10.6401C14.15 11.4101 14.15 12.6701 13.38 13.4401C13.01 13.8101 12.51 14.0201 11.98 14.0201C11.45 14.0201 10.95 13.8101 10.58 13.4401C9.81 12.6701 9.81 11.4101 10.58 10.6401C10.95 10.2701 11.45 10.0601 11.98 10.0601ZM11.98 9.06006C11.22 9.06006 10.45 9.35006 9.87 9.93006C8.71 11.0901 8.71 12.9801 9.87 14.1401C10.45 14.7201 11.21 15.0101 11.98 15.0101C12.75 15.0101 13.51 14.7201 14.09 14.1401C15.25 12.9801 15.25 11.0901 14.09 9.93006C13.51 9.35006 12.75 9.06006 11.98 9.06006Z"
20+
fill={theme.colors.neutral30}
1621
/>
17-
</g>
18-
<g id="explorer">
1922
<path
20-
className="path-fill"
21-
d="m11.98,10.06c.53,0,1.03.21,1.4.58.77.77.77,2.03,0,2.8-.37.37-.87.58-1.4.58s-1.03-.21-1.4-.58c-.77-.77-.77-2.03,0-2.8.37-.37.87-.58,1.4-.58m0-1c-.76,0-1.53.29-2.11.87-1.16,1.16-1.16,3.05,0,4.21.58.58,1.34.87,2.11.87s1.53-.29,2.11-.87c1.16-1.16,1.16-3.05,0-4.21-.58-.58-1.34-.87-2.11-.87h0Z"
23+
d="M14 14.0601L16.71 16.7701"
24+
stroke={theme.colors.neutral30}
25+
stroke-miterlimit="10"
2226
/>
23-
<line
24-
className="stroke-fill"
25-
x1="14"
26-
y1="14.06"
27-
x2="16.71"
28-
y2="16.77"
27+
</g>
28+
<g opacity={filled ? "100" : "0"}>
29+
<path
30+
fill-rule="evenodd"
31+
clip-rule="evenodd"
32+
d="M12 3L5 6.02V11.28C5.66 19.13 12 20.99 12 20.99C12 20.99 15.1702 20.0599 17.2605 16.7395L16.6464 17.3536L13.7359 14.443C13.2168 14.821 12.6016 15.0101 11.98 15.0101C11.21 15.0101 10.45 14.7201 9.87 14.1401C8.71 12.9801 8.71 11.0901 9.87 9.93006C10.45 9.35006 11.22 9.06006 11.98 9.06006C12.75 9.06006 13.51 9.35006 14.09 9.93006C15.1208 10.9609 15.2356 12.5681 14.4344 13.7273L17.3318 16.6247C18.1634 15.2653 18.812 13.5156 19 11.28V6.02L12 3.01V3ZM11.98 10.0601C12.51 10.0601 13.01 10.2701 13.38 10.6401C14.15 11.4101 14.15 12.6701 13.38 13.4401C13.01 13.8101 12.51 14.0201 11.98 14.0201C11.45 14.0201 10.95 13.8101 10.58 13.4401C9.81 12.6701 9.81 11.4101 10.58 10.6401C10.95 10.2701 11.45 10.0601 11.98 10.0601Z"
33+
fill={theme.colors.neutral30}
2934
/>
3035
</g>
3136
</svg>

ui/components/Policies/Utils/PolicyMode.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ const PolicyMode = ({ modeName, showName = false }: Props) => {
1717
case "audit":
1818
mode = {
1919
name: "audit",
20-
icon: <Icon type={IconType.Policy} color="neutral30" size="base" />,
20+
icon: <Icon type={IconType.Policy} color="neutral30" size="large" />,
2121
};
2222
break;
2323
case "admission":
2424
mode = {
2525
name: "enforce",
2626
icon: (
27-
<Icon type={IconType.VerifiedUser} color="neutral30" size="base" />
27+
<Icon type={IconType.VerifiedUser} color="neutral30" size="medium" />
2828
),
2929
};
3030
break;

0 commit comments

Comments
 (0)