Skip to content

Conversation

@philip-nikolov-jpmc
Copy link

No description provided.

@github-actions github-actions bot added product PR or Issue related to the DataHub UI/UX community-contribution PR or Issue raised by member(s) of DataHub Community labels Nov 19, 2025
@codecov
Copy link

codecov bot commented Nov 19, 2025

Bundle Report

Changes will increase total bundle size by 49.24kB (0.17%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 28.69MB 49.24kB (0.17%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 49.24kB 19.06MB 0.26%

Files in assets/index-*.js:

  • ./src/app/mfeframework/MFEConfigurableContainer.tsx → Total Size: 5.45kB

  • ./src/app/mfeframework/mfeConfigLoader.tsx → Total Size: 3.42kB

  • ./src/app/homeV2/layout/navBarRedesign/NavSidebar.tsx → Total Size: 10.99kB

  • ./src/app/SearchRoutes.tsx → Total Size: 5.59kB

  • ./src/app/homeV2/layout/navBarRedesign/types.ts → Total Size: 376 bytes

  • ./src/app/homeV2/layout/navBarRedesign/NavBarMenuItemDropdown.tsx → Total Size: 3.42kB

  • ./src/app/mfeframework/ErrorComponent.tsx → Total Size: 570 bytes

  • ./src/app/mfeframework/mfeNavBarMenuUtils.tsx → Total Size: 1.94kB

@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Nov 19, 2025
@philip-nikolov-jpmc philip-nikolov-jpmc changed the title Datahub as a microfrontend host Datahub as a microfrontend host (react) Nov 19, 2025
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@ani-malgari ani-malgari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is amazing! Thank you for unlocking MFEs. I left some minor comments.

'/api/v2/graphql': frontendProxy,
'/openapi/v1/tracking/track': frontendProxy,
'/openapi/v1/files': frontendProxy,
'/api/mfe/config': frontendProxy,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be changed per feedback from Chris on the other PR.

throw new Error('[MFE Loader] Invalid YAML: missing microFrontends array');
}
// Validate each entry, keeping both valid and invalid ones
parsed.microFrontends = parsed.microFrontends.map(validateMFEConfig);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a big deal but we can filter out the invalid ones instead of storing them.

console.log('[HOST] attempting mount');

// Parse module string, something like: "myapp/mount"
const [remoteName, modulePath] = module.split('/');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we expect exactly 1 / in the module, i think it's worthwhile to also validate in the configLoader and also add a comment in the MFEConfig type

// MFE section (dropdown or spread)
let mfeSection: any[] = [];
if (mfeConfig) {
if (mfeConfig.subNavigationMode) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is great. thanks for accommodating subNavigation


export function useDynamicRoutes(): JSX.Element[] {
const mfeConfig = useMFEConfigFromBackend();
if (!mfeConfig) return [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could also add loading states for better UX.

@@ -0,0 +1,191 @@
import React, { useEffect, useRef, useState } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also it'll be great if we could cleanup the logs and performance monitoring that's not necessary.

const mfeConfig = useMFEConfigFromBackend();
if (!mfeConfig) return [];
// TODO- Reintroduce useMemo() hook here. Make it work with getting yaml from api as a react hook.
const isValidMFEConfig = (entry: MFEConfigEntry): entry is MFEConfig => !('invalid' in entry && entry.invalid);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the TODO. Let us know if you cannot get to it, i think it's important to wrap it in useMemo instead of computing the routes on every load.

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution PR or Issue raised by member(s) of DataHub Community pending-submitter-response Issue/request has been reviewed but requires a response from the submitter product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants