Skip to content

Commit c73ac4c

Browse files
committed
Standardize accent font usage with a mixin and update section translation keys
- general, chatbots, api calls should use 'accent' font family - should use uniformly --letter-spacing-accent - change headings 'chatbots' to 'web', 'api calls' to 'api'. - add mixin '@mixin bangers' that includes font family, font weight and letter spacing. use it instead of specifying each of these individually in css classes ├── apps │ └── editor │ └── src │ └── views │ ├── prompt │ │ └── frontend │ │ └── Home │ │ └── Home.module.scss │ └── settings │ └── frontend │ ├── App.tsx │ ├── Home │ │ └── Home.tsx │ └── i18n │ ├── translations │ │ ├── api-calls.ts │ │ ├── chatbots.ts │ │ ├── index.ts │ │ └── sections.ts │ └── use-translation.tsx └── packages └── ui └── src ├── components │ └── editor │ ├── common │ │ └── prompts │ │ └── PromptField │ │ └── PromptField.module.scss │ ├── prompt │ │ ├── IconAccentButton │ │ │ └── IconAccentButton.module.scss │ │ ├── ModeButton │ │ │ └── ModeButton.module.scss │ │ └── Tabs │ │ └── Tabs.module.scss │ └── settings │ ├── DefaultConfigurationSelector │ │ ├── DefaultConfigurationSelector.module.scss │ │ ├── DefaultConfigurationSelector.tsx │ │ └── index.ts │ ├── Group │ │ ├── Group.module.scss │ │ ├── Group.tsx │ │ └── use-last-group-padding.ts │ ├── Item │ │ ├── Item.module.scss │ │ ├── Item.stories.tsx │ │ ├── Item.tsx │ │ └── index.ts │ ├── Layout │ │ ├── Layout.module.scss │ │ ├── Layout.tsx │ │ └── index.ts │ ├── Modal │ │ ├── Form │ │ │ ├── Form.module.scss │ │ │ ├── Form.tsx │ │ │ └── index.ts │ │ ├── Modal.module.scss │ │ ├── Modal.tsx │ │ └── index.ts │ ├── NavigationItemGroup │ │ ├── NavigationItemGroup.module.scss │ │ ├── NavigationItemGroup.tsx │ │ └── index.ts │ ├── NavigationItemSection │ │ ├── NavigationItemSection.module.scss │ │ ├── NavigationItemSection.tsx │ │ └── index.ts │ ├── NavigationSection │ │ ├── NavigationSection.module.scss │ │ ├── NavigationSection.tsx │ │ └── index.ts │ ├── Notice │ │ ├── Notice.module.scss │ │ ├── Notice.tsx │ │ └── index.ts │ ├── Section │ │ ├── Section.module.scss │ │ ├── Section.tsx │ │ └── index.ts │ ├── SortableList │ │ ├── SortableList.module.scss │ │ ├── SortableList.stories.tsx │ │ ├── SortableList.tsx │ │ └── index.ts │ └── Templates │ ├── Templates.module.scss │ ├── Templates.tsx │ └── index.ts ├── constants │ └── sizes.ts └── styles └── foundation ├── _colors.scss ├── _index.scss ├── _mixins.scss └── _variables.scss
1 parent b856246 commit c73ac4c

17 files changed

Lines changed: 56 additions & 57 deletions

File tree

‎apps/editor/src/views/prompt/frontend/Home/Home.module.scss‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@
5656
display: flex;
5757
align-items: center;
5858
height: 24px;
59-
font-family: var(--font-family-accent);
59+
@include accent-font;
6060
font-size: 18px;
6161
line-height: 1;
62-
letter-spacing: 1px;
6362
padding-top: 1px;
6463
white-space: nowrap;
6564
}

