From 27b2c42023b33b32e56b4b6435b79dc5d5a2f121 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 5 Dec 2022 13:03:56 -0600 Subject: [PATCH] tour: open settings when triggered from startup Since we moved the first tour step to a possibly hidden place, we need to make sure it is showing before starting the tour. Fixes: https://github.com/pybricks/support/issues/823 --- CHANGELOG.md | 5 +++++ src/tour/Tour.tsx | 1 + 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf3cc619..e5973944 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ ## [Unreleased] +### Fixed +- Fixed first tour item not shown if settings is not open ([support#823]). + +[support#823]: https://github.com/pybricks/support/issues/823 + ## [2.0.0-beta.12] - 2022-12-02 ### Added diff --git a/src/tour/Tour.tsx b/src/tour/Tour.tsx index 0c20a98e..8d23dda3 100644 --- a/src/tour/Tour.tsx +++ b/src/tour/Tour.tsx @@ -241,6 +241,7 @@ const Tour: React.VoidFunctionComponent = () => { // automatically show the tour on the first run only useEffectOnce(() => { if (showOnStartup) { + setSelectedActivity(Activity.Settings); dispatch(tourStart()); setShowOnStartup(false); }