Skip to content

Commit

Permalink
fix: Fix case where on demand feature view tab is broken if no custom…
Browse files Browse the repository at this point in the history
… 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]>
  • Loading branch information
adchia authored May 13, 2022
1 parent 0384f5f commit 01d3568
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sdk/python/feast/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions sdk/python/feast/ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@feast-dev/feast-ui",
"version": "0.20.3",
"version": "0.20.4",
"private": false,
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion ui/src/FeastUISansProviders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
} from "./contexts/ProjectListContext";

interface FeastUIConfigs {
tabsRegistry: FeastTabsRegistryInterface;
tabsRegistry?: FeastTabsRegistryInterface;
featureFlags?: FeatureFlags;
projectListPromise?: Promise<any>;
}
Expand Down
4 changes: 3 additions & 1 deletion ui/src/custom-tabs/TabsRegistryContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01d3568

Please sign in to comment.