Skip to content

fix(erd): large diagrams fit, Ctrl/Cmd++ zooms, Esc closes the search before the pick (#1154) - #1201

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1154-erd-navigation
Oct 9, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1154-erd-navigation

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1154

What was wrong

  • Fit did not fit large diagrams. The fit zoom was clamped to the 20 % minimum, so a schema of 150–200 tables opened partly outside the viewport.
  • Ctrl/Cmd++ did nothing. Only Ctrl/Cmd+= was bound; + is Shift+= on most layouts.
  • Esc never closed the search. QueryaSearchField handles Esc itself (clear the text, then drop the focus), so the view's Esc binding never ran. The panel stayed open and the canvas lost the keyboard: zoom and search shortcuts stopped working until a click.
  • Closing the search would clear the pick. The view's Esc closed the search and cleared the selection in one go, so a table found with Enter lost its highlight as soon as the search was closed. The search also stayed open after a pick.
  • Clicks did not give the keyboard back. Clicking a card or the empty canvas did not focus the canvas.
  • Hiding the picked table left every card faded, because the pick pointed at a table no longer drawn.

Changes

  • ErdLayout.fitScale: the fit may go below 20 %; the viewer's minimum zoom follows it.
  • Ctrl/Cmd+Shift+= and the + key zoom in.
  • Picking from the search (Enter or click) centres and selects the table, closes the search and focuses the canvas.
  • An empty search that loses the focus closes and focuses the canvas. Esc on the canvas closes an open search first, then clears the pick.
  • A click on a card or the canvas focuses the canvas. Hiding the picked table clears the pick.
  • Tests: fit below 20 % (unit and widget), Ctrl+Shift+= zooms in, Enter in the search picks and closes it, Esc with an open search keeps the pick and the next Esc clears it.

… before the pick (#1154)

Fit stopped at the 20 % zoom floor, so a schema of a few hundred tables did not
fit on first load; the floor now follows the fit. Ctrl/Cmd++ is Shift+= on most
layouts and was not bound.

The search field takes Esc itself (clear, then unfocus), so Esc never closed
the search and the canvas lost the keyboard. An empty search that loses the
focus now closes and hands the keyboard back; picking a table from the search
closes it too. The view's Esc closes an open search first and clears the pick
only on the next press. A click on a card or the canvas takes the keyboard, and
hiding the picked table clears the pick instead of leaving every card faded.
@github-actions github-actions Bot added enhancement New feature or request frontend Theme parser epic label: frontend ui User interface components and widgets ux User experience, keyboard shortcuts and interactions P2 Medium priority / Parity & Refactoring labels Oct 9, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit c9f922b into dev Oct 9, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend Theme parser epic label: frontend P2 Medium priority / Parity & Refactoring ui User interface components and widgets ux User experience, keyboard shortcuts and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant