From 1acc0754071b579dbb100f48fb72a0bd21f4c130 Mon Sep 17 00:00:00 2001 From: ImUrX Date: Thu, 14 Mar 2024 21:09:06 -0300 Subject: [PATCH 1/2] add height tip and full reset step --- gui/public/i18n/en/translation.ftl | 2 + .../body-proportions/AutomaticProportions.tsx | 2 + .../autobone-steps/Preparation.tsx | 70 +++++++++++++++++++ .../autobone-steps/\320\241heckHeight.tsx" | 31 ++++---- 4 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 gui/src/components/onboarding/pages/body-proportions/autobone-steps/Preparation.tsx diff --git a/gui/public/i18n/en/translation.ftl b/gui/public/i18n/en/translation.ftl index 0c3d0904bd..42f2d7414d 100644 --- a/gui/public/i18n/en/translation.ftl +++ b/gui/public/i18n/en/translation.ftl @@ -814,6 +814,8 @@ onboarding-automatic_proportions-check_height-title = Check your height onboarding-automatic_proportions-check_height-description = We use your height as a basis of our measurements by using the headset's (HMD) height as an approximation of your actual height, but it's better to check if they are right yourself! # All the text is in bold! onboarding-automatic_proportions-check_height-calculation_warning = Please press the button while standing upright to calculate your height. You have 3 seconds after you press the button! +onboarding-automatic_proportions-check_height-guardian_tip = If you are using an standalone VR, be sure to have your guardian/ + boundary turned on so your height is correct! onboarding-automatic_proportions-check_height-fetch_height = I'm standing! # Context is that the height is unknown onboarding-automatic_proportions-check_height-unknown = Unknown diff --git a/gui/src/components/onboarding/pages/body-proportions/AutomaticProportions.tsx b/gui/src/components/onboarding/pages/body-proportions/AutomaticProportions.tsx index af6b7fb7b5..629353e2db 100644 --- a/gui/src/components/onboarding/pages/body-proportions/AutomaticProportions.tsx +++ b/gui/src/components/onboarding/pages/body-proportions/AutomaticProportions.tsx @@ -14,6 +14,7 @@ import { StartRecording } from './autobone-steps/StartRecording'; import { VerifyResultsStep } from './autobone-steps/VerifyResults'; import { useCountdown } from '@/hooks/countdown'; import { CheckHeight } from './autobone-steps/СheckHeight'; +import { PreparationStep } from './autobone-steps/Preparation'; export function AutomaticProportionsPage() { const { l10n } = useLocalization(); @@ -50,6 +51,7 @@ export function AutomaticProportionsPage() { variant={state.alonePage ? 'alone' : 'onboarding'} steps={[ { type: 'numbered', component: PutTrackersOnStep }, + { type: 'numbered', component: PreparationStep }, { type: 'numbered', component: RequirementsStep }, { type: 'numbered', component: CheckHeight }, { type: 'numbered', component: StartRecording }, diff --git a/gui/src/components/onboarding/pages/body-proportions/autobone-steps/Preparation.tsx b/gui/src/components/onboarding/pages/body-proportions/autobone-steps/Preparation.tsx new file mode 100644 index 0000000000..81f9300a89 --- /dev/null +++ b/gui/src/components/onboarding/pages/body-proportions/autobone-steps/Preparation.tsx @@ -0,0 +1,70 @@ +import { ResetType } from 'solarxr-protocol'; +import { Button } from '@/components/commons/Button'; +import { Typography } from '@/components/commons/Typography'; +import { ResetButton } from '@/components/home/ResetButton'; +import { useLocalization } from '@fluent/react'; +import { useBreakpoint } from '@/hooks/breakpoint'; + +export function PreparationStep({ + nextStep, + prevStep, + variant, +}: { + nextStep: () => void; + prevStep: () => void; + variant: 'onboarding' | 'alone'; +}) { + const { isMobile } = useBreakpoint('mobile'); + const { l10n } = useLocalization(); + + return ( +
+
+
+ + {l10n.getString('onboarding-automatic_mounting-preparation-title')} + +
+ + {l10n.getString( + 'onboarding-automatic_mounting-preparation-step-0' + )} + + + {l10n.getString( + 'onboarding-automatic_mounting-preparation-step-1' + )} + +
+
+ {isMobile && ( +
+ Reset position +
+ )} +
+ + +
+
+ {!isMobile && ( +
+ Reset position +
+ )} +
+ ); +} diff --git "a/gui/src/components/onboarding/pages/body-proportions/autobone-steps/\320\241heckHeight.tsx" "b/gui/src/components/onboarding/pages/body-proportions/autobone-steps/\320\241heckHeight.tsx" index 185eac9d62..1bed346ae5 100644 --- "a/gui/src/components/onboarding/pages/body-proportions/autobone-steps/\320\241heckHeight.tsx" +++ "b/gui/src/components/onboarding/pages/body-proportions/autobone-steps/\320\241heckHeight.tsx" @@ -18,6 +18,7 @@ import { } from '@/components/onboarding/pages/body-proportions/ProportionsChoose'; import { useLocaleConfig } from '@/i18n/config'; import { useCountdown } from '@/hooks/countdown'; +import { TipBox } from '@/components/commons/TipBox'; interface HeightForm { height: number; @@ -104,18 +105,24 @@ export function CheckHeight({ - +
+ + + {l10n.getString( + 'onboarding-automatic_proportions-check_height-guardian_tip' + )} + +
Date: Wed, 20 Mar 2024 22:40:29 -0300 Subject: [PATCH 2/2] fox review Co-authored-by: Erimel --- gui/public/i18n/en/translation.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/public/i18n/en/translation.ftl b/gui/public/i18n/en/translation.ftl index 42f2d7414d..1edea1610f 100644 --- a/gui/public/i18n/en/translation.ftl +++ b/gui/public/i18n/en/translation.ftl @@ -814,8 +814,8 @@ onboarding-automatic_proportions-check_height-title = Check your height onboarding-automatic_proportions-check_height-description = We use your height as a basis of our measurements by using the headset's (HMD) height as an approximation of your actual height, but it's better to check if they are right yourself! # All the text is in bold! onboarding-automatic_proportions-check_height-calculation_warning = Please press the button while standing upright to calculate your height. You have 3 seconds after you press the button! -onboarding-automatic_proportions-check_height-guardian_tip = If you are using an standalone VR, be sure to have your guardian/ - boundary turned on so your height is correct! +onboarding-automatic_proportions-check_height-guardian_tip = If you are using a standalone VR headset, make sure to have your guardian/ + boundary turned on so that your height is correct! onboarding-automatic_proportions-check_height-fetch_height = I'm standing! # Context is that the height is unknown onboarding-automatic_proportions-check_height-unknown = Unknown