Truncate long node names in export button

This commit is contained in:
Danila Poyarkov 2026-03-02 19:38:17 +03:00
parent ef78ffd2e4
commit 7534c46583
3 changed files with 7 additions and 3 deletions

View file

@ -8,11 +8,14 @@
- Tab bar with close buttons, middle-click to close, and new tab (+) button
- Keyboard shortcuts: ⌘N/⌘T new tab, ⌘W close tab, ⌘O opens in new tab
- Native Tauri menu: File → New and File → Close Tab wired to tab actions
- Render text from SkPicture cache when fonts are missing — pixel-perfect display without the font installed
- Missing font indicator (⚠) next to font picker in the sidebar
### Fixes
- Fix clipboard "Outside int range" error — `pasteID` used unsigned int exceeding Kiwi's signed 32-bit field
- Error toasts are now sticky (don't auto-dismiss), with selectable text, copy button, and close button
- Truncate long node names in export button
### Tests

View file

@ -138,7 +138,7 @@ function formatScale(scale: number): string {
<button
v-if="settings.length > 0"
class="mt-1.5 w-full cursor-pointer rounded bg-blue-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-blue-700 disabled:cursor-default disabled:opacity-50"
class="mt-1.5 w-full cursor-pointer truncate rounded bg-blue-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-blue-700 disabled:cursor-default disabled:opacity-50"
:disabled="exporting"
@click="doExport"
>

View file

@ -1569,8 +1569,9 @@ export function createEditorStore() {
if (nodes.length === 0) return
const names = nodes.map((n) => n.name).join('\n')
const textPicBuilder = _renderer
? (node: SceneNode) => _renderer!.buildTextPicture(node)
const renderer = _renderer
const textPicBuilder = renderer
? (node: SceneNode) => renderer.buildTextPicture(node)
: undefined
const internalHtml = buildOpenPencilClipboardHTML(nodes, graph, textPicBuilder)
const figmaHtml = buildFigmaClipboardHTML(nodes, graph)