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(soup): task narrow view (#3439)

Peter Chinman2534c11dbe62
diff --git a/js/app/.gitignore b/js/app/.gitignore
index a4f559923a..76646f14b4 100644
--- a/js/app/.gitignore
+++ b/js/app/.gitignore
@@ -44,6 +44,7 @@ CodeSignTool/
packages/app/backend.jar
packages/app/backend_lib
**/build
+**/.build
**/dist
**/*.tsbuildinfo
diff --git a/js/app/packages/entity/src/composed/list-entity/narrow-layout.tsx b/js/app/packages/entity/src/composed/list-entity/narrow-layout.tsx
index be093a362a..86019ab10c 100644
--- a/js/app/packages/entity/src/composed/list-entity/narrow-layout.tsx
+++ b/js/app/packages/entity/src/composed/list-entity/narrow-layout.tsx
@@ -96,7 +96,13 @@ export function NarrowLayout(props: LayoutProps) {
>
<Show
when={!isTaskEntity(props.entity)}
- fallback={<Entity.Properties entity={props.entity} />}
+ fallback={
+ <Entity.Properties
+ entity={props.entity}
+ maxUserStackUsers={0}
+ showCaret={false}
+ />
+ }
>
<Entity.Timestamp entity={props.entity} />
</Show>
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 4bf1a230ef..015fc65d52 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
@@ -56,6 +56,10 @@ interface EntityKeyPropertiesProps {
entity: EntityWithProperties<EntityData>;
/** Callback when properties are refreshed */
onRefresh?: () => void;
+ /** Max visible user avatars in the assignees stack before collapsing to +N. */
+ maxUserStackUsers?: number;
+ /** Whether to show the edit affordance caret. */
+ showCaret?: boolean;
}
/**
@@ -106,6 +110,8 @@ export function EntityKeyProperties(props: EntityKeyPropertiesProps) {
<KeyPropertiesRow
properties={keyProperties}
onRefresh={props.onRefresh}
+ maxUserStackUsers={props.maxUserStackUsers}
+ showCaret={props.showCaret}
/>
<ScopedPortal scope="split">
<Suspense>
@@ -120,6 +126,8 @@ export function EntityKeyProperties(props: EntityKeyPropertiesProps) {
function KeyPropertiesRow(props: {
properties: Accessor<PropertyT[]>;
onRefresh?: () => void;
+ maxUserStackUsers?: number;
+ showCaret?: boolean;
}) {
const ctx = usePropertiesContext();
const blockId = useMaybeBlockId();
@@ -166,19 +174,31 @@ function KeyPropertiesRow(props: {
}
>
<Match when={isMultiUserEntity()}>
- <Property.UserStack property={property} maxUsers={2} />
+ <Property.UserStack
+ property={property}
+ maxUsers={props.maxUserStackUsers ?? 2}
+ />
</Match>
<Match when={isUserEntity()}>
<Property.Icon property={property} />
</Match>
</Switch>
- <span class="@max-2xl/u-list:hidden">
- <Property.Text
- property={property}
- fallback={<Property.Empty label="None" />}
- />
- </span>
- <Property.Caret />
+ <Property.Text
+ property={property}
+ class="@max-2xl/u-list:hidden"
+ fallback={
+ <>
+ <Property.Empty
+ label="None"
+ class="@max-2xl/u-list:hidden"
+ />
+ <Property.Empty class="hidden @max-2xl/u-list:inline-flex" />
+ </>
+ }
+ />
+ <Show when={props.showCaret ?? true}>
+ <Property.Caret />
+ </Show>
</Property.EditTrigger>
</Layer>
</Property.Tooltip>