Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
style(list/command): selection vs hover style improvements after jacob retheme (#3285)
Seamus96e8211ca6e4
diff --git a/js/app/packages/app/component/command/CommandItem.tsx b/js/app/packages/app/component/command/CommandItem.tsxindex 2e89f54c8d..1f58f1d85f 100644--- a/js/app/packages/app/component/command/CommandItem.tsx+++ b/js/app/packages/app/component/command/CommandItem.tsx@@ -171,11 +171,10 @@ export function CommandItem(props: CommandItemProps) {return (<divclass={cn(- 'group flex items-center h-10 px-2 text-sm font-semibold relative',+ 'rounded-md group flex items-center h-10 px-2 text-sm font-semibold relative',{- 'bg-accent/5 outline-1 outline-accent/20 -outline-offset-1':- props.selected,- 'hover:bg-hover/30': !props.selected,+ 'bg-active ring ring-edge': props.selected,+ 'hover:bg-hover/50': !props.selected,})}onMouseMove={() => props.onHover?.(props.index)}@@ -185,12 +184,6 @@ export function CommandItem(props: CommandItemProps) {props.onSelect(props.item, e.shiftKey);}}>- {/* Accent bar indicator */}- <div- class={cn('absolute h-full w-0.75 left-0 top-0 bg-accent opacity-0', {- 'opacity-100': props.selected,- })}- /><ItemDisplay item={props.item} /><div class="ml-auto"><CommandItemHotkey item={props.item} />diff --git a/js/app/packages/app/component/command/CommandMenu.tsx b/js/app/packages/app/component/command/CommandMenu.tsxindex c318bc29cb..d734ab2212 100644--- a/js/app/packages/app/component/command/CommandMenu.tsx+++ b/js/app/packages/app/component/command/CommandMenu.tsx@@ -52,8 +52,9 @@ const CATEGORIES: { id: CategoryFilter; label: string }[] = [];const VIRTUAL_ITEM_HEIGHT = 40; // tailwind h-10-const MAX_LIST_HEIGHT = VIRTUAL_ITEM_HEIGHT * 8;-const EMPTY_STATE_HEIGHT = VIRTUAL_ITEM_HEIGHT * 1.5;+const LIST_PADDING = 16; // p-2 = 8px top + 8px bottom+const MAX_LIST_HEIGHT = VIRTUAL_ITEM_HEIGHT * 8 + LIST_PADDING;+const EMPTY_STATE_HEIGHT = VIRTUAL_ITEM_HEIGHT * 1.5 + LIST_PADDING;export function CommandMenu() {const splitManager = globalSplitManager();@@ -442,7 +443,10 @@ export function CommandMenuInner(props: {const resultsHeight = () => {const count = filteredItems().length;if (count === 0) return EMPTY_STATE_HEIGHT;- return Math.min(MAX_LIST_HEIGHT, count * VIRTUAL_ITEM_HEIGHT);+ return Math.min(+ MAX_LIST_HEIGHT,+ count * VIRTUAL_ITEM_HEIGHT + LIST_PADDING+ );};const categoryTabs = CATEGORIES.map((c) => ({@@ -658,7 +662,7 @@ function VirtualizedCommandList(props: {}}data={props.items}style={{ height: '100%' }}- class="scrollbar-hidden"+ class="scrollbar-hidden p-2">{(item, index) => (<CommandItemdiff --git a/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListEntity.tsx b/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListEntity.tsxindex 850c1c6054..3249cc2575 100644--- a/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListEntity.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListEntity.tsx@@ -125,15 +125,16 @@ export function TaskListEntity(props: TaskListEntityProps) {}}ref={mergeRefs(props.ref, draggable)}class={cn(- 'soup-list-entity @container/entity w-[calc(100%-0.5rem)] mx-1 relative group/narrow flex flex-col py-0.5',+ 'soup-list-entity @container/entity w-[calc(100%-0.5rem)] mx-1 relative group/narrow flex flex-col py-0.5 rounded',{'min-h-10': !isMobile(),- 'bg-ink/3 rounded-sm':- props.checked || (props.highlighted && !isMobile()),- 'hover:bg-hover rounded-sm group-data-expanded/cm-trigger:bg-hover':+ 'bg-accent/8': props.checked,+ 'ring ring-accent/16 ring-inset': props.checked && props.highlighted,+ 'ring ring-edge bg-active/60 ring-inset':+ props.highlighted && !props.checked,+ 'bg-active/40': props.hovered && !props.highlighted && !props.checked,+ 'hover:bg-active/40 group-data-expanded/cm-trigger:bg-active/40':!props.checked && !props.highlighted && !props.hovered,- 'bg-hover rounded-sm':- props.hovered && !props.highlighted && !props.checked,})}onMouseMove={props.onMouseMove}diff --git a/js/app/packages/entity/src/composed/ListEntity.tsx b/js/app/packages/entity/src/composed/ListEntity.tsxindex 1ca54d3318..45e3589d44 100644--- a/js/app/packages/entity/src/composed/ListEntity.tsx+++ b/js/app/packages/entity/src/composed/ListEntity.tsx@@ -183,15 +183,16 @@ export function ListEntity(props: ListEntityProps) {}}ref={mergeRefs(props.ref, draggable)}class={cn(- 'soup-list-entity @container/entity w-[calc(100%-0.5rem)] mx-1 relative group/narrow flex flex-col py-0.5',+ 'soup-list-entity rounded @container/entity w-[calc(100%-0.5rem)] mx-1 relative group/narrow flex flex-col py-0.5',{'min-h-10': !isMobile(),- 'bg-ink/3 rounded-sm':- props.checked || (props.highlighted && !isMobile()),- 'hover:bg-hover rounded-sm group-data-expanded/cm-trigger:bg-hover':+ 'bg-accent/8': props.checked,+ 'ring ring-accent/16 ring-inset': props.checked && props.highlighted,+ 'ring ring-edge bg-active/60 ring-inset':+ props.highlighted && !props.checked,+ 'bg-active/40': props.hovered && !props.highlighted && !props.checked,+ 'hover:bg-active/40 group-data-expanded/cm-trigger:bg-active/40':!props.checked && !props.highlighted && !props.hovered,- 'bg-hover rounded-sm':- props.hovered && !props.highlighted && !props.checked,})}onMouseMove={props.onMouseMove}