chore(editor): update slash menu ui (#11305)

Close [BS-2954](https://linear.app/affine-design/issue/BS-2954/menu长宽为280390)
Close [BS-2955](https://linear.app/affine-design/issue/BS-2955/frame-与mind-map的tooltips)
Close [BS-2956](https://linear.app/affine-design/issue/BS-2956/to-do-list-tooltip缺失)

### What Changes
- update size of slash menu
- updare tooltips in slash menu
  - frame
  - mindmap
This commit is contained in:
L-Sun
2025-04-01 05:51:59 +00:00
parent dc67614d6d
commit 10d86fee9f
5 changed files with 108 additions and 5 deletions

View File

@@ -227,6 +227,21 @@ export const UnderlineTooltip = html`<svg width="170" height="68" viewBox="0 0 1
</svg>
`;
// prettier-ignore
export const TodoTooltip = html`<svg width="170" height="68" viewBox="0 0 170 68" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="170" height="68" rx="2" fill="white"/>
<mask id="mask0_5604_203551" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="170" height="68">
<rect width="170" height="68" rx="2" fill="white"/>
</mask>
<g mask="url(#mask0_5604_203551)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.6667 19C12.7462 19 12 19.7462 12 20.6667V27.3333C12 28.2538 12.7462 29 13.6667 29H20.3333C21.2538 29 22 28.2538 22 27.3333V20.6667C22 19.7462 21.2538 19 20.3333 19H13.6667ZM12.9091 20.6667C12.9091 20.2483 13.2483 19.9091 13.6667 19.9091H20.3333C20.7517 19.9091 21.0909 20.2483 21.0909 20.6667V27.3333C21.0909 27.7517 20.7517 28.0909 20.3333 28.0909H13.6667C13.2483 28.0909 12.9091 27.7517 12.9091 27.3333V20.6667Z" fill="#77757D"/>
<text fill="#121212" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="10" letter-spacing="0px"><tspan x="28" y="27.6364">Here is an example of todo list.</tspan></text>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 40.6667C12 39.7462 12.7462 39 13.6667 39H20.3333C21.2538 39 22 39.7462 22 40.6667V47.3333C22 48.2538 21.2538 49 20.3333 49H13.6667C12.7462 49 12 48.2538 12 47.3333V40.6667ZM19.7457 42.5032C19.9232 42.3257 19.9232 42.0379 19.7457 41.8604C19.5681 41.6829 19.2803 41.6829 19.1028 41.8604L16.0909 44.8723L15.2002 43.9816C15.0227 43.8041 14.7349 43.8041 14.5574 43.9816C14.3799 44.1591 14.3799 44.4469 14.5574 44.6244L15.7695 45.8366C15.947 46.0141 16.2348 46.0141 16.4123 45.8366L19.7457 42.5032Z" fill="#1E96EB"/>
<text fill="#8E8D91" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="10" letter-spacing="0px"><tspan x="28" y="47.6364">Make a list for building preview.</tspan></text>
</g>
</svg>
`
export const tooltips: Record<string, SlashMenuTooltip> = {
Text: {
figure: TextTooltip,
@@ -307,4 +322,9 @@ export const tooltips: Record<string, SlashMenuTooltip> = {
figure: StrikethroughTooltip,
caption: 'Strikethrough',
},
'To-do List': {
figure: TodoTooltip,
caption: 'To-do List',
},
};