Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

Fix mobile formatting of tier grid (#2473)

Evan Hutnikc03e40748c9f
diff --git a/js/app/packages/app/component/interactive-onboarding/lessons/choose-plan.tsx b/js/app/packages/app/component/interactive-onboarding/lessons/choose-plan.tsx
index 6071134692..f11d910279 100644
--- a/js/app/packages/app/component/interactive-onboarding/lessons/choose-plan.tsx
+++ b/js/app/packages/app/component/interactive-onboarding/lessons/choose-plan.tsx
@@ -41,24 +41,22 @@ function ChoosePlanDemo() {
<div class="h-full w-full flex items-center justify-center px-8">
<PlanGrid
footer={(plan) => (
- <div class="mt-auto pt-2">
- <button
- type="button"
- onClick={(e) => {
- e.stopPropagation();
- handleCheckout(plan.tier);
- }}
- disabled={loading() !== null}
- class="w-full py-2 rounded-xs text-base font-semibold"
- classList={{
- 'bg-accent text-panel': !!plan.highlighted,
- 'bg-ink/8 text-ink hover:bg-ink/12': !plan.highlighted,
- 'opacity-60': loading() !== null,
- }}
- >
- {loading() === plan.tier ? 'Loading...' : `Get ${plan.name}`}
- </button>
- </div>
+ <button
+ type="button"
+ onClick={(e) => {
+ e.stopPropagation();
+ handleCheckout(plan.tier);
+ }}
+ disabled={loading() !== null}
+ class="w-full py-2 rounded-xs text-base font-semibold"
+ classList={{
+ 'bg-accent text-panel': !!plan.highlighted,
+ 'bg-ink/8 text-ink hover:bg-ink/12': !plan.highlighted,
+ 'opacity-60': loading() !== null,
+ }}
+ >
+ {loading() === plan.tier ? 'Loading...' : `Get ${plan.name}`}
+ </button>
)}
/>
</div>
diff --git a/js/app/packages/app/component/paywall/PaywallComponent.tsx b/js/app/packages/app/component/paywall/PaywallComponent.tsx
index 3a4c6c4409..83e48f3e1d 100644
--- a/js/app/packages/app/component/paywall/PaywallComponent.tsx
+++ b/js/app/packages/app/component/paywall/PaywallComponent.tsx
@@ -116,11 +116,11 @@ const PaywallComponent = (props: PaywallComponent) => {
</span>
<span class="text-base text-ink/40">/mo</span>
</div>
- <ul class="text-sm text-ink/60 flex flex-col gap-1 list-disc list-inside">
+ <div class="text-sm text-ink/60 flex flex-col gap-1">
<For each={plan.features}>
- {(feature) => <li>{feature}</li>}
+ {(feature) => <span>{feature}</span>}
</For>
- </ul>
+ </div>
</div>
</button>
)}
diff --git a/js/app/packages/app/component/paywall/PlanGrid.tsx b/js/app/packages/app/component/paywall/PlanGrid.tsx
index ebbb2c2c0c..76ffe96e4c 100644
--- a/js/app/packages/app/component/paywall/PlanGrid.tsx
+++ b/js/app/packages/app/component/paywall/PlanGrid.tsx
@@ -1,5 +1,5 @@
import { For, type JSX } from 'solid-js';
-import { isTouchDevice } from '@core/mobile/isTouchDevice';
+import { isMobile } from '@core/mobile/isMobile';
import { PLANS, type Plan, type PlanTier } from './plans';
interface PlanGridProps {
@@ -14,8 +14,8 @@ export function PlanGrid(props: PlanGridProps) {
<div
class="w-full max-w-2xl items-start"
classList={{
- 'flex flex-col gap-3': isTouchDevice(),
- 'flex gap-4': !isTouchDevice(),
+ 'flex flex-col gap-3': isMobile(),
+ 'flex gap-4': !isMobile(),
}}
>
<For each={PLANS}>
@@ -24,7 +24,7 @@ export function PlanGrid(props: PlanGridProps) {
plan.highlighted || props.highlightedTier?.() === plan.tier;
return (
- <div class="flex-1 flex flex-col">
+ <div class="flex-1 flex flex-col w-full">
<div
class="border bg-panel rounded-xs flex flex-col overflow-hidden w-full"
classList={{
@@ -32,7 +32,12 @@ export function PlanGrid(props: PlanGridProps) {
'border-edge-muted': !isHighlighted(),
}}
>
- <div class="p-4 flex flex-col gap-3 flex-1 w-full">
+ <div
+ class="p-4 flex flex-col gap-3 flex-1 w-full"
+ classList={{
+ 'items-center text-center': isMobile(),
+ }}
+ >
<div>
<h3 class="text-xl font-semibold text-ink">{plan.name}</h3>
</div>
@@ -42,12 +47,17 @@ export function PlanGrid(props: PlanGridProps) {
</span>
<span class="text-base text-ink/40">/mo</span>
</div>
- <ul class="text-sm text-ink/60 flex flex-col gap-1 list-disc list-inside">
+ <ul
+ class="text-sm text-ink/60 flex flex-col gap-1"
+ classList={{
+ 'list-disc list-inside': !isMobile(),
+ }}
+ >
<For each={plan.features}>
{(feature) => <li>{feature}</li>}
</For>
</ul>
- {props.footer?.(plan)}
+ <div class="mt-auto pt-2 w-full">{props.footer?.(plan)}</div>
</div>
</div>
</div>