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.

Adjust sidebar max width and Surface corner radius for UI consistency (#3274)

Jacob Beckerman7fe871c7d4e4
diff --git a/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx b/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx
index d300944fc7..6d7d9bd88b 100644
--- a/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx
+++ b/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx
@@ -198,7 +198,9 @@ function ChannelGroupItem(props: {
'opacity-0 -translate-y-2': !isVisible(),
'opacity-100 translate-y-0': isVisible(),
}}
- onClick={(e) => {
+ onMouseDown={(e) => {
+ if (e.button !== 0) return;
+ e.preventDefault();
navigateToLatestNotification(e.shiftKey);
}}
>
diff --git a/js/app/packages/app/component/app-sidebar/sidebar.tsx b/js/app/packages/app/component/app-sidebar/sidebar.tsx
index 165148b5b3..6700c6dc4f 100644
--- a/js/app/packages/app/component/app-sidebar/sidebar.tsx
+++ b/js/app/packages/app/component/app-sidebar/sidebar.tsx
@@ -539,7 +539,7 @@ export const AppSidebar = (props: AppSidebarProps) => {
class={cn(
'group/sidebar h-full py-2 flex flex-col gap-0 mobile:absolute mobile:z-modal-content overflow-hidden',
isExpanded() &&
- 'max-w-56 w-full mobile:max-w-2/3 translate-x-0 opacity-100',
+ 'max-w-[199px] w-full mobile:max-w-2/3 translate-x-0 opacity-100',
props.sidebarState === 'hidden' &&
'-translate-x-full overflow-hidden opacity-0',
@@ -735,8 +735,8 @@ const SidebarLink = (props: SidebarLinkProps) => {
draggable={false}
variant="ghost"
class={cn(
- 'flex items-center justify-start group-data-[slim=true]/sidebar:justify-center text-sm gap-2 cursor-default w-full rounded-xs py-1 text-ink-extra-muted',
- isActive() && 'bg-ink/5 not-disabled:hover:bg-ink/10 text-ink'
+ 'flex items-center justify-start group-data-[slim=true]/sidebar:justify-center text-sm gap-2 cursor-default w-full rounded-sm py-1 text-ink-extra-muted not-disabled:hover:bg-ink/3',
+ isActive() && 'bg-ink/6 not-disabled:hover:bg-ink/6 text-ink'
)}
tooltipPlacement="right"
onMouseEnter={() => setIsHovering(true)}
@@ -751,12 +751,11 @@ const SidebarLink = (props: SidebarLinkProps) => {
: undefined
}
onMouseLeave={() => setIsHovering(false)}
- onClick={(e) => {
+ onMouseDown={(e) => {
+ if (e.button !== 0) return;
analytics.track('sidebar_click', {
view: props.id,
});
- // Middle mouse handling
- if (e.button === 1) return;
e.preventDefault();
let currentContentHandle = layoutManager?.activeSplit();
diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx
index 16bc3eaa48..198c798426 100644
--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx
@@ -59,7 +59,7 @@ export const SoupFiltersBar = () => {
return (
<Show when={!isMobile()}>
- <div class="flex items-start gap-2 border-b border-edge-muted w-full p-2">
+ <div class="flex items-start gap-2 w-full p-2">
<UnifiedFilterDropdown />
<ActiveFilterChips
filters={activeFiltersList()}
diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
index 8d13287e2c..acd577df9a 100644
--- a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
@@ -285,13 +285,17 @@ export const SoupView = (props: SoupViewProps) => {
<div class="size-full flex flex-col">
<div class="flex flex-col w-full">
<SplitHeaderLeft>
- <div class="h-full flex gap-3 items-center shrink-0">
- <Show when={!isMobile()}>
- <h1 class="font-semibold text-ink select-none text-sm shrink-0">
- {props.viewName}
- </h1>
- </Show>
- <Show when={!isComponentListView('search')}>
+ <div
+ class={cn('h-full flex gap-3 items-center', {
+ 'shrink-0': !narrowSearchExpanded(),
+ 'flex-1 min-w-0': narrowSearchExpanded(),
+ })}
+ >
+ <Show
+ when={
+ !narrowSearchExpanded() && !isComponentListView('search')
+ }
+ >
<Show when={!isMobile()}>
<CollapsibleHeaderItem
id="tabs"
diff --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.tsx
index 4c15ab517a..850c1c6054 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,26 +125,19 @@ export function TaskListEntity(props: TaskListEntityProps) {
}}
ref={mergeRefs(props.ref, draggable)}
class={cn(
- 'soup-list-entity @container/entity w-full relative group/narrow flex flex-col',
+ 'soup-list-entity @container/entity w-[calc(100%-0.5rem)] mx-1 relative group/narrow flex flex-col py-0.5',
{
'min-h-10': !isMobile(),
- 'bg-accent/5': props.checked,
- 'hover:bg-hover group-data-expanded/cm-trigger:bg-hover':
+ 'bg-ink/3 rounded-sm':
+ props.checked || (props.highlighted && !isMobile()),
+ 'hover:bg-hover rounded-sm group-data-expanded/cm-trigger:bg-hover':
!props.checked && !props.highlighted && !props.hovered,
- 'bg-hover': props.hovered && !props.highlighted && !props.checked,
- 'bg-accent/5 outline-1 outline-accent/20 -outline-offset-1':
- props.highlighted && !isMobile(),
+ 'bg-hover rounded-sm':
+ props.hovered && !props.highlighted && !props.checked,
}
)}
onMouseMove={props.onMouseMove}
>
- <div
- data-accent-bar
- class={cn('absolute h-full w-[3px] left-0 top-0 bg-accent opacity-0', {
- 'opacity-100': props.highlighted && !isMobile(),
- })}
- />
-
<Switch>
<Match when={isWide()}>
<MaybeEntityRow
diff --git a/js/app/packages/app/component/split-layout/components/SplitToolbar.tsx b/js/app/packages/app/component/split-layout/components/SplitToolbar.tsx
index 05a9f941d8..208e74e184 100644
--- a/js/app/packages/app/component/split-layout/components/SplitToolbar.tsx
+++ b/js/app/packages/app/component/split-layout/components/SplitToolbar.tsx
@@ -46,7 +46,7 @@ export function SplitToolbar(props: { ref: Setter<HTMLDivElement | null> }) {
<div
class={cn(
'relative w-full flex items-center justify-between shrink-0',
- hasContent() && 'min-h-10 border-b border-edge-muted',
+ hasContent() && 'min-h-10',
preview() && 'hidden'
)}
data-split-toolbar
diff --git a/js/app/packages/app/index.css b/js/app/packages/app/index.css
index 7e92e0a20f..9eb01b5a67 100644
--- a/js/app/packages/app/index.css
+++ b/js/app/packages/app/index.css
@@ -405,13 +405,11 @@
/* Suppressed on touch devices */
html:not([data-touch-device="true"]) [data-message][data-highlighted],
html:not([data-touch-device="true"]) [data-message]:hover{
- @apply bg-accent/5 outline-1 outline-accent/20 -outline-offset-1;
+ @apply bg-ink/3 rounded-sm;
}
-/* Keyboard selection accent bar can coexist with hover styles */
-/* Suppressed on touch devices */
-html:not([data-touch-device="true"]) [data-message][data-selected] > .message-accent-bar {
- @apply opacity-100;
+html:not([data-touch-device="true"]) [data-message] {
+ @apply mx-1;
}
/* Long-press animation */
diff --git a/js/app/packages/entity/src/composed/ListEntity.tsx b/js/app/packages/entity/src/composed/ListEntity.tsx
index 7ce6dc252b..1ca54d3318 100644
--- a/js/app/packages/entity/src/composed/ListEntity.tsx
+++ b/js/app/packages/entity/src/composed/ListEntity.tsx
@@ -183,24 +183,19 @@ export function ListEntity(props: ListEntityProps) {
}}
ref={mergeRefs(props.ref, draggable)}
class={cn(
- 'soup-list-entity @container/entity w-full relative group/narrow flex flex-col',
+ 'soup-list-entity @container/entity w-[calc(100%-0.5rem)] mx-1 relative group/narrow flex flex-col py-0.5',
{
'min-h-10': !isMobile(),
- 'bg-accent/8': props.checked || (props.highlighted && !isMobile()),
- 'hover:bg-hover group-data-expanded/cm-trigger:bg-hover':
+ 'bg-ink/3 rounded-sm':
+ props.checked || (props.highlighted && !isMobile()),
+ 'hover:bg-hover rounded-sm group-data-expanded/cm-trigger:bg-hover':
!props.checked && !props.highlighted && !props.hovered,
- 'bg-hover': props.hovered && !props.highlighted && !props.checked,
+ 'bg-hover rounded-sm':
+ props.hovered && !props.highlighted && !props.checked,
}
)}
onMouseMove={props.onMouseMove}
>
- <div
- data-accent-bar
- class={cn('absolute h-full w-0.75 left-0 top-0 bg-accent opacity-0', {
- 'opacity-100': props.highlighted && !isMobile(),
- })}
- />
-
<Switch>
<Match when={isWide()}>
<MaybeEntityRow
diff --git a/js/app/packages/theme/constants.ts b/js/app/packages/theme/constants.ts
index 9e2e2a328a..4b1c517e8d 100644
--- a/js/app/packages/theme/constants.ts
+++ b/js/app/packages/theme/constants.ts
@@ -19,7 +19,7 @@ export const DEFAULT_THEMES = [
b1: { l: 0.16, c: 0.00, h: 21 },
b2: { l: 0.18, c: 0.00, h: 21 },
b3: { l: 0.20, c: 0.00, h: 21 },
- b4: { l: 0.26, c: 0.00, h: 21 },
+ b4: { l: 0.23, c: 0.00, h: 21 },
c0: { l: 0.95, c: 0.00, h: 21 },
c1: { l: 0.83, c: 0.00, h: 21 },
c2: { l: 0.75, c: 0.00, h: 21 },
@@ -28,51 +28,51 @@ export const DEFAULT_THEMES = [
},
},
{
- id: 'Groove',
- name: 'Groove',
- version: 2,
- depth: 0.08,
- tokens: {
- a0: { l: 0.85, c: 0.34, h: 46 },
- a1: { l: 0.85, c: 0.34, h: 86 },
- a2: { l: 0.85, c: 0.34, h: 126 },
- a3: { l: 0.85, c: 0.34, h: 166 },
- a4: { l: 0.85, c: 0.34, h: 206 },
- b0: { l: 0.20, c: 0.00, h: 46 },
- b1: { l: 0.23, c: 0.00, h: 46 },
- b2: { l: 0.29, c: 0.00, h: 46 },
- b3: { l: 0.32, c: 0.00, h: 46 },
- b4: { l: 0.35, c: 0.00, h: 46 },
- c0: { l: 0.80, c: 0.00, h: 46 },
- c1: { l: 0.72, c: 0.00, h: 46 },
- c2: { l: 0.64, c: 0.00, h: 46 },
- c3: { l: 0.55, c: 0.00, h: 46 },
- c4: { l: 0.52, c: 0.00, h: 46 },
- },
- },
- {
- id: 'Macro Light',
- name: 'Macro Light',
- version: 2,
- depth: 0.09,
- tokens: {
- a0: { l: 0.65, c: 0.20, h: 59 },
- a1: { l: 0.65, c: 0.20, h: 99 },
- a2: { l: 0.65, c: 0.20, h: 139 },
- a3: { l: 0.65, c: 0.20, h: 179 },
- a4: { l: 0.65, c: 0.20, h: 219 },
- b0: { l: 0.96, c: 0.00, h: 59 },
- b1: { l: 0.92, c: 0.00, h: 59 },
- b2: { l: 0.89, c: 0.00, h: 59 },
- b3: { l: 0.93, c: 0.00, h: 59 },
- b4: { l: 0.85, c: 0.00, h: 59 },
- c0: { l: 0.14, c: 0.00, h: 59 },
- c1: { l: 0.40, c: 0.00, h: 59 },
- c2: { l: 0.55, c: 0.00, h: 59 },
- c3: { l: 0.65, c: 0.00, h: 59 },
- c4: { l: 0.75, c: 0.00, h: 59 },
- },
+ id: 'Groove',
+ name: 'Groove',
+ version: 2,
+ depth: 0.08,
+ tokens: {
+ a0: { l: 0.85, c: 0.34, h: 46 },
+ a1: { l: 0.85, c: 0.34, h: 86 },
+ a2: { l: 0.85, c: 0.34, h: 126 },
+ a3: { l: 0.85, c: 0.34, h: 166 },
+ a4: { l: 0.85, c: 0.34, h: 206 },
+ b0: { l: 0.20, c: 0.00, h: 46 },
+ b1: { l: 0.23, c: 0.00, h: 46 },
+ b2: { l: 0.29, c: 0.00, h: 46 },
+ b3: { l: 0.32, c: 0.00, h: 46 },
+ b4: { l: 0.34, c: 0.00, h: 46 },
+ c0: { l: 0.80, c: 0.00, h: 46 },
+ c1: { l: 0.72, c: 0.00, h: 46 },
+ c2: { l: 0.64, c: 0.00, h: 46 },
+ c3: { l: 0.55, c: 0.00, h: 46 },
+ c4: { l: 0.52, c: 0.00, h: 46 },
+ },
},
+ {
+ id: 'Macro Light',
+ name: 'Macro Light',
+ version: 2,
+ depth: 0.09,
+ tokens: {
+ a0: { l: 0.65, c: 0.20, h: 59 },
+ a1: { l: 0.65, c: 0.20, h: 99 },
+ a2: { l: 0.65, c: 0.20, h: 139 },
+ a3: { l: 0.65, c: 0.20, h: 179 },
+ a4: { l: 0.65, c: 0.20, h: 219 },
+ b0: { l: 0.96, c: 0.00, h: 59 },
+ b1: { l: 0.92, c: 0.00, h: 59 },
+ b2: { l: 0.91, c: 0.00, h: 59 },
+ b3: { l: 0.93, c: 0.00, h: 59 },
+ b4: { l: 0.89, c: 0.00, h: 59 },
+ c0: { l: 0.14, c: 0.00, h: 59 },
+ c1: { l: 0.40, c: 0.00, h: 59 },
+ c2: { l: 0.55, c: 0.00, h: 59 },
+ c3: { l: 0.65, c: 0.00, h: 59 },
+ c4: { l: 0.75, c: 0.00, h: 59 },
+ },
+ },
{
id: 'Macro Dark',
name: 'Macro Dark',
@@ -88,7 +88,7 @@ export const DEFAULT_THEMES = [
b1: { l: 0.22, c: 0.00, h: 59 },
b2: { l: 0.32, c: 0.00, h: 59 },
b3: { l: 0.20, c: 0.00, h: 59 },
- b4: { l: 0.26, c: 0.00, h: 59 },
+ b4: { l: 0.23, c: 0.00, h: 59 },
c0: { l: 0.95, c: 0.00, h: 59 },
c1: { l: 0.83, c: 0.00, h: 59 },
c2: { l: 0.75, c: 0.00, h: 59 },
@@ -111,7 +111,7 @@ export const DEFAULT_THEMES = [
b1: { l: 0.92, c: 0.03, h: 82.13 },
b2: { l: 0.90, c: 0.02, h: 82.13 },
b3: { l: 0.90, c: 0.02, h: 82.13 },
- b4: { l: 0.88, c: 0.02, h: 82.13 },
+ b4: { l: 0.89, c: 0.02, h: 82.13 },
c0: { l: 0.25, c: 0.02, h: 82.13 },
c1: { l: 0.36, c: 0.02, h: 82.13 },
c2: { l: 0.47, c: 0.03, h: 82.13 },
@@ -134,7 +134,7 @@ export const DEFAULT_THEMES = [
b1: { l: 0.16, c: 0.00, h: 93 },
b2: { l: 0.18, c: 0.00, h: 93 },
b3: { l: 0.20, c: 0.00, h: 93 },
- b4: { l: 0.26, c: 0.00, h: 93 },
+ b4: { l: 0.23, c: 0.00, h: 93 },
c0: { l: 0.95, c: 0.00, h: 93 },
c1: { l: 0.83, c: 0.00, h: 93 },
c2: { l: 0.75, c: 0.00, h: 93 },
@@ -157,7 +157,7 @@ export const DEFAULT_THEMES = [
b1: { l: 0.20, c: 0.00, h: 166 },
b2: { l: 0.26, c: 0.00, h: 166 },
b3: { l: 0.29, c: 0.00, h: 166 },
- b4: { l: 0.33, c: 0.00, h: 166 },
+ b4: { l: 0.31, c: 0.00, h: 166 },
c0: { l: 0.95, c: 0.00, h: 166 },
c1: { l: 0.83, c: 0.00, h: 166 },
c2: { l: 0.75, c: 0.00, h: 166 },
@@ -180,7 +180,7 @@ export const DEFAULT_THEMES = [
b1: { l: 0.28, c: 0.02, h: 259 },
b2: { l: 0.31, c: 0.02, h: 259 },
b3: { l: 0.33, c: 0.02, h: 259 },
- b4: { l: 0.36, c: 0.02, h: 259 },
+ b4: { l: 0.35, c: 0.02, h: 259 },
c0: { l: 0.88, c: 0.02, h: 259 },
c1: { l: 0.81, c: 0.02, h: 259 },
c2: { l: 0.68, c: 0.02, h: 259 },
@@ -203,7 +203,7 @@ export const DEFAULT_THEMES = [
b1: { l: 0.94, c: 0.01, h: 243 },
b2: { l: 0.93, c: 0.01, h: 243 },
b3: { l: 0.94, c: 0.01, h: 243 },
- b4: { l: 0.89, c: 0.01, h: 243 },
+ b4: { l: 0.92, c: 0.01, h: 243 },
c0: { l: 0.10, c: 0.01, h: 243 },
c1: { l: 0.35, c: 0.01, h: 243 },
c2: { l: 0.48, c: 0.02, h: 243 },
@@ -226,7 +226,7 @@ export const DEFAULT_THEMES = [
b1: { l: 0.16, c: 0.01, h: 274 },
b2: { l: 0.18, c: 0.01, h: 274 },
b3: { l: 0.20, c: 0.01, h: 274 },
- b4: { l: 0.26, c: 0.01, h: 274 },
+ b4: { l: 0.23, c: 0.01, h: 274 },
c0: { l: 0.96, c: 0.01, h: 274 },
c1: { l: 0.93, c: 0.01, h: 274 },
c2: { l: 0.90, c: 0.01, h: 274 },
@@ -249,7 +249,7 @@ export const DEFAULT_THEMES = [
b1: { l: 0.20, c: 0.02, h: 318 },
b2: { l: 0.26, c: 0.02, h: 318 },
b3: { l: 0.28, c: 0.02, h: 318 },
- b4: { l: 0.32, c: 0.02, h: 318 },
+ b4: { l: 0.30, c: 0.02, h: 318 },
c0: { l: 0.84, c: 0.02, h: 318 },
c1: { l: 0.80, c: 0.02, h: 318 },
c2: { l: 0.76, c: 0.02, h: 318 },
@@ -257,29 +257,6 @@ export const DEFAULT_THEMES = [
c4: { l: 0.65, c: 0.02, h: 318 },
},
},
- {
- id: 'Void',
- name: 'Void',
- version: 2,
- depth: 0.23,
- tokens: {
- a0: { l: 0.87, c: 0, h: 0 },
- a1: { l: 0.87, c: 0, h: 40 },
- a2: { l: 0.87, c: 0, h: 80 },
- a3: { l: 0.87, c: 0, h: 120 },
- a4: { l: 0.87, c: 0, h: 160 },
- b0: { l: 0.13, c: 0, h: 0 },
- b1: { l: 0.16, c: 0, h: 0 },
- b2: { l: 0.23, c: 0, h: 0 },
- b3: { l: 0.25, c: 0, h: 0 },
- b4: { l: 0.30, c: 0, h: 0 },
- c0: { l: 0.88, c: 0, h: 0 },
- c1: { l: 0.84, c: 0, h: 0 },
- c2: { l: 0.79, c: 0, h: 0 },
- c3: { l: 0.73, c: 0, h: 0 },
- c4: { l: 0.67, c: 0, h: 0 },
- },
- },
] as const satisfies ReadonlyArray<ThemeV2>;
type DefaultTheme = (typeof DEFAULT_THEMES)[number]['id'];
diff --git a/js/app/packages/ui/components/Surface.tsx b/js/app/packages/ui/components/Surface.tsx
index eafd4148f8..9c6fd56f3f 100644
--- a/js/app/packages/ui/components/Surface.tsx
+++ b/js/app/packages/ui/components/Surface.tsx
@@ -30,7 +30,7 @@ export function Surface(props: SurfaceProps) {
...local.style,
}}
class={cn(
- 'relative rounded-md overflow-clip min-h-0 size-full',
+ 'relative rounded-xl overflow-clip min-h-0 size-full',
"after:content-[''] after:absolute after:inset-0 after:pointer-events-none after:rounded-[inherit] after:z-10",
'after:shadow-[inset_0_0_4px_var(--color-shadow)]',
local.class,