Skip to content

Commit 84e7591

Browse files
heyOnuohaguyb1
andauthored
fix: improve title name edit interaction (chartdb#367)
* chore(main): improve table name edit interaction * chore: fix lint issues * feat(i18n): add double-click functionality and tooltip translations - Change editable titles action to `onDoubleClick` - Add tooltip translations for table name editing feature - Support for 9 languages: Russian, Japanese, Hindi, French, Spanish, German, Ukrainian, Portuguese, and Korean - Improve UX by indicating double-click edit functionality across languages * naming + some padding --------- Co-authored-by: Guy Ben-Aharon <[email protected]>
1 parent 545e857 commit 84e7591

File tree

13 files changed

+195
-118
lines changed

13 files changed

+195
-118
lines changed

src/globals.css

Lines changed: 66 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3,69 +3,73 @@
33
@tailwind utilities;
44

55
@layer base {
6-
:root {
7-
--background: 0 0% 100%;
8-
--foreground: 222.2 84% 4.9%;
9-
--card: 0 0% 100%;
10-
--card-foreground: 222.2 84% 4.9%;
11-
--popover: 0 0% 100%;
12-
--popover-foreground: 222.2 84% 4.9%;
13-
--primary: 222.2 47.4% 11.2%;
14-
--primary-foreground: 210 40% 98%;
15-
--secondary: 210 40% 96.1%;
16-
--secondary-foreground: 222.2 47.4% 11.2%;
17-
--muted: 210 40% 96.1%;
18-
--muted-foreground: 215.4 16.3% 46.9%;
19-
--accent: 210 40% 96.1%;
20-
--accent-foreground: 222.2 47.4% 11.2%;
21-
--destructive: 0 84.2% 60.2%;
22-
--destructive-foreground: 210 40% 98%;
23-
--border: 214.3 31.8% 91.4%;
24-
--input: 214.3 31.8% 91.4%;
25-
--ring: 222.2 84% 4.9%;
26-
--radius: 0.5rem;
27-
--chart-1: 12 76% 61%;
28-
--chart-2: 173 58% 39%;
29-
--chart-3: 197 37% 24%;
30-
--chart-4: 43 74% 66%;
31-
--chart-5: 27 87% 67%;
32-
--subtitle: 215.3 19.3% 34.5%;
33-
}
6+
:root {
7+
--background: 0 0% 100%;
8+
--foreground: 222.2 84% 4.9%;
9+
--card: 0 0% 100%;
10+
--card-foreground: 222.2 84% 4.9%;
11+
--popover: 0 0% 100%;
12+
--popover-foreground: 222.2 84% 4.9%;
13+
--primary: 222.2 47.4% 11.2%;
14+
--primary-foreground: 210 40% 98%;
15+
--secondary: 210 40% 96.1%;
16+
--secondary-foreground: 222.2 47.4% 11.2%;
17+
--muted: 210 40% 96.1%;
18+
--muted-foreground: 215.4 16.3% 46.9%;
19+
--accent: 210 40% 96.1%;
20+
--accent-foreground: 222.2 47.4% 11.2%;
21+
--destructive: 0 84.2% 60.2%;
22+
--destructive-foreground: 210 40% 98%;
23+
--border: 214.3 31.8% 91.4%;
24+
--input: 214.3 31.8% 91.4%;
25+
--ring: 222.2 84% 4.9%;
26+
--radius: 0.5rem;
27+
--chart-1: 12 76% 61%;
28+
--chart-2: 173 58% 39%;
29+
--chart-3: 197 37% 24%;
30+
--chart-4: 43 74% 66%;
31+
--chart-5: 27 87% 67%;
32+
--subtitle: 215.3 19.3% 34.5%;
33+
}
3434

35-
.dark {
36-
--background: 222.2 84% 4.9%;
37-
--foreground: 210 40% 98%;
38-
--card: 222.2 84% 4.9%;
39-
--card-foreground: 210 40% 98%;
40-
--popover: 222.2 84% 4.9%;
41-
--popover-foreground: 210 40% 98%;
42-
--primary: 210 40% 98%;
43-
--primary-foreground: 222.2 47.4% 11.2%;
44-
--secondary: 217.2 32.6% 17.5%;
45-
--secondary-foreground: 210 40% 98%;
46-
--muted: 217.2 32.6% 17.5%;
47-
--muted-foreground: 215 20.2% 65.1%;
48-
--accent: 217.2 32.6% 17.5%;
49-
--accent-foreground: 210 40% 98%;
50-
--destructive: 0 62.8% 30.6%;
51-
--destructive-foreground: 210 40% 98%;
52-
--border: 217.2 32.6% 17.5%;
53-
--input: 217.2 32.6% 17.5%;
54-
--ring: 212.7 26.8% 83.9%;
55-
--chart-1: 220 70% 50%;
56-
--chart-2: 160 60% 45%;
57-
--chart-3: 30 80% 55%;
58-
--chart-4: 280 65% 60%;
59-
--chart-5: 340 75% 55%;
60-
--subtitle: 212.7 26.8% 83.9%;
61-
}
35+
.dark {
36+
--background: 222.2 84% 4.9%;
37+
--foreground: 210 40% 98%;
38+
--card: 222.2 84% 4.9%;
39+
--card-foreground: 210 40% 98%;
40+
--popover: 222.2 84% 4.9%;
41+
--popover-foreground: 210 40% 98%;
42+
--primary: 210 40% 98%;
43+
--primary-foreground: 222.2 47.4% 11.2%;
44+
--secondary: 217.2 32.6% 17.5%;
45+
--secondary-foreground: 210 40% 98%;
46+
--muted: 217.2 32.6% 17.5%;
47+
--muted-foreground: 215 20.2% 65.1%;
48+
--accent: 217.2 32.6% 17.5%;
49+
--accent-foreground: 210 40% 98%;
50+
--destructive: 0 62.8% 30.6%;
51+
--destructive-foreground: 210 40% 98%;
52+
--border: 217.2 32.6% 17.5%;
53+
--input: 217.2 32.6% 17.5%;
54+
--ring: 212.7 26.8% 83.9%;
55+
--chart-1: 220 70% 50%;
56+
--chart-2: 160 60% 45%;
57+
--chart-3: 30 80% 55%;
58+
--chart-4: 280 65% 60%;
59+
--chart-5: 340 75% 55%;
60+
--subtitle: 212.7 26.8% 83.9%;
61+
}
6262
}
6363

6464
@layer base {
65-
* {
66-
@apply border-border;
67-
}
68-
body {
69-
@apply bg-background text-foreground;
70-
}
71-
}
65+
* {
66+
@apply border-border;
67+
}
68+
body {
69+
@apply bg-background text-foreground;
70+
}
71+
72+
.text-editable {
73+
@apply dark:group-hover:bg-slate-900 group-hover:bg-slate-100 group-hover:ring-[0.5px] rounded-md cursor-pointer;
74+
}
75+
}

src/i18n/locales/de.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ export const de: LanguageTranslation = {
346346
edit_table: 'Tabelle bearbeiten',
347347
delete_table: 'Tabelle löschen',
348348
},
349+
350+
tool_tips: {
351+
double_click_to_edit: 'Doppelklicken zum Bearbeiten',
352+
},
349353
},
350354
};
351355

src/i18n/locales/en.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ export const en = {
345345
edit_table: 'Edit Table',
346346
delete_table: 'Delete Table',
347347
},
348+
349+
tool_tips: {
350+
double_click_to_edit: 'Double-click to edit',
351+
},
348352
},
349353
};
350354

src/i18n/locales/es.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,10 @@ export const es: LanguageTranslation = {
353353
edit_table: 'Editar Tabla',
354354
delete_table: 'Eliminar Tabla',
355355
},
356+
357+
tool_tips: {
358+
double_click_to_edit: 'Doble clic para editar',
359+
},
356360
},
357361
};
358362

src/i18n/locales/fr.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ export const fr: LanguageTranslation = {
349349
edit_table: 'Éditer la Table',
350350
delete_table: 'Supprimer la Table',
351351
},
352+
353+
tool_tips: {
354+
double_click_to_edit: 'Double-cliquez pour modifier',
355+
},
352356
},
353357
};
354358

src/i18n/locales/hi.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ export const hi: LanguageTranslation = {
348348
edit_table: 'तालिका संपादित करें',
349349
delete_table: 'तालिका हटाएँ',
350350
},
351+
352+
tool_tips: {
353+
double_click_to_edit: 'संपादित करने के लिए डबल-क्लिक करें',
354+
},
351355
},
352356
};
353357

src/i18n/locales/ja.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ export const ja: LanguageTranslation = {
350350
edit_table: 'テーブルを編集',
351351
delete_table: 'テーブルを削除',
352352
},
353+
354+
tool_tips: {
355+
double_click_to_edit: 'ダブルクリックして編集',
356+
},
353357
},
354358
};
355359

src/i18n/locales/ko_KR.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ export const ko_KR: LanguageTranslation = {
344344
edit_table: '테이블 수정',
345345
delete_table: '테이블 삭제',
346346
},
347+
348+
tool_tips: {
349+
double_click_to_edit: '더블클릭하여 편집',
350+
},
347351
},
348352
};
349353

src/i18n/locales/pt_BR.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ export const pt_BR: LanguageTranslation = {
345345
edit_table: 'Editar Tabela',
346346
delete_table: 'Excluir Tabela',
347347
},
348+
349+
tool_tips: {
350+
double_click_to_edit: 'Duplo clique para editar',
351+
},
348352
},
349353
};
350354

src/i18n/locales/uk.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ export const uk: LanguageTranslation = {
345345
edit_table: 'Редагувати таблицю',
346346
delete_table: 'Видалити таблицю',
347347
},
348+
349+
tool_tips: {
350+
double_click_to_edit: 'Двойной клик для редактирования',
351+
},
348352
},
349353
};
350354

0 commit comments

Comments
 (0)