Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat(onboarding): enhance plan selection UI and improve ModelViewer interaction

naveenkashf0dfe063ab48
diff --git a/apps/erp/app/routes/onboarding+/plan.tsx b/apps/erp/app/routes/onboarding+/plan.tsx
index 9e8e32132b..d9c4790b58 100644
--- a/apps/erp/app/routes/onboarding+/plan.tsx
+++ b/apps/erp/app/routes/onboarding+/plan.tsx
@@ -146,7 +146,7 @@ export default function OnboardingPlan() {
return (
<>
<div className="flex flex-col max-w-2xl w-full min-h-screen md:min-h-0">
- <div className="sticky top-0 bg-background z-10 pb-4">
+ <div className="sticky top-0 bg-background z-10 mb-4 rounded-2xl">
<CardHeader>
<CardTitle>
<Trans>Select a plan</Trans>
diff --git a/packages/react/src/ModelViewer.tsx b/packages/react/src/ModelViewer.tsx
index d03a231de3..7f10df68bc 100644
--- a/packages/react/src/ModelViewer.tsx
+++ b/packages/react/src/ModelViewer.tsx
@@ -36,6 +36,7 @@ export function ModelViewer({
const parentDiv = useRef<HTMLDivElement>(null);
const viewerRef = useRef<OV.EmbeddedViewer | null>(null);
const [isLoading, setIsLoading] = useState(true);
+ const [isActive, setIsActive] = useState(false);
const [unitSystem, setUnitSystem] = useState<UnitSystem>("metric");
const [modelInfo, setModelInfo] = useState<{
surfaceArea: number;
@@ -325,6 +326,7 @@ export function ModelViewer({
ref={parentDiv}
role={"img"}
aria-label="Canvas showing the model in the 3D Viewer"
+ onMouseLeave={() => setIsActive(false)}
className={cn(
"h-full w-full items-center justify-center rounded-lg border border-border bg-gradient-to-bl from-card from-50% via-card to-background min-h-[400px] shadow-md dark:border-none dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08)] relative",
@@ -337,6 +339,18 @@ export function ModelViewer({
</div>
) : (
<>
+ {!isActive && (
+ <button
+ type="button"
+ onClick={() => setIsActive(true)}
+ aria-label="Click to interact with 3D model"
+ className="absolute inset-0 flex items-end justify-center pb-4 cursor-pointer focus:outline-none group"
+ >
+ <span className="text-xs text-muted-foreground bg-background/80 backdrop-blur-sm px-3 py-1 rounded-full border border-border shadow-sm transition-opacity opacity-70 group-hover:opacity-100">
+ Click to interact
+ </span>
+ </button>
+ )}
<pre id="model-viewer-canvas" aria-hidden className="sr-only" />
{resetZoomButton && (
<IconButton