pgcenter icon indicating copy to clipboard operation
pgcenter copied to clipboard

Add support for narrow screens

Open rominf opened this issue 8 years ago • 7 comments

I propose to add support for narrow screens (1280x1024 for example) either by adaptive TUI, or by template option.

rominf avatar Dec 22 '15 12:12 rominf

I do not fully understand, can you explain your idea?

lesovsky avatar Dec 22 '15 13:12 lesovsky

This how pgcenter looks like on a 1366px768 screen: pgcenter on narrow screen

I propose to either:

  1. Add horizontal scrollbar.
  2. Show smaller amount of information to fit into window.
  3. Allow user to specify required columns.

rominf avatar Dec 22 '15 13:12 rominf

It's clear now. Added in TODO.

lesovsky avatar Dec 22 '15 13:12 lesovsky

I have the same problem. On activity page I don'd see "query" column at all. I use putty with 14 font size + tmux screen multiplexer on linux. Lowering page size helps a bit.

dan-aksenov avatar Feb 08 '19 08:02 dan-aksenov

Just an idea for realisation. Two column header convert to one column. And the query statement put on the next row.

Splarv avatar Feb 12 '19 16:02 Splarv

Horizontal scrolling would be good to have -- similar to what pspg provides for psql.

NikolayS avatar May 25 '20 23:05 NikolayS

@NikolayS I fully support implementing pspg(1)-style scrolling (both horizontal and vertical). This would be an excellent feature that could allow more features and users to customize a wide range of settings.

For instance, users could set individual column minimum and maximum lengths, ensuring that columns are displayed in their minimum width when not selected, for example, and are expanded to their maximum width when selected, and scrolling horizontally if their content exceeds the maximum width. Or, additionally, users could set individual row minimum and maximum heights (with obvious minimum height of 1) enabling them to set specific heights for rows (some may want to have all rows of minimum height of 3, for example, for any reason). This would allow for flexible wrapping or unwrapping of cell contents based on the width and also vertical scrolling when necessary.

I see each cell itself as a little box capable of resizing, reflowing it's content (wrapping) and scrolling it in either direction. Such cell is then "bound" to the columns and rows matrix that maintains the "higher order" pane "barriers". You can imagine it as "global view" mode when you scroll etc. the whole columns and rows and they just behave pretty similarly how pspg(1) does it (perhaps having some extra min/max boundaries as suggested) and then you go and select individual "cell" and enter it so that you will be in a "cell view" which lets you do other things (e.g. scroll and wrap/unwrapp content, run external script on a SQL query etc.).

I am not sure if I explained it well and AFAIK nothing similar to it was implemented for TUI (yet). Although pspg(1) is closest to it I know about... We can see the concept of two modes elsewhere (starting from vi(1) and ending with "spreadsheet" programs).

mjf avatar Jan 10 '24 14:01 mjf