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.

fix: restore card borders, float bottom-right popups and wrap hub progress card on phones

aashucfed85d0e670
diff --git a/apps/erp/app/components/ChangelogPanel.tsx b/apps/erp/app/components/ChangelogPanel.tsx
index 7b2a4c6f0e..d9aae7ad57 100644
--- a/apps/erp/app/components/ChangelogPanel.tsx
+++ b/apps/erp/app/components/ChangelogPanel.tsx
@@ -34,7 +34,7 @@ export default function ChangelogPanel({
animate={{ opacity: 1, y: 0, scale: 1, filter: "blur(0px)" }}
exit={{ opacity: 0, y: 10, scale: 0.95, filter: "blur(4px)" }}
transition={{ duration: 0.3, ease: "easeOut" }}
- className="fixed bottom-4 right-4 w-[calc(100vw-2rem)] max-w-[380px] rounded-lg border bg-background shadow-lg z-40 overflow-hidden max-md:inset-0 max-md:z-[60] max-md:w-full max-md:max-w-none max-md:overflow-y-auto max-md:rounded-none max-md:border-0 max-md:pt-safe max-md:pb-safe"
+ className="fixed bottom-4 right-4 w-[calc(100vw-2rem)] max-w-[380px] rounded-lg border bg-background shadow-lg z-40 overflow-hidden max-md:inset-x-2 max-md:bottom-[calc(0.5rem+env(safe-area-inset-bottom))] max-md:z-[60] max-md:w-auto max-md:max-w-none max-md:max-h-[85dvh] max-md:overflow-y-auto"
>
<div className="px-4 pt-4 pb-3 space-y-2">
<div className="flex items-center justify-between">
diff --git a/apps/erp/app/components/TrainingPanel.tsx b/apps/erp/app/components/TrainingPanel.tsx
index 29619d4120..e6ededf2c3 100644
--- a/apps/erp/app/components/TrainingPanel.tsx
+++ b/apps/erp/app/components/TrainingPanel.tsx
@@ -34,7 +34,7 @@ export default function TrainingPanel({
animate={{ opacity: 1, y: 0, scale: 1, filter: "blur(0px)" }}
exit={{ opacity: 0, y: 10, scale: 0.95, filter: "blur(4px)" }}
transition={{ duration: 0.3, ease: "easeOut" }}
- className="fixed bottom-4 right-4 w-[380px] rounded-lg border bg-background shadow-lg z-40 overflow-hidden max-md:inset-0 max-md:z-[60] max-md:w-full max-md:overflow-y-auto max-md:rounded-none max-md:border-0 max-md:pt-safe max-md:pb-safe"
+ className="fixed bottom-4 right-4 w-[380px] rounded-lg border bg-background shadow-lg z-40 overflow-hidden max-md:inset-x-2 max-md:bottom-[calc(0.5rem+env(safe-area-inset-bottom))] max-md:z-[60] max-md:w-auto max-md:max-w-none max-md:max-h-[85dvh] max-md:overflow-y-auto"
>
<div className="relative aspect-video w-full bg-muted">
<iframe
diff --git a/apps/erp/app/modules/agent/ui/AgentPanel.tsx b/apps/erp/app/modules/agent/ui/AgentPanel.tsx
index 3de3661fe2..4ea4027e2f 100644
--- a/apps/erp/app/modules/agent/ui/AgentPanel.tsx
+++ b/apps/erp/app/modules/agent/ui/AgentPanel.tsx
@@ -71,8 +71,8 @@ export function AgentPanel() {
return (
<div
className={`fixed right-4 z-40 flex flex-col w-100 max-w-[calc(100vw-2rem)] rounded-lg border bg-background shadow-lg overflow-hidden animate-in slide-in-from-top-4 fade-in duration-200 ${
- expanded ? "top-14 bottom-4" : "top-14 h-[45vh]"
- } max-md:inset-0 max-md:z-[60] max-md:h-auto max-md:w-full max-md:max-w-none max-md:rounded-none max-md:border-0 max-md:pt-safe max-md:pb-safe`}
+ expanded ? "top-14 bottom-4 max-md:h-[75dvh]" : "top-14 h-[45vh]"
+ } max-md:inset-x-2 max-md:top-auto max-md:bottom-[calc(0.5rem+env(safe-area-inset-bottom))] max-md:z-[60] max-md:w-auto max-md:max-w-none`}
>
<div className="flex items-center justify-between px-3 h-11 border-b shrink-0">
<div className="flex items-center gap-2">
diff --git a/packages/onboarding/src/ui/OnboardingHubSummary.tsx b/packages/onboarding/src/ui/OnboardingHubSummary.tsx
index 88d1df4074..c63e3e0a4f 100644
--- a/packages/onboarding/src/ui/OnboardingHubSummary.tsx
+++ b/packages/onboarding/src/ui/OnboardingHubSummary.tsx
@@ -34,9 +34,11 @@ export function OnboardingHubSummary({
}: OnboardingHubSummaryProps) {
const { t } = useLingui();
const pct = total > 0 ? Math.round((done / total) * 100) : 0;
+ // Phones: logo and progress share a row, the action wraps to its own
+ // full-width row below.
return (
- <Card className="relative flex-row items-center gap-5 p-6 pr-12 mb-6 bg-gradient-to-bl from-card from-50% to-background">
- <div className="shrink-0 size-12 rounded-xl border flex items-center justify-center">
+ <Card className="relative flex-row flex-wrap items-center gap-5 p-6 pr-12 mb-6 bg-gradient-to-bl from-card from-50% to-background max-md:gap-x-3 max-md:gap-y-4 max-md:p-4 max-md:pr-10">
+ <div className="shrink-0 size-12 rounded-xl border flex items-center justify-center max-md:size-10">
<img
src="/carbon-mark-light.svg"
alt="Carbon"
@@ -49,7 +51,7 @@ export function OnboardingHubSummary({
/>
</div>
<div className="flex-1 min-w-0">
- <div className="flex items-center gap-2">
+ <div className="flex flex-wrap items-center gap-x-2">
<h3 className="text-base font-semibold tracking-tight">{label}</h3>
{pending ? null : (
<span className="text-sm text-muted-foreground tabular-nums">
@@ -78,7 +80,7 @@ export function OnboardingHubSummary({
</p>
) : null}
</div>
- <div className="shrink-0">{action}</div>
+ <div className="shrink-0 max-md:w-full max-md:[&>*]:w-full">{action}</div>
{onDismiss ? (
<IconButton
aria-label={t`Hide`}
diff --git a/packages/react/src/Card.tsx b/packages/react/src/Card.tsx
index 0b3f147b64..200c484e5a 100644
--- a/packages/react/src/Card.tsx
+++ b/packages/react/src/Card.tsx
@@ -213,13 +213,14 @@ const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
if (context?.isCollapsed) {
return null;
}
- // Phones flatten the panel under its header. When the header before it is
- // hidden on phones, the panel is the card's top edge, so it stays rounded.
+ // Phones square off the panel's top under its header. When the header
+ // before it is hidden on phones, the panel is the card's top edge, so it
+ // stays rounded.
return (
<div
ref={ref}
className={cn(
- "flex flex-col flex-1 p-6 m-[-1px] rounded-xl border border-border bg-card dark:bg-muted/40 max-md:p-4 max-md:rounded-t-none max-md:border-x-0 max-md:border-b-0 max-md:[&:is([class~='max-md:hidden']+*)]:rounded-t-xl max-md:[&:is([class~='max-md:hidden']+*)]:border-t-0",
+ "flex flex-col flex-1 p-6 m-[-1px] rounded-xl border border-border bg-card dark:bg-muted/40 max-md:p-4 max-md:rounded-t-none max-md:[&:is([class~='max-md:hidden']+*)]:rounded-t-xl",
className
)}
{...props}