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(ui): delete bracket (#3061)

Fake-User69990fa83f5a
diff --git a/js/app/packages/app/component/EntityModal/MoveToProjectView.tsx b/js/app/packages/app/component/EntityModal/MoveToProjectView.tsx
index 5cdceb56a5..254795079c 100644
--- a/js/app/packages/app/component/EntityModal/MoveToProjectView.tsx
+++ b/js/app/packages/app/component/EntityModal/MoveToProjectView.tsx
@@ -1,4 +1,3 @@
-import { BozzyBracket } from '@core/component/BozzyBracket';
import {
CustomEntityIcon,
EntityIcon,
@@ -460,10 +459,7 @@ export const MoveToProjectView = (props: {
focused: isFocused(),
}}
>
- <BozzyBracket
- active={isSelected() || isFocused()}
- class="flex h-5"
- >
+ <div class="flex h-5">
<div
class="w-full"
style={{
@@ -515,7 +511,7 @@ export const MoveToProjectView = (props: {
</Show>
</div>
</div>
- </BozzyBracket>
+ </div>
</div>
);
}}
diff --git a/js/app/packages/block-email/component/CollapsedMessage.tsx b/js/app/packages/block-email/component/CollapsedMessage.tsx
index 9578239bac..69fdf0aa64 100644
--- a/js/app/packages/block-email/component/CollapsedMessage.tsx
+++ b/js/app/packages/block-email/component/CollapsedMessage.tsx
@@ -1,4 +1,3 @@
-import { BozzyBracket } from '@core/component/BozzyBracket';
import { type UserIconProps, UserIcon } from '@core/component/UserIcon';
import type { ApiMessage } from '@service-email/generated/schemas';
import { useEmail } from '@core/context/user';
@@ -56,71 +55,69 @@ export function CollapsedMessage(props: CollapsedMessageProps) {
<div class="shrink-0 flex justify-center w-full">
{/* These pl/pr below are needed to align with expanded messages at mobile width. */}
<div class="macro-message-width macro-message-margin w-full pl-2 pr-4 sm:px-0">
- <BozzyBracket active={props.isFocused} hover={hover()} class="">
+ <div
+ class="relative flex flex-row items-center w-full pb-2 cursor-pointer transition-all"
+ classList={{
+ 'pt-2': !props.isFirstMessage,
+ 'opacity-80': hasMouseLeft() && !hover(),
+ 'opacity-100': !hasMouseLeft() || hover(),
+ }}
+ data-message-body-id={props.message.db_id}
+ tabIndex={0}
+ onClick={props.onClick}
+ onKeyDown={handleKeyDown}
+ onMouseEnter={() => setHover(true)}
+ onMouseLeave={() => {
+ setHover(false);
+ setHasMouseLeft(true);
+ }}
+ >
+ {/* Rail line - behind avatar */}
<div
- class="relative flex flex-row items-center w-full pb-2 cursor-pointer transition-all"
- classList={{
- 'pt-2': !props.isFirstMessage,
- 'opacity-80': hasMouseLeft() && !hover(),
- 'opacity-100': !hasMouseLeft() || hover(),
+ class="absolute top-0 bottom-0 border-l border-edge-muted z-0"
+ style={{
+ left: 'var(--left-of-connector)',
}}
- data-message-body-id={props.message.db_id}
- tabIndex={0}
- onClick={props.onClick}
- onKeyDown={handleKeyDown}
- onMouseEnter={() => setHover(true)}
- onMouseLeave={() => {
- setHover(false);
- setHasMouseLeft(true);
+ />
+ {/* Avatar - centered on the rail, in front of rail */}
+ <div
+ class="relative z-10 flex justify-center items-center shrink-0"
+ style={{
+ width: 'var(--user-icon-width)',
+ height: 'var(--user-icon-width)',
+ 'margin-left':
+ 'calc(var(--left-of-connector) - var(--user-icon-width) / 2 + 1px)',
}}
>
- {/* Rail line - behind avatar */}
- <div
- class="absolute top-0 bottom-0 border-l border-edge-muted z-0"
- style={{
- left: 'var(--left-of-connector)',
- }}
+ <UserIcon
+ {...senderIconProps()}
+ isDeleted={false}
+ size="fill"
+ suppressClick={true}
/>
- {/* Avatar - centered on the rail, in front of rail */}
- <div
- class="relative z-10 flex justify-center items-center shrink-0"
- style={{
- width: 'var(--user-icon-width)',
- height: 'var(--user-icon-width)',
- 'margin-left':
- 'calc(var(--left-of-connector) - var(--user-icon-width) / 2 + 1px)',
- }}
- >
- <UserIcon
- {...senderIconProps()}
- isDeleted={false}
- size="fill"
- suppressClick={true}
- />
- </div>
- {/* Sender + Snippet - aligned with expanded message content */}
- <div
- class="flex-1 flex items-center min-w-0"
- style={{
- 'padding-left': 'var(--message-padding-x)',
- }}
- >
- <span class="w-16 shrink-0">
- <EmailUserTooltip recipient={props.message.from}>
- <span class="text-ink font-semibold truncate text-sm cursor-default block">
- {senderDisplay()}
- </span>
- </EmailUserTooltip>
- </span>
- <span class="text-ink truncate">{snippet()}</span>
- </div>
- {/* Date */}
- <div class="text-xs text-ink shrink-0 ml-4 pr-2">
- {props.message.internal_date_ts &&
- formatShortDate(props.message.internal_date_ts)}
- </div>
</div>
- </BozzyBracket>
+ {/* Sender + Snippet - aligned with expanded message content */}
+ <div
+ class="flex-1 flex items-center min-w-0"
+ style={{
+ 'padding-left': 'var(--message-padding-x)',
+ }}
+ >
+ <span class="w-16 shrink-0">
+ <EmailUserTooltip recipient={props.message.from}>
+ <span class="text-ink font-semibold truncate text-sm cursor-default block">
+ {senderDisplay()}
+ </span>
+ </EmailUserTooltip>
+ </span>
+ <span class="text-ink truncate">{snippet()}</span>
+ </div>
+ {/* Date */}
+ <div class="text-xs text-ink shrink-0 ml-4 pr-2">
+ {props.message.internal_date_ts &&
+ formatShortDate(props.message.internal_date_ts)}
+ </div>
+ </div>
</div>
</div>
);
diff --git a/js/app/packages/core/component/BozzyBracket.tsx b/js/app/packages/core/component/BozzyBracket.tsx
deleted file mode 100644
index 3c4d548101..0000000000
--- a/js/app/packages/core/component/BozzyBracket.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import { cn } from '@ui/utils/classname';
-import { createSignal, type JSX, onMount, type ParentProps } from 'solid-js';
-
-type BozzyBracketProps = {
- style?: JSX.CSSProperties;
- unfocusable?: boolean;
- active: boolean;
- hover?: boolean;
- class?: string;
-};
-
-/**
- * Places a highlight and Bozzy Bracket around an active item.
- *
- * @param props.active - Whether to show the highlight and bracket.
- * @param props.class - The class to apply to the highlight wrapper of the component..
- * @returns A JSX element.
- */
-export function BozzyBracket(props: ParentProps<BozzyBracketProps>) {
- return (
- <div
- class={cn(
- 'relative group/bozzy w-full h-full hover-transition-bg',
- props.class
- )}
- classList={{
- 'bg-active': props.active && !props.unfocusable,
- 'bg-hover': props.hover && !props.unfocusable,
- }}
- style={props.style}
- >
- <div
- class="absolute pointer-events-none left-0 top-0 w-full h-full z-modal"
- classList={{
- bracket: (props.active || props.hover) && !props.unfocusable,
- 'group-focus-within/bozzy:absolute group-focus-within/bozzy:bracket':
- !props.active && !props.hover && !props.unfocusable,
- }}
- />
- {props.children}
- </div>
- );
-}
-
-export function BozzyBracketInnerSibling(props: {
- classList?: Record<string, boolean | undefined>;
- animOnOpen?: boolean;
-}) {
- const [big, setBig] = createSignal(props.animOnOpen);
- if (props.animOnOpen) {
- onMount(() => {
- setTimeout(() => setBig(false));
- });
- }
- /* TEST BEFORE REMOVING -left-px -top-px w-[calc(100%+2px)] h-[calc(100%+2px)] */
- return (
- <div
- class="pointer-events-none absolute -left-px -top-1 w-[calc(100%+2px)] h-[calc(100%+2px)] bracket-offset-2"
- classList={{
- 'transition-transform ease-out duration-100': props.animOnOpen,
- 'scale-110': big(),
- 'scale-100': !big(),
- ...(props.classList ?? {}),
- }}
- />
- );
-}
diff --git a/js/app/packages/core/component/Message.tsx b/js/app/packages/core/component/Message.tsx
index 97ef2a630d..36b315fa9e 100644
--- a/js/app/packages/core/component/Message.tsx
+++ b/js/app/packages/core/component/Message.tsx
@@ -14,7 +14,7 @@ import {
splitProps,
useContext,
} from 'solid-js';
-import { BozzyBracket } from './BozzyBracket';
+
import {
CustomEntityIcon,
EntityIcon,
@@ -231,16 +231,13 @@ const Root: Component<MessageRootProps> = (props) => {
isParentNewMessage={props.isParentNewMessage}
/>
</Show>
- <BozzyBracket
- active={props.focused}
- unfocusable={props.isTarget || props.unfocusable}
+ <div
class="flex flex-row"
style={{
'margin-bottom': props.isLastInThread //|| props.showReply?.()
? `${replyHeight()}px`
: '0px',
}}
- hover={props.shouldHover}
>
{/* Message Wrapper w/ Main Connector Line */}
<div
@@ -339,7 +336,7 @@ const Root: Component<MessageRootProps> = (props) => {
{props.children}
</div>
</div>
- </BozzyBracket>
+ </div>
<Show
when={
props.hoverActions &&