Manta Developers
GitHub
Menu

Migrate to screens and future flags

Opt into the manta-base look and the v1 future flags at your own pace; 1.0 makes them the default.

@manta-eu/react is moving to the manta-base design in opt-in parts. Nothing changes for an app that upgrades and opts into nothing: every component it renders looks and acts as before. Take each part on its own, test it, and ship it when you are ready. In 1.0 the new parts become the default and the old ones are removed.

Part What you opt into How
The manta-base look The theme family: grounds, type sizes, corners, the page box themeFamily="manta-base"
Future flags Changes in how shared components act and lay out future={{ v1_…: true }}

The manta-base look

import { Providers } from "@manta-eu/react/providers";

<Providers mantaBaseUrl={mantaBaseUrl} themeFamily="manta-base">
  <App />
</Providers>;

An app on AppShell passes the same themeFamily and future props to AppShell, which hands them to Providers.

The theme only changes how components look.

Future flags

A future flag turns on one change in how shared components act or lay out. Each is off until you turn it on, and each v1_ flag becomes the default in 1.0, when the flag and the old behavior are removed.

Future flag What it changes
v1_expressiveMotion Buttons (press, label and loader), checkboxes, field messages and the input error icon, a select’s close and page changes move on springs and fades
v1_loadingButtonKeepsFocus A loading Button keeps focus (aria-disabled, aria-busy) instead of being natively disabled
v1_tableKeyboardNavigation Tables move focus with the arrow, Home and End keys, Escape clears the selection, and sort buttons take focus
v1_groupedSidebar The sidebar lists the datastore’s desks under the main entries, each desk a submenu of its own pages, the one you are on open
v1_fittedForecastAxes ForecastChart sizes its value axis to its labels and puts the Today tag above the plot
v1_screenLayouts PageHeader puts a back link above the title instead of the trail; no onboarding layer; Breadcrumbs wrap; ScopeTabs scrolls only its own strip to the active tab, never the page

Turn them all on with allFutureFlags:

import { allFutureFlags } from "@manta-eu/react/providers/FutureFlagsProvider";

<Providers mantaBaseUrl={mantaBaseUrl} future={allFutureFlags}>
  <App />
</Providers>;

Screens

A screen is the manta-base version of a route page, published beside the route it replaces. Swap one route for its screen when you are ready; the route keeps working until 1.0.

Deprecated route Screen
MemoriesRoute from @manta-eu/react/routes/memories MemoriesScreen from @manta-eu/react/screens/memories
DatastoresRoute from @manta-eu/react/routes/datastores DatastoresScreen from @manta-eu/react/screens/datastores
RulesOverviewPage from @manta-eu/react/routes/rules/pages RulesScreen from @manta-eu/react/screens/rules
RuleDetailsPage from @manta-eu/react/routes/rules/pages RuleScreen from @manta-eu/react/screens/rules
ExplainRoute from @manta-eu/react/routes/explain ExplainScreen from @manta-eu/react/screens/explain
DataExplorerLayout from @manta-eu/react/routes/data-explorer DataExplorerScreen from @manta-eu/react/screens/data-explorer
DataExplorerIndexRoute from @manta-eu/react/routes/data-explorer DataExplorerIndexScreen from @manta-eu/react/screens/data-explorer
DataExplorerRecentRoute from @manta-eu/react/routes/data-explorer DataExplorerRecentScreen from @manta-eu/react/screens/data-explorer
DataExplorerCoverageRoute from @manta-eu/react/routes/data-explorer DataExplorerCoverageScreen from @manta-eu/react/screens/data-explorer
DataExplorerIngestRoute from @manta-eu/react/routes/data-explorer DataExplorerIngestScreen from @manta-eu/react/screens/data-explorer
DataExplorerFilesRoute from @manta-eu/react/routes/data-explorer DataExplorerFilesScreen from @manta-eu/react/screens/data-explorer
DataExplorerPrefixRoute from @manta-eu/react/routes/data-explorer DataExplorerNamespaceScreen from @manta-eu/react/screens/data-explorer
DataExplorerTypeRoute from @manta-eu/react/routes/data-explorer DataExplorerClassScreen from @manta-eu/react/screens/data-explorer
DataExplorerEntityRoute from @manta-eu/react/routes/data-explorer DataExplorerEntityScreen from @manta-eu/react/screens/data-explorer
DataDetailRoute from @manta-eu/react/routes/data-explorer DataExplorerRecordScreen from @manta-eu/react/screens/data-explorer

The integrations route’s row parts and its connect forms moved the same way:

Deprecated part Replacement
ConnectionRow, ConnectionRowSkeleton from @manta-eu/react/routes/integrations/components/ConnectionRow ConnectionRow, ConnectionRowSkeleton from @manta-eu/react/screens/integrations
ProviderGroup, ProviderGroupSkeleton from @manta-eu/react/routes/integrations/components/ProviderGroup ProviderGroup, ProviderGroupSkeleton from @manta-eu/react/screens/integrations
CanvaConnectForm from @manta-eu/react/routes/integrations/connect-forms CanvaConnectForm from @manta-eu/react/screens/integrations/connect-forms
FigmaConnectForm from @manta-eu/react/routes/integrations/connect-forms FigmaConnectForm from @manta-eu/react/screens/integrations/connect-forms
GmailConnectForm from @manta-eu/react/routes/integrations/connect-forms GmailConnectForm from @manta-eu/react/screens/integrations/connect-forms
GoogleAdsConnectForm from @manta-eu/react/routes/integrations/connect-forms GoogleAdsConnectForm from @manta-eu/react/screens/integrations/connect-forms
GoogleAnalyticsConnectForm from @manta-eu/react/routes/integrations/connect-forms GoogleAnalyticsConnectForm from @manta-eu/react/screens/integrations/connect-forms
GoogleMerchantCenterConnectForm from @manta-eu/react/routes/integrations/connect-forms GoogleMerchantCenterConnectForm from @manta-eu/react/screens/integrations/connect-forms
ShopifyConnectForm from @manta-eu/react/routes/integrations/connect-forms ShopifyConnectForm from @manta-eu/react/screens/integrations/connect-forms
SlackConnectForm from @manta-eu/react/routes/integrations/connect-forms SlackConnectForm from @manta-eu/react/screens/integrations/connect-forms

The screens are designed for the manta-base look and the future flags; turn those on first. Some screens are new with no route before them:

  • Today (screens/today), Goals and each goal’s page (screens/goals);
  • Ask (screens/ask), the start of a chat and the plan cards under an answer;
  • Governance and its audit log (screens/governance);
  • the knowledge graph (screens/graph);
  • a new desk (screens/new-desk), the signup (screens/join) and the operator dashboard (screens/operator). Mount the app’s screens shows how to add them.

Deprecated props

RouteLayout and AuthenticatedChat read the signed-in user, the datastore and the permissions from the auth context. The props that passed them (user, datastore, datastores, isOperator, canSwitchDatastore, logout, allowedModels, and AuthenticatedChatLegacyProps for the chat) are still accepted and ignored. Read them with useAuthContext where you need them, and stop passing them.

decodeRuleRouteName from @manta-eu/react/routes/rules/components/rules.utils is deprecated: pass the route parameter, which the router already decodes, straight to ruleIriFromRouteName instead.

sdkRouteElements from @manta-eu/react/components/app-gate is deprecated: list the pages your app has instead.

selfServeSignup from @manta-eu/react/screens/join is deprecated and always answers false: read selfServeSignup from useAuthContext instead, which follows the server’s realm strategy.

Choose the pages

AppShell and AppShellRoutes take pages, the list of pages your app has. The sidebar, the account menu and the routes come from that list, and a page that is not on it is not found. Each page loads the first time someone opens it.

import { AppShell } from "@manta-eu/react/components/app-shell";
import { brandGuidelines, chat, dataExplorer, plans, type AppPage } from "@manta-eu/react/pages";
import { NotebookPen } from "lucide-react";
import { Route } from "react-router";
import { NotesRoute } from "./notes/NotesRoute";

const notes: AppPage = {
  id: "notes",
  nav: { title: "Notes", icon: NotebookPen, href: "/notes" },
  datastoreRoutes: <Route path="/notes" element={<NotesRoute />} />,
};

<AppShell themeFamily="manta-base" pages={[chat, plans, dataExplorer, brandGuidelines, notes]} />;

Without chat, the app has no chat: no chat panel, no New chat, and a datastore opens on the first page in the list. Without pages, the app gets defaultPages, the pages it had before.

What 1.0 changes

The manta-base look and every v1_ flag become the default, and the deprecated routes and props are removed.