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 toolbar): convert vertical scroll to horizontal scroll (#1683)

Aidan Holloway-Bidwellca91518b19eb
diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-toolbar.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-toolbar.tsx
index c4ad614fe0..2c9374c0ae 100644
--- a/js/app/packages/app/component/next-soup/soup-view/soup-toolbar.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/soup-toolbar.tsx
@@ -532,8 +532,22 @@ const ScrollIndicators = (props: { scrollRef: HTMLElement | undefined }) => {
onMount(() => {
const ref = props.scrollRef;
if (!ref) return;
+
+ // Convert vertical scroll to horizontal scroll
+ const wheelListener = (e: WheelEvent) => {
+ e.preventDefault();
+ const { deltaX, deltaY } = e;
+ const delta = Math.abs(deltaX) > Math.abs(deltaY) ? deltaX : deltaY;
+ ref.scrollLeft += delta;
+ updateClipIndicators();
+ };
+
+ ref.addEventListener('wheel', wheelListener);
ref.addEventListener('scroll', updateClipIndicators);
- onCleanup(() => ref?.removeEventListener('scroll', updateClipIndicators));
+ onCleanup(() => {
+ ref?.removeEventListener('wheel', wheelListener);
+ ref?.removeEventListener('scroll', updateClipIndicators);
+ });
});
return (
<>