Skip to content

Blocks palette: open a library drawing, and come back on the tab and folder left - #3606

Merged
HakanSeven12 merged 2 commits into
HakanSeven12:mainfrom
ohagmann:feat/block-palette-open-drawing
Nov 24, 2026
Merged

HakanSeven12 merged 2 commits into
HakanSeven12:mainfrom
ohagmann:feat/block-palette-open-drawing

Conversation

@ohagmann

Copy link
Copy Markdown
Contributor

What

The Blocks palette's Libraries tab lists a folder's drawings, but a drawing could only be inserted. Someone who keeps
their template drawings in a library folder still needed a file manager beside the palette to open one for editing.
And the palette always came back on Current Drawing at the library root, so getting to a template meant several clicks
every session.

  • Open Drawing in the context menu of a library drawing, and of a whole drawing on the Recent or Favorites tab.
    It opens in its own tab the way a drawing dropped on the window opens (a tab already showing it comes to the front).
  • The palette remembers the tab it was left on and the library folder the Libraries tab showed, across
    sessions (block_palette_tab, block_library_folder in the settings). The folder is used while it exists; when
    BLOCKNAVIGATE names a folder, that still comes first. A folder that is gone falls back to the library root.
  • The new menu text is in every language.
  • A second commit translates the palette's texts in the German catalog, which were still in English; the four tab
    labels are short enough to fit the palette's default width.

Wiki page BLOCKPALETTE updated.

Checked

On a desktop build: right-click a drawing in a library sub-folder → Open Drawing opens it in a new tab; closing and
starting again, BLOCKSPALETTE comes back on the Libraries tab in that sub-folder.

Tests

app::update::block_palette_library_tests:

  • a_library_drawing_opens_from_the_context_menu
  • only_drawings_offer_open_drawing (library drawing and whole-drawing entries yes; blocks, current-drawing blocks and
    folders no)
  • the_palette_comes_back_on_its_tab_and_library_folder (and falls back to the root when the folder is gone; fails
    without the change)
  • tabs_round_trip_through_their_settings_index

cargo test --lib: 7087 passed. No new clippy warnings in the changed lines.

…folder left

The Libraries tab lists a folder's drawings, but a drawing could only be
inserted: someone who keeps template drawings in a library still needed a
file manager beside it to open one. Now:

- Right-click a library drawing, or a whole drawing on the Recent or
  Favorites tab, and choose Open Drawing: it opens in its own tab the way a
  drawing dropped on the window opens (a tab already showing it comes to
  the front).
- The palette remembers the tab it was left on and the library folder the
  Libraries tab showed, across sessions (block_palette_tab,
  block_library_folder in the settings). The folder is used when it still
  exists; BLOCKNAVIGATE, when it names a folder, still comes first.

The new menu text is in every language. Wiki page BLOCKPALETTE updated.

Tests (app::update::block_palette_library_tests): the menu opens the
drawing; only drawings offer Open Drawing; tab and sub-folder come back in
the next session, a folder that is gone falls back to the library root;
tab indices round-trip.
The palette's tabs, headings, options and messages were still in English
in the German catalog.
@HakanSeven12
HakanSeven12 merged commit b2afe5a into HakanSeven12:main Nov 24, 2026
8 checks passed
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.

2 participants