Skip to content

Commit bb91760

Browse files
committed
chore: remove unused and update icon names
1 parent 708b278 commit bb91760

27 files changed

+38
-141
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"scripts": {
1818
"install:deps": "git submodule update --init --recursive && yarn install",
1919
"dev": "vite",
20-
"build:types": "rm -rf dist; rm -rf icons; rm -rf icons; tsc; cp -R src/icons icons; cp -R src/icons dist/icons ; cp -R src/css css; cp -R src/css dist/css",
2120
"prebuild": "rm -rf ./dist && mv .env .env_temp || true",
2221
"postbuild": "mv .env_temp .env || true",
2322
"build": "yarn prebuild && tsc-silent -p './tsconfig.json' --suppress @ && vite build && yarn postbuild",
@@ -64,7 +63,7 @@
6463
"ts-pattern": "^5.1.1",
6564
"tsc-silent": "^1.2.2",
6665
"typescript": "5.0.2",
67-
"vite": "5.2.10",
66+
"vite": "5.2.14",
6867
"vite-plugin-dts": "^3.7.0",
6968
"vite-plugin-svgr": "^4.2.0",
7069
"vitest": "^1.6.0"

src/components/BotProfileImage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useChatContext } from './chat/context/ChatProvider';
55
import { getColorBasedOnSaturation } from '../colors';
66
import { useConstantState } from '../context/ConstantContext';
77
import { themedColors } from '../foundation/colors/css';
8-
import BotProfileIcon from '../icons/bot-profile-image-small.svg';
8+
import BotFilledIcon from '../icons/ic-bot-filled.svg';
99

