Skip to content
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

[Feature Request] Move all right columns while changing a column's width in "table view" #379

Open
chen-yingfa opened this issue Feb 26, 2024 · 5 comments
Labels
feature-request New feature request mid-priority mid priority

Comments

@chen-yingfa
Copy link

Describe your feature request

When using "Table view", when increasing a column's width, the column immediately to the right will be shrinked, but I think a better behavior is that other columns' width are not changed, but just moved horizontally.

For instance, in the following image, when the width of the "Title" column is changed, I do not want the "Authors" column's width to be changed, but want all columns to the right to be moved horizontally accordingly.

image
@chen-yingfa chen-yingfa added the feature-request New feature request label Feb 26, 2024
@GeoffreyChen777
Copy link
Member

Hi, I think it's impossible.

The reason is that:

  1. the entire width of the title bar is fixed.
  2. when you drag the bar between 'title' and 'authors' to the right, we need to increase the size of the 'title' column. But the entire width is fixed. There is no choice but to reduce the width of the authors column. If we don't do that, we have two options:
    • the table is horizontally overflowed: this is really not a good option, we don't want to introduce a horizontal scroll bar.
    • evenly reduce the size of other columns: I believe this is a really BAD option, imagine you have just resized the 'Add Time' column as you prefer, and after that because you changed the width of the 'title' column, the 'Add Time' column changes again.

@chen-yingfa
Copy link
Author

Ok I actually thought it would be a good idea to introduce a horizontal scrollbar, but avoiding it is fine too. In such case, I wish that there is an option to automatically resize a column to fit the content.

@GeoffreyChen777
Copy link
Member

  1. Horizontal scrolling is not easy to operate by default. Although you can use shortcut keys, such as shift + scroll wheel, not all users know it. I believe many people will drag the scroll bar. We don't want to introduce burden to users
  2. Automatic resizing will introduce a bad performance issue:
    • We need to make sure the column widths of each row are consistent.
    • We need to loop through all items, calculate the best width of each column, and then render the UI.
    • Every time we add a new paper, we need to do the calculation again.

@chen-yingfa
Copy link
Author

I'm not talking about automatically resizing after every content update, but that there is a button somewhere (in many apps, it is found by right clicking the column's header row) that, when clicked, the column will be resized immediately to fit the content at hand.

@GeoffreyChen777
Copy link
Member

I'm not talking about automatically resizing after every content update, but that there is a button somewhere (in many apps, it is found by right clicking the column's header row) that, when clicked, the column will be resized immediately to fit the content at hand.

It would be doable.

@GeoffreyChen777 GeoffreyChen777 added the mid-priority mid priority label Feb 26, 2024
@GeoffreyChen777 GeoffreyChen777 moved this to Todo in Paperib Feb 26, 2024
@GeoffreyChen777 GeoffreyChen777 self-assigned this Feb 26, 2024
@GeoffreyChen777 GeoffreyChen777 removed their assignment Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request mid-priority mid priority
Projects
Status: Todo
Development

No branches or pull requests

2 participants