Skip to content

[FEATURE] Auto-size result columns to fit their header names #1101

Description

@igorwfaoro

Is your feature request related to a problem?

I use LibreDB Studio regularly for querying databases, but every result column starts with the same width. When column names vary in length, longer names are immediately truncated.

To understand the result, I have to manually resize columns one by one. There is also no double-click action to automatically fit a column to its header name.

This has made the results grid frustrating enough that, on some occasions, I went back to DBeaver because the experience was much easier there.

This request is about fitting the column width to the column header name only. Cell values should keep their current rendering behavior and should not be used to calculate the initial width.

Describe the solution you'd like

Initialize each result column with a width that fits its header name, while respecting reasonable minimum and maximum widths.

A double-click on the resize handle could also restore the selected column to its header-fit width.

Manual resizing should continue to work afterward.

Describe alternatives you've considered

The current workaround is to drag each column manually. This is especially inconvenient for queries with many columns or long names.

The existing text-wrapping behavior is not a solution for this request because it affects cell values, not the initial width of the column header.

Use Case

After running a SELECT query, I want to be able to identify the result fields immediately without resizing every column first. Column names such as customer_registration_number, shipping_address, or last_modified_at should remain readable by default.

Additional Context

The Results Grid currently gives all field columns the same initial width, so the header itself can be truncated even when the cell content is not a problem.

Possible Implementation Notes

  • Measure the header label rather than all cell values when calculating the initial width.
  • Keep existing minimum and maximum width limits so a long name does not make the grid unusable.
  • Preserve manual drag resizing and the existing cell rendering behavior.
  • Consider a per-column double-click action to recalculate the width from the header name.

Related Issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions