From dac96efd59e52aeb77aefbff94145b6239c2c83d Mon Sep 17 00:00:00 2001 From: Danny Chiao Date: Fri, 13 May 2022 00:39:59 -0400 Subject: [PATCH 1/2] fix: Fix case where on demand feature view tab is broken if no custom tabs are passed. Also allow projectListPromise to be passed without a tabs registry Signed-off-by: Danny Chiao --- ui/src/FeastUISansProviders.tsx | 2 +- ui/src/custom-tabs/TabsRegistryContext.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/FeastUISansProviders.tsx b/ui/src/FeastUISansProviders.tsx index a6df45b86d..628068f0f0 100644 --- a/ui/src/FeastUISansProviders.tsx +++ b/ui/src/FeastUISansProviders.tsx @@ -34,7 +34,7 @@ import { } from "./contexts/ProjectListContext"; interface FeastUIConfigs { - tabsRegistry: FeastTabsRegistryInterface; + tabsRegistry?: FeastTabsRegistryInterface; featureFlags?: FeatureFlags; projectListPromise?: Promise; } diff --git a/ui/src/custom-tabs/TabsRegistryContext.tsx b/ui/src/custom-tabs/TabsRegistryContext.tsx index 8ad58d7a16..a5321e9c40 100644 --- a/ui/src/custom-tabs/TabsRegistryContext.tsx +++ b/ui/src/custom-tabs/TabsRegistryContext.tsx @@ -72,10 +72,12 @@ const useGenericCustomTabsNavigation = < const { pathname } = useLocation(); // Current Location useEffect(() => { + if (entries.length === 0) { + return; + } setTabs( entries.map(({ label, path }) => { const resolvedTabPath = resolvePath(path, featureViewRoot.pathname); - return { label, // Can't use the match hooks here b/c we're in a loop due From ae84aa5a961be5c9d8e76013b84268e4991faf72 Mon Sep 17 00:00:00 2001 From: Danny Chiao Date: Fri, 13 May 2022 00:44:19 -0400 Subject: [PATCH 2/2] fix Signed-off-by: Danny Chiao --- sdk/python/feast/ui/package.json | 2 +- sdk/python/feast/ui/yarn.lock | 8 ++++---- ui/package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/python/feast/ui/package.json b/sdk/python/feast/ui/package.json index 0060c6b71b..556637aaae 100644 --- a/sdk/python/feast/ui/package.json +++ b/sdk/python/feast/ui/package.json @@ -6,7 +6,7 @@ "@elastic/datemath": "^5.0.3", "@elastic/eui": "^57.0.0", "@emotion/react": "^11.9.0", - "@feast-dev/feast-ui": "^0.20.3", + "@feast-dev/feast-ui": "^0.20.4", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.2.0", "@testing-library/user-event": "^13.5.0", diff --git a/sdk/python/feast/ui/yarn.lock b/sdk/python/feast/ui/yarn.lock index eee2a3db7e..f6301957c8 100644 --- a/sdk/python/feast/ui/yarn.lock +++ b/sdk/python/feast/ui/yarn.lock @@ -1345,10 +1345,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@feast-dev/feast-ui@^0.20.3": - version "0.20.3" - resolved "https://registry.yarnpkg.com/@feast-dev/feast-ui/-/feast-ui-0.20.3.tgz#809e77c516e0c2278cd972ee65b9ff86ac148440" - integrity sha512-9r5wxiH0lKAiE8WjgYk9hybpsIhAkqEdoXOOoEP2t/6wK6yMz5F92EKtWPID5rOnuobeWHEVjy19DU/cuwLWvQ== +"@feast-dev/feast-ui@^0.20.4": + version "0.20.4" + resolved "https://registry.yarnpkg.com/@feast-dev/feast-ui/-/feast-ui-0.20.4.tgz#4b918f8922f3eecd9e3e7323f25ba9cac78a4567" + integrity sha512-KTUhKni7t++G6UwXyPbGWXwWHnTOVTH8ouYCoHXbGorgRL3K4fbq5tCSCJzP9L5FAo+cF1AjVZNRgwzPe6vAgA== dependencies: "@elastic/datemath" "^5.0.3" "@elastic/eui" "^55.0.1" diff --git a/ui/package.json b/ui/package.json index 2addb26e9b..252faf8613 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "@feast-dev/feast-ui", - "version": "0.20.3", + "version": "0.20.4", "private": false, "files": [ "dist"