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

frontend: Enhance Table component with column resizing functionality #2773

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

zcyc
Copy link

@zcyc zcyc commented Jan 23, 2025

fix #2652
Dear maintainers, this is my first time contributing code to this project, please forgive me if there are any problems. Thank you for your work.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 23, 2025
@zcyc zcyc force-pushed the feat/table-column-resizing branch from ec8f156 to 722a69c Compare January 23, 2025 03:50
@sniok sniok self-requested a review January 23, 2025 10:36
@zcyc zcyc force-pushed the feat/table-column-resizing branch from 85b5bec to d10f592 Compare January 23, 2025 10:44
Copy link
Contributor

@sniok sniok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for opening a PR!

When I tried it, it behaves a bit weird, there's something wrong with the resizing

Recording.2025-01-23.135103.mp4

I'm guessing it's because of the custom table layout we're using so it might be a lot harder to get it right

@zcyc
Copy link
Author

zcyc commented Jan 24, 2025

Hi, I have tried several different solutions. The reason why the columns next to each other change with the adjustment is that the width of the table is fixed. If we want to ensure that the adjustment does not affect other columns, i cannot fix the width of the table. Adjusting the column width will cause the page to stretch. We can discuss which solution is better.

In the first solution, I found that the mouse position and the operation handle position are different, and the column width will jump with the text wrapping and unwrapping.

2025-01-24.11-31-00.mp4

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 24, 2025
@zcyc
Copy link
Author

zcyc commented Jan 24, 2025

I pushed the code for the second solution to pr, but I can't fix the width of the page. Maybe all the places where it is used need to be changed, which will be a big change. I'm not sure whether to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to change column widths
2 participants