Skip to content

Commit 01d3568

Browse files
authored
fix: Fix case where on demand feature view tab is broken if no custom tabs are passed. (#2682)
* 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 <[email protected]> * fix Signed-off-by: Danny Chiao <[email protected]>
1 parent 0384f5f commit 01d3568

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

sdk/python/feast/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@elastic/datemath": "^5.0.3",
77
"@elastic/eui": "^57.0.0",
88
"@emotion/react": "^11.9.0",
9-
"@feast-dev/feast-ui": "^0.20.3",
9+
"@feast-dev/feast-ui": "^0.20.4",
1010
"@testing-library/jest-dom": "^5.16.4",
1111
"@testing-library/react": "^13.2.0",
1212
"@testing-library/user-event": "^13.5.0",

sdk/python/feast/ui/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,10 +1345,10 @@
13451345
minimatch "^3.1.2"
13461346
strip-json-comments "^3.1.1"
13471347

1348-
"@feast-dev/feast-ui@^0.20.3":
1349-
version "0.20.3"
1350-
resolved "https://registry.yarnpkg.com/@feast-dev/feast-ui/-/feast-ui-0.20.3.tgz#809e77c516e0c2278cd972ee65b9ff86ac148440"
1351-
integrity sha512-9r5wxiH0lKAiE8WjgYk9hybpsIhAkqEdoXOOoEP2t/6wK6yMz5F92EKtWPID5rOnuobeWHEVjy19DU/cuwLWvQ==
1348+
"@feast-dev/feast-ui@^0.20.4":
1349+
version "0.20.4"
1350+
resolved "https://registry.yarnpkg.com/@feast-dev/feast-ui/-/feast-ui-0.20.4.tgz#4b918f8922f3eecd9e3e7323f25ba9cac78a4567"
1351+
integrity sha512-KTUhKni7t++G6UwXyPbGWXwWHnTOVTH8ouYCoHXbGorgRL3K4fbq5tCSCJzP9L5FAo+cF1AjVZNRgwzPe6vAgA==
13521352
dependencies:
13531353
"@elastic/datemath" "^5.0.3"
13541354
"@elastic/eui" "^55.0.1"

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@feast-dev/feast-ui",
3-
"version": "0.20.3",
3+
"version": "0.20.4",
44
"private": false,
55
"files": [
66
"dist"

ui/src/FeastUISansProviders.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
} from "./contexts/ProjectListContext";
3535

3636
interface FeastUIConfigs {
37-
tabsRegistry: FeastTabsRegistryInterface;
37+
tabsRegistry?: FeastTabsRegistryInterface;
3838
featureFlags?: FeatureFlags;
3939
projectListPromise?: Promise<any>;
4040
}

ui/src/custom-tabs/TabsRegistryContext.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ const useGenericCustomTabsNavigation = <
7272
const { pathname } = useLocation(); // Current Location
7373

7474
useEffect(() => {
75+
if (entries.length === 0) {
76+
return;
77+
}
7578
setTabs(
7679
entries.map(({ label, path }) => {
7780
const resolvedTabPath = resolvePath(path, featureViewRoot.pathname);
78-
7981
return {
8082
label,
8183
// Can't use the match hooks here b/c we're in a loop due

0 commit comments

Comments
 (0)