Skip to content

Command palette: one Export… entry that opens the dialog, no path-only duplicate (#79) - #82

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
MarekSpodBiedry:issue-79
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
MarekSpodBiedry:issue-79

Conversation

@MarekSpodBiedry

Copy link
Copy Markdown
Contributor

Fixes #79.

The command palette lists the engine commands and then the UI commands (UI_COMMANDS). Some labels exist in both lists. For "Export…", the engine file.export comes first and is selected by default. It needs a path, which the palette can't give, so Enter fails with invalid parameters for `file.export`: missing `path` . The second entry, app.exportDialog, opens the Export dialog.

The palette now hides an engine command when a UI command has the same label. Only the dialog entry is left. The same duplicates existed for:

  • Open… (file.open) and Save As… (file.saveAs): they need a path too. The File menu and Cmd+O / Cmd+Shift+S already use the dialog commands.
  • Audio from File… / Video from File… (insert.audio / insert.video): with no path or data they fail the same way.
  • Notes (slide.notes): run from the palette with no text, it cleared the current slide's notes. The remaining entry is the Notes pane toggle (view.notes).

The engine commands are not changed. They still work through the control API and scripts. Only the palette list changes.

The list is built in a new palette_items function so a test can check it. The test checks that "exp" and "export" give one "Export…" entry, and that it is app.exportDialog. It also checks that each UI command is the only palette entry with its label. Both checks fail without the fix.

@MarekSpodBiedry
MarekSpodBiedry marked this pull request as ready for review October 10, 2026 17:05
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 8409c33 into storytold:main Oct 14, 2026
1 check passed
@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution, @MarekSpodBiedry! It has landed on main and will ship in the next DeckCraft release.

If you haven't already, please come join us on Discord: https://discord.gg/artcraft

anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
…-finder

macOS: open PDFs from Finder, Open With and the Dock (storytold#73)
anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
…cked (storytold#536)

Japanese forms often name a check box's on state in Shift-JIS (「はい」 is
/storytold#82#CD#82#A2). State names were read with from_utf8_lossy, so ticking such a
box wrote a different name to /AS and /V, no appearance matched, and the box
was drawn with no mark (or not at all).

Names now map to text losslessly (forms::name_text / name_bytes: UTF-8 as
itself, other bytes and `#` as #XX) wherever states and values are read and
written: /V, /DV and /AS, PdfCraft's own state appearances, and FDF import and
export, so such values also survive an FDF or XFDF round trip.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Command palette defaults to an Export entry that fails with missing path

3 participants