Skip to content

Recipes for GA - #41

Merged
aman06it merged 12 commits into
trailheadapps:feature/microfrontend-recipesfrom
aman06it:ga_lo_mfe
Jul 21, 2026
Merged

Recipes for GA#41
aman06it merged 12 commits into
trailheadapps:feature/microfrontend-recipesfrom
aman06it:ga_lo_mfe

Conversation

@aman06it

Copy link
Copy Markdown

What does this PR do?

What issues does this PR fix or reference?

#

The PR fulfills these requirements:

  • Tests for the proposed changes have been added/updated.
  • Code linting and formatting was performed.

Functionality Before

<insert gif and/or summary>

Functionality After

<insert gif and/or summary>

aman06it and others added 6 commits June 5, 2026 16:03
…folding

Reposition the React Recipes site as Multi-Framework Recipes per
docs/multi-framework-recipes-ui-plan.md.

- Registry: recipes now carry flavors[] (hosting × framework) with
  resolveFlavor / hasFlavor / listRecipes helpers.
- Navbar: rebrand to Multi-Framework Recipes, add framework switcher
  (Vue/Angular disabled "(soon)", persisted to localStorage).
- Home: hosting radio filter, Hosting Models explainer, footer link
  to the (placeholder) advanced server-recipes repo.
- Standard category pages: hosting/framework chip next to the header.
- Embedding (MFE): URL-driven flavor switcher (host/fw params),
  contextual server-repo callout when externally-hosted, all unbuilt
  flavors visible as disabled "(soon)" tabs.
- Search: index hosting/framework keywords + category name; result
  rows show flavor chips.
- mfe-app/: standalone Vite app (Externally-Hosted React guests).
- force-app/main/default/lwc/: lwc-shell host components for the
  seven MFE recipes (basic embed, receive data, send event,
  auto-resize, theme tokens, dirty state, GraphQL bridge) plus a
  vendor lwc-shell shim and the Localhost CSP trusted site.

Verified: tsc -b, eslint, vitest 233/233.
Replaces the legacy @salesforce/experimental-mfe-bridge / vendored
<lwc-shell> stack with the GA-track @salesforce/platform-sdk and the
<lightning-embedding> base component, matching the lo2demo-sfdx
react-sdk pattern.

Guest (mfe-app):
- Switch dependency from @salesforce/experimental-mfe-bridge to
  @salesforce/platform-sdk@10.9.2; add side-effect import
  @salesforce/platform-sdk/sf-embedding in main.tsx
- Add SdkProvider context + useSdk() hook; resolve chat/view SDKs
  once at startup via top-level await Promise.all
- Rewrite all six recipes against the SDK surface:
  - BasicEmbed: chat.getHostContext()
  - ReceiveData: view.getUiProps() + URLSearchParams fallback
  - SendEvent: view.dispatchEvent(name, data)
  - AutoResize: view.resize() driven by ResizeObserver
  - ThemeTokens: view.getTheme() + chat.getHostContext()
  - DirtyState: view.markDirtyState() / clearDirtyState()
- Drop GraphQLBridge recipe (host-side bridge.graphql() retired)

Host (LWC):
- Replace each mfe* host with a declarative <lightning-embedding>
  wrapper; drop imperative document.createElement('lwc-shell') and
  c/vendorLwcShell imports
- Delete vendored vendorLwcShell (no longer needed; <lightning-embedding>
  is provided by the platform)
- Delete mfeGraphQL host

Explorer / docs:
- Rename Embedding route /mfe -> /embedding
- Update Mfe.tsx, recipeRegistry, READMEs, CSP description, and Home
  page copy to reflect the SDK-shaped recipes
- ReceiveData: host publishes via props binding; guest reads getUiState (drop URL query-param remount)
- ThemeTokens: publish tokens on both style variables and props channels for base-component version resilience; guest prefers styles.variables, falls back to props
- AutoResize: rely on bootstrap's auto-attached EmbeddingResizer; remove fixed-height cap so iframe grows with content
- bump @salesforce/platform-sdk to ^11.27.0
- ignore *.tsbuildinfo
aman06it and others added 6 commits July 15, 2026 22:47
Bumps [websocket-driver](https://github.com/faye/websocket-driver-node) from 0.7.4 to 0.7.5.
- [Changelog](https://github.com/faye/websocket-driver-node/blob/main/CHANGELOG.md)
- [Commits](faye/websocket-driver-node@0.7.4...0.7.5)

---
updated-dependencies:
- dependency-name: websocket-driver
  dependency-version: 0.7.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
# Conflicts:
#	README.md
#	force-app/main/react-recipes/uiBundles/reactRecipes/package-lock.json
#	force-app/main/react-recipes/uiBundles/reactRecipes/package.json
@aman06it
aman06it merged commit 2f1d97a into trailheadapps:feature/microfrontend-recipes Jul 21, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants