Skip to content

Nightly#70

Merged
ric-v merged 2 commits into
dev-asterix:mainfrom
ric-v:nightly
Apr 18, 2026
Merged

Nightly#70
ric-v merged 2 commits into
dev-asterix:mainfrom
ric-v:nightly

Conversation

@ric-v
Copy link
Copy Markdown
Member

@ric-v ric-v commented Apr 18, 2026

This pull request introduces a new feature to enable or disable the SQL Preview (Definition Viewer) in PgStudio, along with several usability improvements and code refactoring. The main focus is on allowing users to toggle the SQL Preview functionality via settings, commands, and UI actions, as well as improving the robustness and flexibility of related commands.

Feature: SQL Preview (Definition Viewer) Enable/Disable

  • Added a new configuration option pgstudio.ddlViewer.enabled to enable or disable SQL Preview features and actions. This can be toggled via settings or new UI actions.
  • Introduced a new command postgres-explorer.ddlViewer.toggleEnabled with an associated icon, available in command palettes and context menus, allowing users to quickly enable or disable the SQL Preview. [1] [2] [3]

Command and UI Enhancements

  • Updated the DDL Viewer commands (openEditableCopy, copyToClipboard) to work contextually with the active SQL Preview tab, improving user experience and error handling when no preview is open.
  • Added CodeLens to the SQL Preview document to toggle the feature directly from the editor, reflecting the current enabled/disabled state.

Internal Refactoring and Robustness

  • Refactored DdlViewerService to track the last preview target instead of using ddlViewColumn and initialized flags, simplifying logic for opening and focusing preview documents. [1] [2]
  • Improved configuration change handling: when the SQL Preview setting changes, all open preview documents and CodeLens are refreshed to reflect the new state. [1] [2]
  • Added utility methods to refresh all open SQL Preview documents and resolve the target URI for commands, increasing reliability and maintainability. [1] [2]

Other

  • Updated the extension version to 1.0.0-nightly to reflect the pre-release/nightly status.

@ric-v ric-v merged commit 477215c into dev-asterix:main Apr 18, 2026
1 check 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.

1 participant