pgweb
pgweb copied to clipboard
Add ability to split the SQL query page into horizontal panes
On the custom SQL query page there should be an option to display the editor/results horizontally, so that the editor is on the left and query results are on the right. This will help a lot when writing a large SQL query.
This would indeed be my biggest UX issue. Instead of your suggested split, you could also think of leaving the current layout but to either split the window using a slider or even just have the ability to show/hide the lower/result part.
Or open Query to new browser window or Tab. On that window you can select/change the query+result table horizontal/vertical.
In the meantime, I paste this snippet into the browser's JavaScript console (devtools):
(function(h) {
document.getElementById("input").style.height = `${h}px`;
document.getElementById("output").style.top = `${h+1}px`;
document.getElementById("custom_query").style.height = `${h-62}px`;
editor.resize();
})(450)
This increases the query editor from 255px to 450px in height. Adjust the value at your convenience.
This should work well as user script (→ TamperMonkey) or even as bookmarklet, although I haven't tested either.
I'll close this one since query input box resizing has been implemented in master.