Skip to content

Commit 90e8c13

Browse files
authored
Deduplicate icons using Compound Design Tokens (#28219)
* Deduplicate icons using Compound Design Tokens Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> --------- Signed-off-by: Michael Telatynski <[email protected]>
1 parent e5a436a commit 90e8c13

File tree

49 files changed

+72
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+72
-110
lines changed

res/css/structures/_GenericDropdownMenu.pcss

+5-5
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ Please see LICENSE files in the repository root for full details.
9999

100100
&[aria-checked="true"]::before {
101101
content: "";
102-
width: 12px;
103-
height: 12px;
104-
margin-left: -20px;
105-
margin-right: 8px;
106-
mask-image: url("$(res)/img/feather-customised/check.svg");
102+
width: 16px;
103+
height: 16px;
104+
margin-left: -22px;
105+
margin-right: 6px;
106+
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
107107
mask-size: 100%;
108108
mask-repeat: no-repeat;
109109
background-color: $primary-content;

res/css/structures/_RoomStatusBar.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Please see LICENSE files in the repository root for full details.
118118
}
119119

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

124124
&.mx_RoomStatusBar_unsentRetry {

res/css/views/context_menus/_MessageContextMenu.pcss

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Please see LICENSE files in the repository root for full details.
5757
}
5858

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

6363
.mx_MessageContextMenu_iconResend::before {
@@ -92,7 +92,7 @@ Please see LICENSE files in the repository root for full details.
9292
}
9393

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

9898
.mx_MessageContextMenu_iconReplyInThread::before {

res/css/views/dialogs/_InviteDialog.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ Please see LICENSE files in the repository root for full details.
351351
height: 24px;
352352
grid-column: 1;
353353
grid-row: 1;
354-
mask-image: url("$(res)/img/feather-customised/check.svg");
354+
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
355355
mask-size: 100%;
356356
mask-repeat: no-repeat;
357357
position: absolute;

res/css/views/dialogs/security/_AccessSecretStorageDialog.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Please see LICENSE files in the repository root for full details.
8080
color: $accent;
8181

8282
&::before {
83-
mask-image: url("$(res)/img/feather-customised/check.svg");
83+
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
8484
background-color: $accent;
8585
}
8686
}

res/css/views/elements/_AccessibleButton.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Please see LICENSE files in the repository root for full details.
6464
background-color: var(--cpd-color-bg-action-primary-rest);
6565

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

res/css/views/elements/_ImageView.pcss

+2-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ $button-gap: 24px;
129129
}
130130

131131
.mx_ImageView_button_more::before {
132-
mask-image: url("$(res)/img/image-view/more.svg");
132+
mask-image: url("@vector-im/compound-design-tokens/icons/overflow-horizontal.svg");
133+
mask-size: 28px;
133134
}
134135

135136
.mx_ImageView_button_close {

res/css/views/elements/_StyledCheckbox.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Please see LICENSE files in the repository root for full details.
4343

4444
height: 100%;
4545
width: 100%;
46-
mask-image: url("$(res)/img/feather-customised/check.svg");
46+
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
4747
mask-position: center;
4848
mask-size: 100%;
4949
mask-repeat: no-repeat;

res/css/views/elements/_Validation.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Please see LICENSE files in the repository root for full details.
4444
color: $accent;
4545

4646
&::before {
47-
mask-image: url("$(res)/img/feather-customised/check.svg");
47+
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
4848
background-color: $accent;
4949
}
5050
}

res/css/views/messages/_MessageActionBar.pcss

+4
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,8 @@ Please see LICENSE files in the repository root for full details.
122122
--MessageActionBar-icon-size: 12px;
123123
}
124124
}
125+
126+
.mx_MessageActionBar_optionsButton {
127+
--MessageActionBar-icon-size: 22px;
128+
}
125129
}

res/css/views/messages/_RedactedBody.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Please see LICENSE files in the repository root for full details.
1818
height: 14px;
1919
width: 14px;
2020
background-color: $icon-button-color;
21-
mask-image: url("$(res)/img/feather-customised/trash.custom.svg");
21+
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
2222
mask-repeat: no-repeat;
2323
mask-position: center;
2424
mask-size: contain;

res/css/views/right_panel/_ThreadPanel.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Please see LICENSE files in the repository root for full details.
191191
width: 12px;
192192
height: 12px;
193193
margin-right: 8px;
194-
mask-image: url("$(res)/img/feather-customised/check.svg");
194+
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
195195
mask-size: 100%;
196196
mask-repeat: no-repeat;
197197
background-color: $primary-content;

