Description: Tools > SQL opens a dialog from which ad-hoc SQL statements can be submitted. As someone who uses Base as a tool for quick ad-hoc data massaging, this is among my most frequently used tools; however, I feel UX could be improved in a few ways: * Don’t make it a modal dialog. There’s really no need why I should not be able to do anything in the main window while this dialog is open. In fact, I would recommend making this not only a non-model dialog but a side pane, similar to the Document Navigator or Styles and Formatting in other LO apps. * Save the list of previous commands at least for the entire session (i.e. do not clear it when the dialog is closed and reopened), maybe even across sessions. * For select statements, display the number of rows returned (maybe even if “show output of SELECT statements” is unchecked) Steps to Reproduce: This field does not apply to enhancements. Actual Results: This field does not apply to enhancements. Expected Results: This field does not apply to enhancements. Reproducible: Always User Profile Reset: No Additional Info: This field does not apply to enhancements.
This bug (enhancement) isn't reported only for one part, which should be changed. So it is difficult to give a comment to all. Might be it is better to write 3 bugs to get a good answer. 1. Dialog Tools → SQL shouldn't suppress any other action 2. Commands should be be saved 3. Numbers of affected rows should be shown I will answer only to 2: Previous commands will be saved while the dialog is opened. But they will be deleted when dialog will be closed. I would prefer to save the commands in the Base file. You should also be able to delete a command you don't need any more in the list of commands. This possibility isn't offered at this moment. So it is bug-description for a new enhancement. I will switch this one to "NEW".
We discussed the topic in the design meeting (sorry for the delay). The requested improvements make sense and we suggest to start with the easy-hackable part + remember the dialog per session + make the dialog amodal + show the number of rows Code pointer: dbaccess/source/ui/dlg/directsql.cxx Prototype for implementation: https://gerrit.libreoffice.org/c/core/+/129894 Side note: the colors are not usable on dark themes => bug 162678 Storing the SQL statements in the document is more difficult and better handled in another ticket. It needs also a bit discussion regarding privacy (a function to clear has been mentioned).
The first batch of improvements at https://gerrit.libreoffice.org/c/core/+/172803
Heiko Tietze committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0266763e05d1ca9413321533dcea73c4643db476 Resolves tdf#140298 - Improve UX for SQL dialog It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
This patch brought * dialog made resizable * user input remembered across session * number of results shown (including plural form) Missing: * colors (different ticket) * amodal (just changing the flag wasn't successful) * store command in ODF I suggest to resolve this ticket as fixed and handle the ODF storage in an extra ticket. The modality question is something different- probably not needed anymore and quite error-prone so we maybe not do it. Feel free to reopen.
> > Affected users are encouraged to test the fix and report feedback. Tested and works as expected after the patch Version: 25.2.0.0.beta1+ (X86_64) / LibreOffice Community Build ID: 9415356bed0f7588f14abb37fedd4f00c51f0010 CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win Locale: es-ES (es_ES); UI: es-ES Calc: CL threaded
(In reply to jcsanz from comment #6) > Tested and works as expected after the patch You are welcome to set the VERIFIED flag.
Heiko: I noticed that making the dialog resizable has an annoying side effect. When we execute certain queries, close the dialog and reopen it, the width of the dialog might have increased considerably. This is seen with all UIs. A simple example: 1. Download and open attachment 162042 [details] from bug 134034 2. Tools - SQL, execute this (with both checkboxes checked): SELECT CAST( ( ( SELECT EXTRACT( YEAR FROM COALESCE ( "BeginnDatum", CURRENT_DATE ) ) FROM "Filter" WHERE "ID" = TRUE ) - 2 ) || '-12-31' AS DATE ) + "Nr" AS "Datum", "Nr" AS "lfdNr" FROM "NrBis1100" Close dialog and reopen. I suppose it is related to the length of the query itself - it does not matter, if the query has newlines making it appear not very wide.
(In reply to Buovjaga from comment #8) > When we execute certain queries, close the dialog and reopen it, the > width of the dialog might have increased considerably. Caolan, do you have an advice here? I fill the content of a ScrolledWindow (here the SQLEditView) with content in the DirectSQLDialog c'tor. And it ignores the set_size_request().
(In reply to Heiko Tietze from comment #9) > ...content of a ScrolledWindow Wrong, the culprit was the history dropdown.
Heiko Tietze committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/872945ecec6cabac691b036676d3dfe81f240948 Resolves tdf#140298 - SQL dialog must not become oversized It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Heiko Tietze committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/f40d227d4a64d5a9057248293d99cdddd95c6020 Resolves tdf#140298 - SQL dialog must not become oversized It will be available in 25.2.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.