-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Sql Preview webview implementation with multi-doc PRQL Sql Preview support #110
Conversation
RandomFractals
commented
Feb 19, 2023
- Implement new Sql Preview webview panel class as described in Refactor SQL Preview webview implementation #60
- Add Sql Preview WebviewPanelSerializer to restore Sql Previews on vscode reload (Implement SQL Preview webview deserialize to show it after VSCode reload #102)
- Add multi-doc PRQL SQL Preview support and active PRQL editor/Sql Preview reveal/linking (Create and use separate SQL Preview webview for multiple open PRQL documents #108)
- Refine Sql copy to Clipboard messaging and support of multiple Sql Previews (Display virtual sql filename in clipboard copy notification message #109)
- Rework Sql Preview html template, js and and css
with new ActivePrqlDocumentUri key we'll use to save prql doc. reference to restore sql preview
…nt changes and clear it when sql preview is no longer active, so we can use it for sql preview restore on vscode reload later
and don't clear it for sql preview restore to work on vscode reload
- rename it to sqlPreview.ts - and delete old src/sql_ouput folder
and make extension code imports, multi-line statements, function args, etc. more compact and readable
- rename sql_ouput webview files to sql preivew - add new SqlPreviewSerializer implementation - create new SqlPreview class with most of the setup for multi-instance sql document previews - add view init, refresh and update view state to upated sqlPreview.js
- add open sql preview command to commands - use new SqlPreview.render to render those views
- remove getResourceUri() from src/views/utils.ts - and document html template and resource uri methods
only sql preview uses it
when there is no active prql text editor and sql preview is being restored on vscode reload
- add new command field to all the webview messages - finish wring refresh with storing of document url in view state for the view restore on vscode reload - check if prql file exists prior to loading it in restored sql previews
the other favicon.ico image doesn't get restored for the open sql previews when vscode is reloaded
we now show sql filename instead, so it should be clear it's an sql preview panel.
- add text editor change handler to extension.ts - add SqlPreview.reveal(documentUri) - preserve active editor focus on sql preview reveal - reorg webview html template construction
in sql preview to show it again in webview panel reveal, and use it for active sql preview sql copy to clipboard
when there is no corepsonding open sql preview for a given prql document uri in an active text editor.
and show virtual prql sql document name in copied to clipboard notification
show last valid sql html output even when errors are encountered
and added a note about UI theme neutral html/css in sql preview webview
for more information, see https://pre-commit.ci
Damn, this is an impressive list of commits, kudos! |
Would have been better to see them in main branch too. Maybe we can do that next time. Most of those changes were new web view implementation related, and I patched some of the questionable display issues and behavior in other parts of extension related to sql preview webview. |
But they reached main? Would you want to see them not squashed? |
yes. as I mentioned in discord, refactors like this I'd rather see individual commits in main. We should enable that option in this repo Settings for such occasions. |
Done! |
Really looking forward to trying this out! |