Skip to content

Commit

Permalink
Standardise icons using Compound Design Tokens (#28217)
Browse files Browse the repository at this point in the history
* De-duplicate icons using Compound Design Tokens

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* delint

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Deduplicate more icons using Compound Design Tokens

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update icon

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Discard changes to res/css/structures/_RoomSearch.pcss

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Discard changes to res/fonts/Open_Sans/LICENSE.txt

* Discard changes to res/css/views/elements/_CopyableText.pcss

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
  • Loading branch information
t3chguy authored Nov 18, 2024
1 parent 08f41a4 commit 4f8e9eb
Show file tree
Hide file tree
Showing 50 changed files with 190 additions and 127 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions res/css/structures/_RightPanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Please see LICENSE files in the repository root for full details.
/** Fixme - factor this out with the main header **/

.mx_RightPanel_threadsButton::before {
mask-image: url("$(res)/img/element-icons/room/thread.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/threads-solid.svg");
}

.mx_RightPanel_notifsButton::before {
Expand All @@ -36,7 +36,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_RightPanel_roomSummaryButton::before {
mask-image: url("$(res)/img/element-icons/room/room-summary.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/info-solid.svg");
mask-position: center;
}

Expand Down
8 changes: 4 additions & 4 deletions res/css/structures/_SpacePanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ Please see LICENSE files in the repository root for full details.
}

&.mx_SpaceButton_favourites .mx_SpaceButton_icon::before {
mask-image: url("$(res)/img/element-icons/roomlist/favorite.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/favourite-solid.svg");
}

&.mx_SpaceButton_people .mx_SpaceButton_icon::before {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

&.mx_SpaceButton_orphans .mx_SpaceButton_icon::before {
Expand Down Expand Up @@ -426,11 +426,11 @@ Please see LICENSE files in the repository root for full details.
}

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

.mx_SpacePanel_iconMembers::before {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

.mx_SpacePanel_iconPlus::before {
Expand Down
2 changes: 1 addition & 1 deletion res/css/structures/_SpaceRoomView.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_SpaceRoomView_privateScope_justMeButton::before {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

.mx_SpaceRoomView_privateScope_meAndMyTeammatesButton::before {
Expand Down
2 changes: 1 addition & 1 deletion res/css/structures/_UserMenu.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Please see LICENSE files in the repository root for full details.
}

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

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

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

.mx_MessageContextMenu_iconPermalink::before {
Expand All @@ -53,7 +53,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_MessageContextMenu_iconForward::before {
mask-image: url("$(res)/img/element-icons/message/fwd.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/forward.svg");
}

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

.mx_MessageContextMenu_iconReplyInThread::before {
mask-image: url("$(res)/img/element-icons/message/thread.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/threads.svg");
}

.mx_MessageContextMenu_iconReact::before {
Expand Down
12 changes: 6 additions & 6 deletions res/css/views/context_menus/_RoomGeneralContextMenu.pcss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.mx_RoomGeneralContextMenu_iconStar::before {
mask-image: url("$(res)/img/element-icons/roomlist/favorite.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/favourite-solid.svg");
}

.mx_RoomGeneralContextMenu_iconArrowDown::before {
Expand Down Expand Up @@ -31,7 +31,7 @@
}

.mx_RoomGeneralContextMenu_iconPeople::before {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

.mx_RoomGeneralContextMenu_iconFiles::before {
Expand All @@ -43,29 +43,29 @@
}

.mx_RoomGeneralContextMenu_iconWidgets::before {
mask-image: url("$(res)/img/element-icons/room/apps.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/extensions-solid.svg");
}

.mx_RoomGeneralContextMenu_iconSettings::before {
mask-image: url("@vector-im/compound-design-tokens/icons/settings-solid.svg");
}

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

.mx_RoomGeneralContextMenu_iconDeveloperTools::before {
mask-image: url("$(res)/img/element-icons/settings/flask.svg");
}

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

.mx_RoomGeneralContextMenu_iconInvite::before {
mask-image: url("$(res)/img/element-icons/room/invite.svg");
}

.mx_RoomGeneralContextMenu_iconSignOut::before {
mask-image: url("$(res)/img/element-icons/leave.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/leave.svg");
}
2 changes: 1 addition & 1 deletion res/css/views/dialogs/_ConfirmSpaceUserActionDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Please see LICENSE files in the repository root for full details.
background-color: $secondary-content;
mask-repeat: no-repeat;
mask-size: contain;
mask-image: url("$(res)/img/element-icons/room/room-summary.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/info-solid.svg");
mask-position: center;
}
}
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/dialogs/_LeaveSpaceDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Please see LICENSE files in the repository root for full details.
background-color: $secondary-content;
mask-repeat: no-repeat;
mask-size: contain;
mask-image: url("$(res)/img/element-icons/room/room-summary.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/info-solid.svg");
mask-position: center;
}
}
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/dialogs/_ManageRestrictedJoinRuleDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Please see LICENSE files in the repository root for full details.
background-color: $secondary-content;
mask-repeat: no-repeat;
mask-size: contain;
mask-image: url("$(res)/img/element-icons/room/room-summary.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/info-solid.svg");
mask-position: center;
}
}
Expand Down
10 changes: 5 additions & 5 deletions res/css/views/dialogs/_SpotlightDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Please see LICENSE files in the repository root for full details.
}

&.mx_SpotlightDialog_filterPeople::before {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

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

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

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

.mx_SpotlightDialog_startChat::before {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

.mx_SpotlightDialog_joinRoomAlias::before {
Expand Down Expand Up @@ -512,11 +512,11 @@ Please see LICENSE files in the repository root for full details.
}

&.mx_SpotlightDialog_metaspaceResult_favourites-space {
mask-image: url("$(res)/img/element-icons/roomlist/favorite.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/favourite-solid.svg");
}

&.mx_SpotlightDialog_metaspaceResult_people-space {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

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

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

.mx_InfoTooltip_icon_warning::before {
Expand Down
4 changes: 4 additions & 0 deletions res/css/views/messages/_MessageActionBar.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ Please see LICENSE files in the repository root for full details.
color: var(--cpd-color-icon-primary);
}

&.mx_MessageActionBar_threadButton {
--MessageActionBar-icon-size: 20px;
}

&.mx_MessageActionBar_retryButton {
--MessageActionBar-icon-size: 16px;
}
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 @@ -165,7 +165,7 @@ Please see LICENSE files in the repository root for full details.
}

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

.mx_ContextualMenu_wrapper {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/rooms/_RoomList.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Please see LICENSE files in the repository root for full details.
mask-image: url("$(res)/img/element-icons/roomlist/dialpad.svg");
}
.mx_RoomList_iconStartChat::before {
mask-image: url("$(res)/img/element-icons/roomlist/member-plus.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-add-solid.svg");
}
.mx_RoomList_iconInvite::before {
mask-image: url("$(res)/img/element-icons/room/share.svg");
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/rooms/_RoomListHeader.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Please see LICENSE files in the repository root for full details.
mask-image: url("$(res)/img/element-icons/room/invite.svg");
}
.mx_RoomListHeader_iconStartChat::before {
mask-image: url("$(res)/img/element-icons/roomlist/member-plus.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-add-solid.svg");
}
.mx_RoomListHeader_iconNewRoom::before {
mask-image: url("$(res)/img/element-icons/roomlist/hash-plus.svg");
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/rooms/_RoomPreviewCard.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Please see LICENSE files in the repository root for full details.
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
mask-image: url("$(res)/img/element-icons/room/room-summary.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/info-solid.svg");
background-color: $secondary-content;
}
}
Expand Down
12 changes: 6 additions & 6 deletions res/css/views/rooms/_RoomTile.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Please see LICENSE files in the repository root for full details.

.mx_RoomTile_contextMenu {
.mx_RoomTile_iconStar::before {
mask-image: url("$(res)/img/element-icons/roomlist/favorite.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/favourite-solid.svg");
}

.mx_RoomTile_iconArrowDown::before {
Expand All @@ -206,7 +206,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_RoomTile_iconPeople::before {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

.mx_RoomTile_iconFiles::before {
Expand All @@ -218,26 +218,26 @@ Please see LICENSE files in the repository root for full details.
}

.mx_RoomTile_iconWidgets::before {
mask-image: url("$(res)/img/element-icons/room/apps.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/extensions-solid.svg");
}

.mx_RoomTile_iconSettings::before {
mask-image: url("@vector-im/compound-design-tokens/icons/settings-solid.svg");
}

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

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

.mx_RoomTile_iconInvite::before {
mask-image: url("$(res)/img/element-icons/room/invite.svg");
}

.mx_RoomTile_iconSignOut::before {
mask-image: url("$(res)/img/element-icons/leave.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/leave.svg");
}
}
2 changes: 1 addition & 1 deletion res/css/views/spaces/_SpacePublicShare.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Please see LICENSE files in the repository root for full details.
@mixin SpacePillButton;

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

&.mx_SpacePublicShare_inviteButton::before {
Expand Down
8 changes: 0 additions & 8 deletions res/img/element-icons/export.svg

This file was deleted.

4 changes: 0 additions & 4 deletions res/img/element-icons/info.svg

This file was deleted.

7 changes: 0 additions & 7 deletions res/img/element-icons/leave.svg

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

1 change: 0 additions & 1 deletion res/img/element-icons/message/thread.svg

This file was deleted.

6 changes: 0 additions & 6 deletions res/img/element-icons/room/apps.svg

This file was deleted.

Loading

0 comments on commit 4f8e9eb

Please sign in to comment.