Skip to content

Commit

Permalink
fix(electron): split view drag indicator tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 committed Feb 6, 2025
1 parent 0aa9602 commit 43ed165
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { MenuProps } from '@affine/component';
import { Menu } from '@affine/component';
import { Menu, Tooltip } from '@affine/component';
import { useI18n } from '@affine/i18n';
import clsx from 'clsx';
import type { HTMLAttributes, MouseEventHandler } from 'react';
import { forwardRef, memo, useCallback, useMemo, useState } from 'react';
Expand Down Expand Up @@ -87,6 +88,7 @@ export const SplitViewIndicator = memo(
[]
);

const t = useI18n();
return (
<div
ref={ref}
Expand All @@ -100,13 +102,18 @@ export const SplitViewIndicator = memo(
>
<div className={styles.menuTrigger} />
</Menu>
<SplitViewDragHandle
ref={dragHandleRef}
open={menuOpen}
onOpenMenu={openMenu}
active={isActive}
dragging={isDragging}
/>
<Tooltip
content={t['com.affine.split-view-drag-handle.tooltip']()}
side="bottom"
>
<SplitViewDragHandle
ref={dragHandleRef}
open={menuOpen}
onOpenMenu={openMenu}
active={isActive}
dragging={isDragging}
/>
</Tooltip>
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/i18n/src/resources/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@
"com.affine.peek-view-controls.open-attachment-in-new-tab": "Open in new tab",
"com.affine.peek-view-controls.open-attachment-in-split-view": "Open in split view",
"com.affine.peek-view-controls.open-doc-in-center-peek": "Open in center peek",
"com.affine.split-view-drag-handle.tooltip": "Click or drag",
"com.affine.quicksearch.group.creation": "New",
"com.affine.quicksearch.group.searchfor": "Search for \"{{query}}\"",
"com.affine.resetSyncStatus.button": "Reset sync",
Expand Down

0 comments on commit 43ed165

Please sign in to comment.