New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

date column in dag is truncated #674

Closed
sthalik opened this Issue Mar 22, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@sthalik
Contributor

sthalik commented Mar 22, 2017

Hey,

The commit date column is truncated on my end. Furthermore, I'm unable to persist the column resize unless making the graph smaller. My date format includes the day of week, like so:

Wed Mar 22 03:38:11 2017 +0100

Could you resize the column to fit on dag startup, please? It can be as simple as making a sample date and QFontMetrics width and multiply by 1.25 or some other coefficient.

sh

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Mar 22, 2017

Member

in the tree widget's add_commits() if it does self.resizeColumnToContents(2) it'll roughly do what you want, but it then ends up truncating author names.

Both author names and subject lines are arbitrary length, so resizing to their content width isn't that great either.

Is the root problem that any manual adjustment is not persisted? It might be better to just remember the header widths and restore them instead of special-casing the date column.

FWIW, manual resizing does seem to persist fine in-session. It's just lost when restarting.

Also, if you hover your mouse on the right-most part of the date column, next to the scrollbar, you can actually grab it there and resize the date column wider so that it's not truncated. Is that what you mean by "unless making the graph smaller"?

Once I resize the header by dragging the right side outwards to the right, the scrollbar on the bottom expectedly increases in size since we've now made the table data wider.

Does the resizing work for you as-is, or should the header widths persist across sessions, aka stored in ~/.config/git-cola/settings ?

Member

davvid commented Mar 22, 2017

in the tree widget's add_commits() if it does self.resizeColumnToContents(2) it'll roughly do what you want, but it then ends up truncating author names.

Both author names and subject lines are arbitrary length, so resizing to their content width isn't that great either.

Is the root problem that any manual adjustment is not persisted? It might be better to just remember the header widths and restore them instead of special-casing the date column.

FWIW, manual resizing does seem to persist fine in-session. It's just lost when restarting.

Also, if you hover your mouse on the right-most part of the date column, next to the scrollbar, you can actually grab it there and resize the date column wider so that it's not truncated. Is that what you mean by "unless making the graph smaller"?

Once I resize the header by dragging the right side outwards to the right, the scrollbar on the bottom expectedly increases in size since we've now made the table data wider.

Does the resizing work for you as-is, or should the header widths persist across sessions, aka stored in ~/.config/git-cola/settings ?

@davvid davvid added the usability label Mar 22, 2017

davvid added a commit to davvid/git-cola that referenced this issue Mar 22, 2017

widgets: implement column_widths() and set_column_widths()
Related-to: git-cola#674
Signed-off-by: David Aguilar <davvid@gmail.com>

davvid added a commit to davvid/git-cola that referenced this issue Mar 22, 2017

doc: update v2.11 release notes draft
Related-to: git-cola#674
Signed-off-by: David Aguilar <davvid@gmail.com>

@davvid davvid closed this in 1af930f Mar 22, 2017

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Mar 22, 2017

Member

We now remember the column sizes across sessions.

Member

davvid commented Mar 22, 2017

We now remember the column sizes across sessions.

@sthalik

This comment has been minimized.

Show comment
Hide comment
@sthalik

sthalik Mar 24, 2017

Contributor

It works fine except for the initial position. Starting from an old config, the first two columns are very small and the date column is stretched over the entire screen.

Contributor

sthalik commented Mar 24, 2017

It works fine except for the initial position. Starting from an old config, the first two columns are very small and the date column is stretched over the entire screen.

davvid added a commit to davvid/git-cola that referenced this issue Apr 10, 2017

dag: fix the initial column sizes
adjust_columns() was being misled because it was being called before the
widget's final size is known, which resulted in the columns being too
small.

Defer adjust_columns() until the widget is being shown so that
self.width() will return a valid answer.

Related-to: git-cola#674
Noticed-by: Stanislaw Halik <sthalik@misaki.pl>
Signed-off-by: David Aguilar <davvid@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment