From 5727eeb49f6b6e542e5f50f3a3e2c4f42706e39d Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 13 Sep 2022 09:17:04 +0200 Subject: [PATCH 1/3] feature: Tooltips for Topics --- .../CategoriesSelect/CategoriesSelect.vue | 5 +++++ .../FilterMenu/CategoriesFilter.vue | 5 +++++ webapp/locales/de.json | 21 +++++++++++++++++++ webapp/locales/en.json | 21 +++++++++++++++++++ webapp/pages/post/_id/_slug/index.vue | 5 +++++ 5 files changed, 57 insertions(+) diff --git a/webapp/components/CategoriesSelect/CategoriesSelect.vue b/webapp/components/CategoriesSelect/CategoriesSelect.vue index b7d71de2d..24df0c179 100644 --- a/webapp/components/CategoriesSelect/CategoriesSelect.vue +++ b/webapp/components/CategoriesSelect/CategoriesSelect.vue @@ -9,6 +9,11 @@ :disabled="isDisabled(category.id)" :icon="category.icon" size="small" + v-tooltip="{ + content: $t(`contribution.category.description.${category.slug}`), + placement: 'bottom-start', + delay: { show: 500 }, + }" > {{ $t(`contribution.category.name.${category.slug}`) }} diff --git a/webapp/components/FilterMenu/CategoriesFilter.vue b/webapp/components/FilterMenu/CategoriesFilter.vue index 6ed37d4b3..23213929b 100644 --- a/webapp/components/FilterMenu/CategoriesFilter.vue +++ b/webapp/components/FilterMenu/CategoriesFilter.vue @@ -17,6 +17,11 @@ :filled="filteredCategoryIds.includes(category.id)" :label="$t(`contribution.category.name.${category.slug}`)" @click="toggleCategory(category.id)" + v-tooltip="{ + content: $t(`contribution.category.description.${category.slug}`), + placement: 'bottom-start', + delay: { show: 500 }, + }" /> diff --git a/webapp/locales/de.json b/webapp/locales/de.json index bc0b720c8..654376b4d 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -217,6 +217,27 @@ "infoSelectedNoOfMaxCategories": "{chosen} von {max} Themen ausgewählt" }, "category": { + "description": { + "body-and-excercise": "Sport, Yoga, Massage, Tanzen, Entspannung", + "children": "Familie, Pädagogik, Schule, Prägung", + "culture": "Kunst, Theater, Musik, Fotografie, Film", + "economy": "Handel, Konsum, Marketing, Lieferketten", + "energy": "Öl, Gas, Kohle, Wind, Wasserkraft, Biogas, Atomenergie", + "finance": "Geld, Finanzsystem, Alternativwährungen", + "health": "Medizin, Ernährung, WHO, Impfungen, Schadstoffe", + "home": "Bauen, Lebensgemeinschaften, Tiny Houses, Gemüsegarten", + "it-and-media": "Nachrichten, Manipulation, Datenschutz, Überwachung, Datenkraken, KI, Software, Apps", + "law": "Menschenrechte, Gesetze, Verordnungen", + "miscellaneous": "Miscellaneous", + "mobility": "Reise, Verkehr, Elektromobilität", + "nature": "Tiere, Pflanzen, Landwirtschaft, Ökologie, Artenvielfalt", + "networking": "Kooperation, Aktionsbündnisse, Solidarität, Hilfe", + "peace": "Krieg, Militär, soziale Verteidigung, Waffen, Cyberattacken", + "politics": "Demokratie, Mitbestimmung, Wahlen, Korruption, Parteien", + "psyche": "Seele, Gefühle, Glück", + "science": "Bildung, Hochschule, Publikationen", + "spirituality": "Religion, Werte, Ethik" + }, "name": { "body-and-excercise": "Körper & Bewegung", "children": "Kinder", diff --git a/webapp/locales/en.json b/webapp/locales/en.json index b3555378f..f2a6c3fc2 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -217,6 +217,27 @@ "infoSelectedNoOfMaxCategories": "{chosen} of {max} topics selected" }, "category": { + "description": { + "body-and-excercise": "Sports, yoga, massage, relaxation", + "children": "Family, education, school, imprinting", + "culture": "Art, theatre, music, photography, film", + "economy": "Trade, consumption, marketing, supply chains", + "energy": "Oil, gas, coal, wind, hydrodynamic power, biogas, atomic energy", + "finance": "Money, financial system, alternative currencies", + "health": "Medicine, nutrition, WHO, vaccination, harmful substances", + "home": "Construction, communities, tiny houses, kitchen garden", + "it-and-media": "News, manipulation, privacy, control, data leeches, AI, software, apps", + "law": "Human rights, laws, decrees", + "miscellaneous": "Miscellaneous", + "mobility": "Travel, traffic, electric mobility", + "nature": "Animals, plants, agriculture, ecologu, biodiversity", + "networking": "Cooperation, action alliances, solidarity, help", + "peace": "War, military, social defence, arms, cyber attacks", + "politics": "Democracy, participation, elections, corruption, parties", + "psyche": "Soul, feelings, happiness", + "science": "Education, university, publications", + "spirituality": "Religion, values, ethics" + }, "name": { "body-and-excercise": "Body & Excercise", "children": "Children", diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue index d02a448da..30268778d 100644 --- a/webapp/pages/post/_id/_slug/index.vue +++ b/webapp/pages/post/_id/_slug/index.vue @@ -54,6 +54,11 @@ :key="category.id" :icon="category.icon" :name="$t(`contribution.category.name.${category.slug}`)" + v-tooltip="{ + content: $t(`contribution.category.description.${category.slug}`), + placement: 'bottom-start', + delay: { show: 500 }, + }" /> From ba9a6fd750d273b01c7ef188b343d2579a517ac8 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 15 Sep 2022 09:25:46 +0200 Subject: [PATCH 2/3] Update webapp/locales/de.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Wolfgang Huß --- webapp/locales/de.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/locales/de.json b/webapp/locales/de.json index 654376b4d..753b2e9d1 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -228,7 +228,7 @@ "home": "Bauen, Lebensgemeinschaften, Tiny Houses, Gemüsegarten", "it-and-media": "Nachrichten, Manipulation, Datenschutz, Überwachung, Datenkraken, KI, Software, Apps", "law": "Menschenrechte, Gesetze, Verordnungen", - "miscellaneous": "Miscellaneous", + "miscellaneous": "Sonstiges", "mobility": "Reise, Verkehr, Elektromobilität", "nature": "Tiere, Pflanzen, Landwirtschaft, Ökologie, Artenvielfalt", "networking": "Kooperation, Aktionsbündnisse, Solidarität, Hilfe", From 64153ea9e3fe0fd6a1a1dee2c2ed4c9df7914679 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 15 Sep 2022 10:04:26 +0200 Subject: [PATCH 3/3] change delay of category tooltip to 1500 --- webapp/components/CategoriesSelect/CategoriesSelect.vue | 2 +- webapp/components/FilterMenu/CategoriesFilter.vue | 2 +- webapp/components/PostTeaser/PostTeaser.vue | 2 +- webapp/pages/post/_id/_slug/index.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/components/CategoriesSelect/CategoriesSelect.vue b/webapp/components/CategoriesSelect/CategoriesSelect.vue index 24df0c179..92779444f 100644 --- a/webapp/components/CategoriesSelect/CategoriesSelect.vue +++ b/webapp/components/CategoriesSelect/CategoriesSelect.vue @@ -12,7 +12,7 @@ v-tooltip="{ content: $t(`contribution.category.description.${category.slug}`), placement: 'bottom-start', - delay: { show: 500 }, + delay: { show: 1500 }, }" > {{ $t(`contribution.category.name.${category.slug}`) }} diff --git a/webapp/components/FilterMenu/CategoriesFilter.vue b/webapp/components/FilterMenu/CategoriesFilter.vue index 23213929b..552aa26a0 100644 --- a/webapp/components/FilterMenu/CategoriesFilter.vue +++ b/webapp/components/FilterMenu/CategoriesFilter.vue @@ -20,7 +20,7 @@ v-tooltip="{ content: $t(`contribution.category.description.${category.slug}`), placement: 'bottom-start', - delay: { show: 500 }, + delay: { show: 1500 }, }" /> diff --git a/webapp/components/PostTeaser/PostTeaser.vue b/webapp/components/PostTeaser/PostTeaser.vue index a973ca31f..75eefbfb2 100644 --- a/webapp/components/PostTeaser/PostTeaser.vue +++ b/webapp/components/PostTeaser/PostTeaser.vue @@ -33,7 +33,7 @@ v-tooltip="{ content: $t(`contribution.category.name.${category.slug}`), placement: 'bottom-start', - delay: { show: 500 }, + delay: { show: 1500 }, }" :icon="category.icon" /> diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue index 30268778d..ff5c9a498 100644 --- a/webapp/pages/post/_id/_slug/index.vue +++ b/webapp/pages/post/_id/_slug/index.vue @@ -57,7 +57,7 @@ v-tooltip="{ content: $t(`contribution.category.description.${category.slug}`), placement: 'bottom-start', - delay: { show: 500 }, + delay: { show: 1500 }, }" />