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(style): tasks - align column titles and remove pill outlines on i… (#4005)

Aidan Holloway-Bidwelld6774a84a4d8
diff --git a/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx b/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx
index 3019255267..cbbfececca 100644
--- a/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx
@@ -64,8 +64,11 @@ function TaskListHeader(props: { class?: string }) {
return (
<div
+ // px-3 (12px) matches each row's total horizontal inset — the row's
+ // Entity.Root `mx-1` (4px) plus Entity.Layout `px-2` (8px) — so the
+ // header grid tracks line up exactly with the row grid tracks.
class={cn(
- 'task-grid-row w-full grid items-center gap-2 px-2 h-10',
+ 'task-grid-row w-full grid items-center gap-2 px-3 h-10',
'text-xs font-medium text-ink-extra-muted',
'bg-surface',
props.class
@@ -91,6 +94,9 @@ function TaskListHeader(props: { class?: string }) {
reversed={activeSort()?.reversed ?? false}
onSort={setSort}
narrowIcon={COLUMN_ICONS[col.id]}
+ // Match the row pill's px-2 content inset so titles left-align
+ // with the pill icons (wide only — narrow collapses to centered icons).
+ class="@min-[841px]/u-list:pl-2"
/>
);
}}
@@ -127,6 +133,10 @@ function HeaderCell(props: {
}) {
const justify = () =>
props.align === 'end' ? 'justify-end' : 'justify-start';
+ // Property columns collapse to a single centered icon on narrow containers,
+ // matching the row pills (which center via `@max-[840px]/u-list:justify-center`).
+ const narrowJustify = () =>
+ props.narrowIcon ? '@max-[840px]/u-list:justify-center' : '';
return (
<div
@@ -136,7 +146,13 @@ function HeaderCell(props: {
<Show
when={props.sortKey}
fallback={
- <div class={cn('flex items-center min-w-0 w-full', justify())}>
+ <div
+ class={cn(
+ 'flex items-center min-w-0 w-full',
+ justify(),
+ narrowJustify()
+ )}
+ >
<Show when={props.narrowIcon}>
<span class="truncate @max-[840px]/u-list:hidden">
{props.label}
@@ -159,7 +175,8 @@ function HeaderCell(props: {
'flex items-center gap-1 min-w-0 w-full h-full',
'hover:text-ink transition-colors cursor-pointer',
props.active && 'text-ink',
- justify()
+ justify(),
+ narrowJustify()
)}
>
<Show when={props.narrowIcon}>
diff --git a/js/app/packages/app/component/next-soup/soup-view/views/tasks/list-property-value.tsx b/js/app/packages/app/component/next-soup/soup-view/views/tasks/list-property-value.tsx
index da47f6fd27..0231bf55db 100644
--- a/js/app/packages/app/component/next-soup/soup-view/views/tasks/list-property-value.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/views/tasks/list-property-value.tsx
@@ -39,12 +39,12 @@ export const ListPropertyValue: Component<ListPropertyValueProps> = (props) => {
>
<Property.Tooltip property={props.property}>
<Layer depth={2}>
- <Property.EditTrigger class="list-property-cell min-w-0 rounded-full hover:bg-surface/50 inline-flex items-center gap-1 px-2 py-1.5 leading-tight text-left hover:ring ring-edge ring-inset">
+ <Property.EditTrigger class="list-property-cell min-w-0 rounded-full hover:bg-surface/50 inline-flex items-center gap-1 px-2 py-1.5 leading-tight text-left hover:ring ring-edge ring-inset @max-[840px]/u-list:hover:ring-0 @max-[840px]/u-list:px-1">
<Show
when={!isEmpty()}
fallback={
<>
- <CircleDashedEmpty class="size-3 shrink-0 opacity-50" />
+ <CircleDashedEmpty class="size-3 shrink-0 opacity-50 @max-[840px]/u-list:size-4" />
<span class="truncate flex-1 opacity-50 @max-[840px]/u-list:hidden">
{props.property.displayName}
</span>
@@ -55,7 +55,7 @@ export const ListPropertyValue: Component<ListPropertyValueProps> = (props) => {
fallback={
<Property.Icon
property={props.property}
- class="size-3 shrink-0"
+ class="size-3 shrink-0 @max-[840px]/u-list:size-4"
/>
}
>
@@ -71,11 +71,15 @@ export const ListPropertyValue: Component<ListPropertyValueProps> = (props) => {
<Property.UserStack
property={props.property}
maxUsers={1}
+ avatarClass="@max-[840px]/u-list:size-5"
/>
</div>
</Match>
<Match when={isUserEntity()}>
- <Property.Icon property={props.property} />
+ <Property.Icon
+ property={props.property}
+ class="@max-[840px]/u-list:size-5"
+ />
</Match>
</Switch>
<Property.Text
diff --git a/js/app/packages/app/component/next-soup/soup-view/views/tasks/task-grid-layout.tsx b/js/app/packages/app/component/next-soup/soup-view/views/tasks/task-grid-layout.tsx
index 17e6996b0b..7df2459d9a 100644
--- a/js/app/packages/app/component/next-soup/soup-view/views/tasks/task-grid-layout.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/views/tasks/task-grid-layout.tsx
@@ -188,7 +188,7 @@ export function TaskGridLayout(props: LayoutProps) {
{(col) => (
<Entity.Slot
placement={col.id}
- class="flex items-center min-w-0 overflow-hidden text-xs ph-no-capture @container/slot"
+ class="flex items-center min-w-0 text-xs ph-no-capture @container/slot @max-[840px]/u-list:justify-center"
>
<ListPropertyValue
property={
diff --git a/js/app/packages/entity/src/extractors-property/entity-key-properties.tsx b/js/app/packages/entity/src/extractors-property/entity-key-properties.tsx
index 5ee90886d4..ed600ff333 100644
--- a/js/app/packages/entity/src/extractors-property/entity-key-properties.tsx
+++ b/js/app/packages/entity/src/extractors-property/entity-key-properties.tsx
@@ -163,6 +163,7 @@ function KeyPropertiesRow(props: {
class={cn(
'flex items-center gap-1 min-w-0 ring ring-edge-muted/50 ring-inset',
'px-1.5 py-1 leading-tight text-left rounded-full',
+ '@max-2xl/u-list:ring-0 @max-2xl/u-list:gap-0 @max-2xl/u-list:px-1 @max-2xl/u-list:justify-center',
{
'hover:bg-hover': ctx.canEdit,
'text-ink-extra-muted/50': isEmpty(),
@@ -174,7 +175,7 @@ function KeyPropertiesRow(props: {
fallback={
<Property.Icon
property={property}
- class="size-3 shrink-0"
+ class="size-3 shrink-0 @max-2xl/u-list:size-4"
/>
}
>
@@ -182,10 +183,14 @@ function KeyPropertiesRow(props: {
<Property.UserStack
property={property}
maxUsers={props.maxUserStackUsers ?? 2}
+ avatarClass="@max-2xl/u-list:size-5"
/>
</Match>
<Match when={isUserEntity()}>
- <Property.Icon property={property} />
+ <Property.Icon
+ property={property}
+ class="@max-2xl/u-list:size-5"
+ />
</Match>
</Switch>
<Property.Text
@@ -202,7 +207,7 @@ function KeyPropertiesRow(props: {
}
/>
<Show when={props.showCaret ?? true}>
- <Property.Caret />
+ <Property.Caret class="@max-2xl/u-list:hidden" />
</Show>
</Property.EditTrigger>
</Layer>
diff --git a/js/app/packages/property/src/extractors/PropertyUserStack.tsx b/js/app/packages/property/src/extractors/PropertyUserStack.tsx
index 26492492ef..e0601d7388 100644
--- a/js/app/packages/property/src/extractors/PropertyUserStack.tsx
+++ b/js/app/packages/property/src/extractors/PropertyUserStack.tsx
@@ -7,6 +7,8 @@ import { getEntityValues, isEntityProperty } from '../utils';
type Props = {
property: Property;
maxUsers?: number;
+ /** Extra classes applied to each avatar (e.g. responsive sizing). */
+ avatarClass?: string;
};
/**
@@ -33,6 +35,7 @@ export function PropertyUserStack(props: Props) {
size="sm"
suppressClick
showTooltip={false}
+ class={props.avatarClass}
/>
)}
</For>