res/css/views/rooms/_MessageComposer.pcss

+2-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ Please see LICENSE files in the repository root for full details.
277277
}
278278

279279
.mx_MessageComposer_buttonMenu::before {
280-
mask-image: url("$(res)/img/image-view/more.svg");
280+
mask-image: url("@vector-im/compound-design-tokens/icons/overflow-horizontal.svg");
281+
mask-size: 24px;
281282
}
282283

283284
.mx_MessageComposer_sendMessage {

res/css/views/rooms/_VoiceRecordComposerTile.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Please see LICENSE files in the repository root for full details.
3535
background-color: $voice-record-icon-color;
3636
mask-repeat: no-repeat;
3737
mask-size: contain;
38-
mask-image: url("$(res)/img/element-icons/trashcan.svg");
38+
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
3939
}
4040

4141
.mx_VoiceRecordComposerTile_uploadingState {

res/css/views/settings/tabs/user/_SecurityUserSettingsTab.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ Please see LICENSE files in the repository root for full details.
3535
top: 0;
3636
left: 0;
3737
background-color: $alert;
38-
mask-image: url("$(res)/img/feather-customised/alert-triangle.svg");
38+
mask-image: url("@vector-im/compound-design-tokens/icons/warning.svg");
3939
}
4040
}

res/css/views/voip/LegacyCallView/_LegacyCallViewButtons.pcss

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Please see LICENSE files in the repository root for full details.
161161
}
162162

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

res/img/compound/thread-16px.svg

-3
This file was deleted.

res/img/compound/user.svg

-7
This file was deleted.

res/img/element-icons/trashcan.svg

-3
This file was deleted.

res/img/feather-customised/check.svg

-3
This file was deleted.

res/img/feather-customised/trash.custom.svg

-7
This file was deleted.

res/img/feather-customised/warning-triangle.svg

-13
This file was deleted.

res/img/format/bold.svg

-3
This file was deleted.

res/img/format/code.svg

-7
This file was deleted.

res/img/format/italics.svg

-3
This file was deleted.

res/img/format/quote.svg

-5
This file was deleted.

res/img/format/strikethrough.svg

-6
This file was deleted.

res/img/image-view/more.svg

-3
This file was deleted.

res/img/voip/call-view/more.svg

-3
This file was deleted.

src/components/structures/RoomStatusBar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import {
1717
SyncState,
1818
SyncStateData,
1919
} from "matrix-js-sdk/src/matrix";
20+
import { WarningIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
2021

21-
import { Icon as WarningIcon } from "../../../res/img/feather-customised/warning-triangle.svg";
2222
import { _t, _td } from "../../languageHandler";
2323
import Resend from "../../Resend";
2424
import dis from "../../dispatcher/dispatcher";

src/components/views/elements/Pill.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ import React, { ReactElement } from "react";
1010
import classNames from "classnames";
1111
import { Room, RoomMember } from "matrix-js-sdk/src/matrix";
1212
import { Tooltip } from "@vector-im/compound-web";
13-
import LinkIcon from "@vector-im/compound-design-tokens/assets/web/icons/link";
13+
import { LinkIcon, UserSolidIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
1414

1515
import { MatrixClientPeg } from "../../../MatrixClientPeg";
1616
import MatrixClientContext from "../../../contexts/MatrixClientContext";
1717
import { usePermalink } from "../../../hooks/usePermalink";
1818
import RoomAvatar from "../avatars/RoomAvatar";
1919
import MemberAvatar from "../avatars/MemberAvatar";
2020
import { _t } from "../../../languageHandler";
21-
import { Icon as UserIcon } from "../../../../res/img/compound/user.svg";
2221

2322
export enum PillType {
2423
UserMention = "TYPE_USER_MENTION",
@@ -63,7 +62,7 @@ const PillMemberAvatar: React.FC<{
6362
if (member) {
6463
return <MemberAvatar member={member} size="16px" aria-hidden="true" hideTitle />;
6564
}
66-
return <UserIcon className="mx_Pill_UserIcon mx_BaseAvatar" />;
65+
return <UserSolidIcon className="mx_Pill_UserIcon mx_BaseAvatar" />;
6766
};
6867

6968
export interface PillProps {

0 commit comments

Comments
 (0)