pgweb icon indicating copy to clipboard operation
pgweb copied to clipboard

Add ability to split the SQL query page into horizontal panes

Open sosedoff opened this issue 7 years ago • 3 comments

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.

sosedoff avatar Dec 21 '17 02:12 sosedoff

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.

fzumstein avatar Oct 10 '18 12:10 fzumstein

Or open Query to new browser window or Tab. On that window you can select/change the query+result table horizontal/vertical.

kshji avatar Sep 11 '19 05:09 kshji

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.

dmke avatar May 11 '22 12:05 dmke

I'll close this one since query input box resizing has been implemented in master.

sosedoff avatar Dec 06 '22 18:12 sosedoff