From 7f1bd702f0af8eb0899376baad6430a776f1f72b Mon Sep 17 00:00:00 2001 From: Michael Quested Date: Mon, 11 Dec 2023 13:53:48 +0000 Subject: [PATCH 1/3] Update data/train/model and action/sample text to match UI designs --- src/translations.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/translations.ts b/src/translations.ts index d3691abe2..b9fb84b37 100644 --- a/src/translations.ts +++ b/src/translations.ts @@ -46,7 +46,7 @@ export const translations: TranslationMap = { "content.data.addData": "Tilføj data", "content.data.classHelpHeader": "Klasse", "content.data.classHelpBody": "En klasse beskriver en type af bevægelse. Vi kan optage eksempler af en bestemt type bevægelse og putte eksemplerne i samme klasse. Træneren kan finde mønstre i eksemplerne/dataet og bruge disse mønstre til at træne en model, der kan genkende denne type bevægelse. Flere eksmpler vil typisk reulstere i en bedre model, men overvej på hvor mange forskellige måder en bevægelse kan laves.", - "content.data.classification": "Klasser", + "content.data.classification": TRANSLATION_NEEDED, "content.data.data": "Data", "content.data.choice": "Valg", "content.data.choice.header": "Valg af klasse", @@ -310,8 +310,8 @@ export const translations: TranslationMap = { "content.data.addData": "Add Data", "content.data.classHelpHeader": "Class", "content.data.classHelpBody": "A class describes a type of gesture. We can record examples of a certain type of gesture and put the examples in the same class. The trainer can find patterns in the examples/data and use these patterns to 'train' a model that can recognize this class of gestures. Multiple examples will typically result in a better model, and consider how many different ways a gesture can be performed.", - "content.data.classification": "Classes", - "content.data.data": "Data", + "content.data.classification": "Action", + "content.data.data": "Data samples", "content.data.choice": "Choice", "content.data.choice.header": "Choice of class", "content.data.choice.body": "Here, you choose which class you want to add data to. After having selected a class, you can either press the \"Record\" button below or press one of the buttons on your micro:bit to record a data segment. See the picture below.", @@ -394,12 +394,12 @@ export const translations: TranslationMap = { "footer.reconnecting":"Reconnecting. Please wait", //DATA MENU: - "menu.data.helpHeading": "Data", + "menu.data.helpHeading": "1. Add data", "menu.data.helpBody": "In order to train a model to recognize different movements, we need good examples of 'good behavior' that we can show the Trainer. Here you can create classes (types of gestures) and record examples for each class. There must be at least 2 classes with 3 examples each before the trainer can train a model.", "menu.data.examples": "examples", // TRAINER MENU: - "menu.trainer.helpHeading": "Trainer", + "menu.trainer.helpHeading": "2. Train model", "menu.trainer.helpBody": "The Trainer looks at the examples in each of the classes and tries to 'learn' how the different classes can be recognized by searching for patterns in the data. Here you can train a model to recognize different gestures.", // In addition, you can configure the trainer, choose how the trainer should interpret the data and create test sets.", "menu.trainer.notConnected1": "You have not connected a micro:bit.", "menu.trainer.notConnected2": " Please do so via the button below", @@ -413,7 +413,7 @@ export const translations: TranslationMap = { "menu.trainer.isTrainingModelButton": "Training model", // MODEL MENU: - "menu.model.helpHeading": "Model", + "menu.model.helpHeading": "3. Test model", "menu.model.helpBody": "The model can be used in an interactive system. Here we use the trained model to predict gestures. You can connect another micro:bit and make it respond to the predicted gestures.", "menu.model.noModel": "No model", "menu.model.disconnect": "Disconnect output micro:bit", From a3627abf4a7cc48f50ad841bbfb93de4658dd220 Mon Sep 17 00:00:00 2001 From: Michael Quested Date: Mon, 11 Dec 2023 16:27:48 +0000 Subject: [PATCH 2/3] Add info icons with help text on hover for data page --- src/components/information/Information.svelte | 12 ++++++++---- src/pages/DataPage.svelte | 4 +++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/information/Information.svelte b/src/components/information/Information.svelte index de0891812..e1b847c93 100644 --- a/src/components/information/Information.svelte +++ b/src/components/information/Information.svelte @@ -39,19 +39,23 @@
onMouseEnter()} - on:mouseleave={() => (isOpen = false)} + class="w-auto flex" bind:clientWidth={w} bind:clientHeight={h} bind:this={domNode}> {#if iconText !== undefined}

{iconText}

+ onMouseEnter()} + on:mouseleave={() => (isOpen = false)} + /> {/if} {#if isOpen} diff --git a/src/pages/DataPage.svelte b/src/pages/DataPage.svelte index 60b3db7a6..7dc003b66 100644 --- a/src/pages/DataPage.svelte +++ b/src/pages/DataPage.svelte @@ -88,12 +88,13 @@
- +
@@ -101,6 +102,7 @@
From 0d910707ed8d75685ce3093ca8cdabdb9c893c7c Mon Sep 17 00:00:00 2001 From: Michael Quested Date: Tue, 12 Dec 2023 09:56:18 +0000 Subject: [PATCH 3/3] Linting --- src/components/information/Information.svelte | 9 ++------- src/pages/DataPage.svelte | 5 ++++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/information/Information.svelte b/src/components/information/Information.svelte index e1b847c93..f7cdd4df3 100644 --- a/src/components/information/Information.svelte +++ b/src/components/information/Information.svelte @@ -38,11 +38,7 @@ } -
+
{#if iconText !== undefined}

onMouseEnter()} - on:mouseleave={() => (isOpen = false)} - /> + on:mouseleave={() => (isOpen = false)} /> {/if} {#if isOpen} diff --git a/src/pages/DataPage.svelte b/src/pages/DataPage.svelte index 7dc003b66..0e5bb5f80 100644 --- a/src/pages/DataPage.svelte +++ b/src/pages/DataPage.svelte @@ -94,7 +94,10 @@ bodyText={$t('content.data.classHelpBody')} />

- +