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.

chg(ui): change active split style (#4687)

Seamusff71e196ee38
diff --git a/js/app/packages/app/component/split-layout/components/SplitPanel.tsx b/js/app/packages/app/component/split-layout/components/SplitPanel.tsx
index 226374f8db..2a4effac53 100644
--- a/js/app/packages/app/component/split-layout/components/SplitPanel.tsx
+++ b/js/app/packages/app/component/split-layout/components/SplitPanel.tsx
@@ -148,6 +148,14 @@ export function SplitPanel(props: SplitPanelProps) {
isSoloSettings()
);
+ const hasFocusedSplitBorder = createMemo(
+ () =>
+ !isMobile() &&
+ props.active &&
+ multipleSplits() &&
+ !props.handle.isSpotLight()
+ );
+
return (
<SoupContextProvider soup={nextSoup}>
<SplitPanelContext.Provider
@@ -215,13 +223,11 @@ export function SplitPanel(props: SplitPanelProps) {
tabindex={-1}
>
<Panel
- active={
- !isMobile() &&
- props.active &&
- multipleSplits() &&
- !props.handle.isSpotLight()
+ edgeColor={
+ hasFocusedSplitBorder()
+ ? 'color-mix(in oklch, var(--color-edge) 80%, var(--color-ink))'
+ : undefined
}
- highlightColor="oklch(var(--a0l) var(--a0c) var(--a0h) / 0.5)"
class="rounded-xl mobile:rounded-none mobile:after:hidden mobile:border-0!"
depth={isMobile() ? 0 : 1}
>
diff --git a/js/app/packages/ui/components/Surface.tsx b/js/app/packages/ui/components/Surface.tsx
index 2c5e04e55d..f0eff8cdf2 100644
--- a/js/app/packages/ui/components/Surface.tsx
+++ b/js/app/packages/ui/components/Surface.tsx
@@ -6,6 +6,7 @@ import { Layer } from './Layer';
export type SurfaceProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, 'style'> & {
depth?: 0 | 1 | 2 | 3 | 4 | 5;
style?: JSX.CSSProperties;
+ edgeColor?: string;
highlightColor?: string;
active?: boolean;
solid?: boolean;
@@ -17,6 +18,7 @@ export type SurfaceProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, 'style'> & {
export function Surface(props: SurfaceProps) {
const [local, rest] = splitProps(props, [
'highlightColor',
+ 'edgeColor',
'children',
'active',
'solid',
@@ -36,7 +38,7 @@ export function Surface(props: SurfaceProps) {
};
if (!local.hideBorder) {
- base.border = '0.5px solid var(--b4)';
+ base.border = `0.5px solid ${local.edgeColor ?? 'var(--b4)'}`;
}
if (local.active) {