‎apps/editor/src/views/settings/frontend/Home/Home.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const NAV_ITEMS_CONFIG: NavConfigItem[] = [
6565
},
6666
{
6767
id: 'section:chatbots',
68-
label: 'chatbots.title'
68+
label: 'web.title'
6969
},
7070
{
7171
id: 'section:chatbots:group:web-configurations',
@@ -77,7 +77,7 @@ const NAV_ITEMS_CONFIG: NavConfigItem[] = [
7777
},
7878
{
7979
id: 'section:api-calls',
80-
label: 'api-calls.title'
80+
label: 'api.title'
8181
},
8282
{
8383
id: 'section:api-calls:group:model-providers',

‎apps/editor/src/views/settings/frontend/Home/sections/ApiConfigurationsSection.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const ApiConfigurationsSection = forwardRef<HTMLDivElement, Props>(
7070
return (
7171
<UiSection
7272
ref={ref}
73-
title={t('api-calls.title')}
73+
title={t('api.title')}
7474
subtitle={t('api-calls.subtitle')}
7575
>
7676
<UiNotice type="info">

‎apps/editor/src/views/settings/frontend/Home/sections/WebConfigurationsSection.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export const WebConfigurationsSection = forwardRef<HTMLDivElement, Props>(
108108
return (
109109
<UiSection
110110
ref={ref}
111-
title={t('chatbots.title')}
111+
title={t('web.title')}
112112
subtitle={t('chatbots.subtitle')}
113113
>
114114
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>

‎apps/editor/src/views/settings/frontend/i18n/translations/api-calls.ts‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
export const translations = {
2-
'api-calls.title': {
3-
en: 'API Calls',
4-
pl: 'Konfiguracje API',
5-
'zh-cn': 'API 配置',
6-
ja: '設定',
7-
'zh-tw': '設定',
8-
de: 'API-Konfigurationen',
9-
es: 'Configuraciones de API',
10-
fr: 'Configurations API',
11-
'pt-br': 'Configurações de API',
12-
ru: 'Конфигурации API',
13-
ko: 'API 구성',
14-
it: 'Configurazioni API',
15-
tr: 'API Yapılandırmaları',
16-
cs: 'Konfigurace API',
17-
hu: 'API Konfigurációk',
18-
bg: 'API Конфигурации'
2+
'api.title': {
3+
en: 'API',
4+
pl: 'API',
5+
'zh-cn': 'API',
6+
ja: 'API',
7+
'zh-tw': 'API',
8+
de: 'API',
9+
es: 'API',
10+
fr: 'API',
11+
'pt-br': 'API',
12+
ru: 'API',
13+
ko: 'API',
14+
it: 'API',
15+
tr: 'API',
16+
cs: 'API',
17+
hu: 'API',
18+
bg: 'API'
1919
},
2020
'api-calls.model-providers.title': {
2121
en: 'Model Providers',

‎apps/editor/src/views/settings/frontend/i18n/translations/chatbots.ts‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
export const translations = {
2-
'chatbots.title': {
3-
en: 'Chatbots',
4-
pl: 'Chatboty',
5-
'zh-cn': '聊天机器人',
6-
ja: 'チャットボット',
7-
'zh-tw': '聊天機器人',
8-
de: 'Chatbots',
9-
es: 'Chatbots',
10-
fr: 'Chatbots',
11-
'pt-br': 'Chatbots',
12-
ru: 'Чат-боты',
13-
ko: '챗봇',
14-
it: 'Chatbot',
15-
tr: 'Sohbet Botları',
16-
cs: 'Chatboti',
17-
hu: 'Chatbotok',
18-
bg: 'Чатботове'
2+
'web.title': {
3+
en: 'Web',
4+
pl: 'Web',
5+
'zh-cn': 'Web',
6+
ja: 'Web',
7+
'zh-tw': 'Web',
8+
de: 'Web',
9+
es: 'Web',
10+
fr: 'Web',
11+
'pt-br': 'Web',
12+
ru: 'Web',
13+
ko: 'Web',
14+
it: 'Web',
15+
tr: 'Web',
16+
cs: 'Web',
17+
hu: 'Web',
18+
bg: 'Web'
1919
},
2020
'chatbots.configurations.title': {
2121
en: 'Configurations',

‎packages/ui/src/components/editor/common/prompts/PromptField/PromptField.module.scss‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,8 @@
273273

274274
&__button {
275275
position: relative;
276-
font-family: var(--font-family-accent);
276+
@include accent-font;
277277
color: var(--cwc-text-color-dimmed);
278-
letter-spacing: 1px;
279278
font-size: 16px;
280279
padding: 0 4px;
281280

‎packages/ui/src/components/editor/prompt/IconAccentButton/IconAccentButton.module.scss‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,9 @@
102102
}
103103

104104
&__label {
105-
font-family: var(--font-family-accent);
105+
@include accent-font;
106106
font-size: 16px;
107107
line-height: 1;
108-
letter-spacing: 1px;
109108
padding-top: 2px;
110109
padding-right: 1px;
111110
overflow: hidden;

‎packages/ui/src/components/editor/prompt/ModeButton/ModeButton.module.scss‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@
3333
}
3434

3535
&__label {
36-
font-family: var(--font-family-accent);
36+
@include accent-font;
3737
font-size: 32px;
38-
letter-spacing: 1.5px;
3938
}
4039

4140
&__label-char {

‎packages/ui/src/components/editor/prompt/Tabs/Tabs.module.scss‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919
}
2020

2121
&__tab {
22-
font-family: var(--font-family-accent);
22+
@include accent-font;
2323
font-size: 16px;
2424
padding: 5px 9px 0 9px;
25-
letter-spacing: 1px;
2625
display: flex;
2726
align-items: center;
2827
text-transform: none;

0 commit comments

Comments
 (0)