Skip to content

Commit

Permalink
Deduplicate icons using Compound Design Tokens
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Oct 17, 2024
1 parent eedeb2c commit 825d3f4
Show file tree
Hide file tree
Showing 35 changed files with 32 additions and 99 deletions.
2 changes: 1 addition & 1 deletion res/css/structures/_GenericDropdownMenu.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Please see LICENSE files in the repository root for full details.
height: 12px;
margin-left: -20px;
margin-right: 8px;
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
mask-size: 100%;
mask-repeat: no-repeat;
background-color: $primary-content;
Expand Down
2 changes: 1 addition & 1 deletion res/css/structures/_RoomStatusBar.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Please see LICENSE files in the repository root for full details.
}

&.mx_RoomStatusBar_unsentCancelAllBtn::before {
mask-image: url("$(res)/img/element-icons/trashcan.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
}

&.mx_RoomStatusBar_unsentRetry {
Expand Down
4 changes: 2 additions & 2 deletions res/css/views/context_menus/_MessageContextMenu.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_MessageContextMenu_iconRedact::before {
mask-image: url("$(res)/img/element-icons/trashcan.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
}

.mx_MessageContextMenu_iconResend::before {
Expand Down Expand Up @@ -92,7 +92,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_MessageContextMenu_iconReply::before {
mask-image: url("$(res)/img/element-icons/room/message-bar/reply.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/reply.svg");
}

.mx_MessageContextMenu_iconReplyInThread::before {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/dialogs/_InviteDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ Please see LICENSE files in the repository root for full details.
height: 24px;
grid-column: 1;
grid-row: 1;
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
mask-size: 100%;
mask-repeat: no-repeat;
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Please see LICENSE files in the repository root for full details.
color: $accent;

&::before {
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
background-color: $accent;
}
}
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/elements/_AccessibleButton.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Please see LICENSE files in the repository root for full details.
background-color: var(--cpd-color-bg-action-primary-rest);

&::before {
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
}
}

Expand Down
2 changes: 1 addition & 1 deletion res/css/views/elements/_ImageView.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ $button-gap: 24px;
}

.mx_ImageView_button_more::before {
mask-image: url("$(res)/img/image-view/more.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/overflow-horizontal.svg");
}

.mx_ImageView_button_close {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/elements/_StyledCheckbox.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Please see LICENSE files in the repository root for full details.

height: 100%;
width: 100%;
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
mask-position: center;
mask-size: 100%;
mask-repeat: no-repeat;
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/elements/_Validation.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Please see LICENSE files in the repository root for full details.
color: $accent;

&::before {
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
background-color: $accent;
}
}
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/messages/_RedactedBody.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Please see LICENSE files in the repository root for full details.
height: 14px;
width: 14px;
background-color: $icon-button-color;
mask-image: url("$(res)/img/feather-customised/trash.custom.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/right_panel/_ThreadPanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Please see LICENSE files in the repository root for full details.
width: 12px;
height: 12px;
margin-right: 8px;
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
mask-size: 100%;
mask-repeat: no-repeat;
background-color: $primary-content;
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/rooms/_MessageComposer.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_MessageComposer_buttonMenu::before {
mask-image: url("$(res)/img/image-view/more.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/overflow-horizontal.svg");
}

.mx_MessageComposer_sendMessage {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/rooms/_VoiceRecordComposerTile.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Please see LICENSE files in the repository root for full details.
background-color: $voice-record-icon-color;
mask-repeat: no-repeat;
mask-size: contain;
mask-image: url("$(res)/img/element-icons/trashcan.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
}

.mx_VoiceRecordComposerTile_uploadingState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ Please see LICENSE files in the repository root for full details.
top: 0;
left: 0;
background-color: $alert;
mask-image: url("$(res)/img/feather-customised/alert-triangle.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/warning.svg");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Please see LICENSE files in the repository root for full details.
}

&.mx_LegacyCallViewButtons_button_more::before {
mask-image: url("$(res)/img/voip/call-view/more.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/overflow-horizontal.svg");
}
/* Stateless buttons */

Expand Down
3 changes: 0 additions & 3 deletions res/img/compound/thread-16px.svg

This file was deleted.

7 changes: 0 additions & 7 deletions res/img/compound/user.svg

This file was deleted.

3 changes: 0 additions & 3 deletions res/img/element-icons/trashcan.svg

This file was deleted.

3 changes: 0 additions & 3 deletions res/img/feather-customised/check.svg

This file was deleted.

7 changes: 0 additions & 7 deletions res/img/feather-customised/trash.custom.svg

This file was deleted.

13 changes: 0 additions & 13 deletions res/img/feather-customised/warning-triangle.svg

This file was deleted.

3 changes: 0 additions & 3 deletions res/img/format/bold.svg

This file was deleted.

7 changes: 0 additions & 7 deletions res/img/format/code.svg

This file was deleted.

3 changes: 0 additions & 3 deletions res/img/format/italics.svg

This file was deleted.

5 changes: 0 additions & 5 deletions res/img/format/quote.svg

This file was deleted.

6 changes: 0 additions & 6 deletions res/img/format/strikethrough.svg

This file was deleted.

3 changes: 0 additions & 3 deletions res/img/image-view/more.svg

This file was deleted.

3 changes: 0 additions & 3 deletions res/img/voip/call-view/more.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/structures/RoomStatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import {
SyncState,
SyncStateData,
} from "matrix-js-sdk/src/matrix";
import { WarningIcon } from "@vector-im/compound-design-tokens/assets/web/icons";

import { Icon as WarningIcon } from "../../../res/img/feather-customised/warning-triangle.svg";
import { _t, _td } from "../../languageHandler";
import Resend from "../../Resend";
import dis from "../../dispatcher/dispatcher";
Expand Down
3 changes: 1 addition & 2 deletions src/components/views/elements/Pill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ import React, { ReactElement } from "react";
import classNames from "classnames";
import { Room, RoomMember } from "matrix-js-sdk/src/matrix";
import { Tooltip } from "@vector-im/compound-web";
import LinkIcon from "@vector-im/compound-design-tokens/assets/web/icons/link";
import { LinkIcon, UserIcon } from "@vector-im/compound-design-tokens/assets/web/icons";

import { MatrixClientPeg } from "../../../MatrixClientPeg";
import MatrixClientContext from "../../../contexts/MatrixClientContext";
import { usePermalink } from "../../../hooks/usePermalink";
import RoomAvatar from "../avatars/RoomAvatar";
import MemberAvatar from "../avatars/MemberAvatar";
import { _t } from "../../../languageHandler";
import { Icon as UserIcon } from "../../../../res/img/compound/user.svg";

export enum PillType {
UserMention = "TYPE_USER_MENTION",
Expand Down
Loading

0 comments on commit 825d3f4

Please sign in to comment.