1010
function isMaybeFavicon(url: string) {
1111
if (url.length < 4) return false;
@@ -44,7 +44,7 @@ const IconContainer = styled.span<{ backgroundColor: string; size: number }>`
4444
align-items: center;
4545
}`;
4646

47-
const Icon = styled(BotProfileIcon)<{ fill: string }>`
47+
const Icon = styled(BotFilledIcon)<{ fill: string }>`
4848
path {
4949
fill: ${({ fill }) => fill};
5050
}

src/components/ErrorContainer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styled from 'styled-components';
22

33
import { Label } from '../foundation/components/Label';
4-
import Icon from '../icons/icon-error.svg';
4+
import ErrorIcon from '../icons/ic-error.svg';
55

66
const Container = styled.div`
77
width: 100%;
@@ -14,7 +14,7 @@ const Container = styled.div`
1414
background-color: ${({ theme }) => theme.bgColor.loadingScreen};
1515
`;
1616

17-
const ErrorIcon = styled(Icon)`
17+
const Error = styled(ErrorIcon)`
1818
path {
1919
fill: ${({ theme }) => theme.textColor.errorMessage};
2020
}
@@ -29,7 +29,7 @@ const ErrorMessage = styled(Label)`
2929
export default function ErrorContainer({ errorMessage }: { errorMessage: string }) {
3030
return (
3131
<Container>
32-
<ErrorIcon />
32+
<Error />
3333
<ErrorMessage className="sendbird-input-label" type={'body1'} color={'onbackground2'}>
3434
{errorMessage || 'Something went wrong'}
3535
</ErrorMessage>

src/components/LoadingScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled, { keyframes } from 'styled-components';
22

3-
import SpinIcon from '../icons/spin-icon.svg';
3+
import SpinnerIcon from '../icons/ic-spinner.svg';
44

55
const spinner = keyframes`
66
0% {
@@ -39,7 +39,7 @@ export default function LoadingScreen() {
3939
return (
4040
<Container>
4141
<IconContainer>
42-
<SpinIcon width="50px" height="50px" />
42+
<SpinnerIcon width="50px" height="50px" />
4343
</IconContainer>
4444
</Container>
4545
);

src/components/MessageDataContent.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import styled from 'styled-components';
22

33
import { useConstantState } from '../context/ConstantContext';
4-
import ChevronRightIcon from '../icons/chevron-right.svg';
5-
import EllipsisIcon from '../icons/icon-ellipsis.svg';
6-
import MessageBubbleIcon from '../icons/icon-message-bubble.svg';
4+
import ChevronRightIcon from '../icons/ic-chevron-right.svg';
5+
import EllipsisIcon from '../icons/ic-ellipsis.svg';
6+
import MessageIcon from '../icons/ic-message.svg';
77
import { FunctionCallData } from '../types';
88
import { noop } from '../utils';
99

@@ -121,7 +121,7 @@ const AdditionalInfo = styled.div`
121121
margin-top: 5px;
122122
`;
123123

124-
const Icon = styled.div`
124+
const IconContainer = styled.div`
125125
display: flex;
126126
justify-content: center;
127127
align-items: center;
@@ -239,9 +239,9 @@ export default function MessageDataContent({ messageData }: MessageDataContentPr
239239
<DataContainer>
240240
{workflow && (
241241
<DataRow>
242-
<Icon>
243-
<MessageBubbleIcon id="aichatbot-widget-ellipsis-icon" />
244-
</Icon>
242+
<IconContainer>
243+
<MessageIcon />
244+
</IconContainer>
245245
<Text>{workflow.name}</Text>
246246
<LineHeightWrapper>
247247
<WorkFlowType>{workflow.type}</WorkFlowType>
@@ -250,17 +250,17 @@ export default function MessageDataContent({ messageData }: MessageDataContentPr
250250
)}
251251
{functionCalls.map((renderData, index) => (
252252
<DataRow key={index}>
253-
<Icon>
254-
<EllipsisIcon id="aichatbot-widget-message-bubble-icon" />
255-
</Icon>
253+
<IconContainer>
254+
<EllipsisIcon />
255+
</IconContainer>
256256
<Text>{renderData.name}</Text>
257257
<ViewDetails onClick={renderData.onClick}>
258-
<TextButton>View details</TextButton>
259-
<ChevronRightIcon id="aichatbot-widget-chevron-right-icon" />
258+
<TextButton>{'View details'}</TextButton>
259+
<ChevronRightIcon />
260260
</ViewDetails>
261261
</DataRow>
262262
))}
263-
<AdditionalInfo>Only visible in the dashboard widget</AdditionalInfo>
263+
<AdditionalInfo>{'Only visible in the dashboard widget'}</AdditionalInfo>
264264
</DataContainer>
265265
</Root>
266266
);

src/components/SourceContainer.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled from 'styled-components';
22

3-
import OpenLinkIcon from '../icons/open-link-icon.svg';
3+
import OpenIcon from '../icons/ic-open.svg';
44

55
const Root = styled.div`
66
display: flex;
@@ -37,7 +37,7 @@ const SourceItem = styled.div`
3737
gap: 16px;
3838
`;
3939

40-
const IconLink = styled.a`
40+
const IconContainer = styled.a`
4141
display: flex;
4242
justify-content: center;
4343
align-items: center;
@@ -72,13 +72,13 @@ export default function SourceContainer(props: Props) {
7272
<RootTitle>Source</RootTitle>
7373
<SourceItem>
7474
<div>
75-
<SourceTitle href={source.source} id="openLinkText" target="_blank">
75+
<SourceTitle href={source.source} target="_blank">
7676
{source.title}
7777
</SourceTitle>
7878
</div>
79-
<IconLink href={source.source} id="openLinkIcon" target="_blank" aria-label="Source link">
80-
<OpenLinkIcon width={'15px'} height={'15px'} />
81-
</IconLink>
79+
<IconContainer href={source.source} target="_blank" aria-label="Source link">
80+
<OpenIcon width={'15px'} height={'15px'} />
81+
</IconContainer>
8282
</SourceItem>
8383
</Root>
8484
);

src/components/chat/ui/ChatHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { useWidgetState } from '../../../context/WidgetStateContext';
88
import { themedColors } from '../../../foundation/colors/css';
99
import { Label } from '../../../foundation/components/Label';
1010
import CloseIcon from '../../../icons/ic-close.svg';
11+
import CollapseIcon from '../../../icons/ic-collapse.svg';
1112
import ExpandIcon from '../../../icons/ic-expand.svg';
12-
import CollapsedIcon from '../../../icons/icon-collapse.svg';
1313
import BotProfileImage from '../../BotProfileImage';
1414
import BetaLogo from '../../ui/BetaLogo';
1515
import { useChatContext } from '../context/ChatProvider';
@@ -87,7 +87,7 @@ const RefreshButton = ({ size, onClick }: ButtonProps) => {
8787

8888
const ExpandButton = ({ size }: ButtonProps) => {
8989
const { isExpanded, setIsExpanded } = useWidgetState();
90-
const Icon = isExpanded ? CollapsedIcon : ExpandIcon;
90+
const Icon = isExpanded ? CollapseIcon : ExpandIcon;
9191

9292
return (
9393
<IconButton id={elementIds.expandIcon} aria-label={'expand'} onClick={() => setIsExpanded(!isExpanded)}>

src/components/messages/CarouselMessage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { ReactNode } from 'react';
22
import styled, { useTheme } from 'styled-components';
33

44
import { useConstantState } from '../../context/ConstantContext';
5-
import ChevronLeft from '../../icons/chevron-left.svg';
6-
import ChevronRight from '../../icons/chevron-right.svg';
5+
import ChevronLeft from '../../icons/ic-chevron-left.svg';
6+
import ChevronRight from '../../icons/ic-chevron-right.svg';
77
import { WidgetCarouselItem } from '../../types';
88
import { openURL } from '../../utils';
99
import { SnapCarousel } from '../ui/SnapCarousel';

src/components/ui/WidgetButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import styled, { css } from 'styled-components';
22

33
import { getColorBasedOnSaturation } from '../../colors';
44
import { elementIds } from '../../const';
5-
import BotOutlinedIcon from '../../icons/bot-outlined.svg';
6-
import ChevronDownIcon from '../../icons/chevron-down.svg';
5+
import BotOutlinedIcon from '../../icons/ic-bot-outlined.svg';
6+
import ChevronDownIcon from '../../icons/ic-chevron-down.svg';
77

88
const buttonEffect = css`
99
&:hover {

src/dummy.ts

Lines changed: 0 additions & 81 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/icons/ic-sendbird-colored.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

src/icons/icon-send.svg

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/icons/info-icon.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/icons/sendbird-logo-widget.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/vite-env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
/// <reference types="vite/client" />
2-
declare const APP_VERSION: string;

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,7 +3294,7 @@ __metadata:
32943294
ts-pattern: "npm:^5.1.1"
32953295
tsc-silent: "npm:^1.2.2"
32963296
typescript: "npm:5.0.2"
3297-
vite: "npm:5.2.10"
3297+
vite: "npm:5.2.14"
32983298
vite-plugin-dts: "npm:^3.7.0"
32993299
vite-plugin-svgr: "npm:^4.2.0"
33003300
vitest: "npm:^1.6.0"
@@ -18161,9 +18161,9 @@ __metadata:
1816118161
languageName: node
1816218162
linkType: hard
1816318163

18164-
"vite@npm:5.2.10":
18165-
version: 5.2.10
18166-
resolution: "vite@npm:5.2.10"
18164+
"vite@npm:5.2.14":
18165+
version: 5.2.14
18166+
resolution: "vite@npm:5.2.14"
1816718167
dependencies:
1816818168
esbuild: "npm:^0.20.1"
1816918169
fsevents: "npm:~2.3.3"
@@ -18197,7 +18197,7 @@ __metadata:
1819718197
optional: true
1819818198
bin:
1819918199
vite: bin/vite.js
18200-
checksum: 10c0/d50630ac8de807a6185cd9b5763b3969b2950a454cf6a4482f3780f183865e8d6f7e3aa57dd70ede1c493aaa861efb25b43562287efbcf8b471b7f3b88857a33
18200+
checksum: 10c0/0ed7a8f8274d14bbd01be2ca5c7c539f915e75d884a97f6051cdf494997832bc02c7db9fc9c5ba8f057d5fece28a3bf215761815e6014e843abe2c38a9424fb7
1820118201
languageName: node
1820218202
linkType: hard
1820318203

0 commit comments

Comments
 (0)