Skip to content

[OPIK-2227]: Make table columns independently resizable #2318

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

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

Conversation

infinitespark-96
Copy link
Contributor

@infinitespark-96 infinitespark-96 commented May 29, 2025

Details

  • Ensured the table width reflects the sum of column widths so resizing one column no longer stretches others
  • Increased the resize handle size on the last column to simplify resizing
  • Fine-tuned some columns' width

Issues

Changing the width of one column changes the width of all other columns.
Plus It's also hard to resize the last column in the table.
Resolves #2227

How it was before: https://github.com/user-attachments/assets/3761996a-353c-4fea-b50c-c5ab4a400df6
And how it is now:https://github.com/user-attachments/assets/ae2ef936-5463-4582-8938-e2bb6b5cd863

@infinitespark-96 infinitespark-96 requested a review from a team as a code owner May 29, 2025 20:06
@andriidudar
Copy link
Contributor

Hey @infinitespark-96 , Thank you for your contribution.

I have run code with your improvements, and I see that the table layout is broken.
image
image
image

We want to preserve a good UI while introducing the functionality to define column widths for each column. To achieve this, the following steps should be taken:
• Increase the default column width and specify default widths for particular columns on each page.
• From a technical perspective, we need to add an additional column in the DataTable component with an auto width. This column will occupy any remaining table width when the total width of the columns is less than the table’s width.
• Additionally, there are specific scenarios that require custom solutions. For example, on comparison pages, we have virtual rows (for comparing experiments), and in tables with grouping (like Experiments and Optimization pages), further adjustments are needed.

Copy link
Contributor

@andriidudar andriidudar left a comment

Choose a reason for hiding this comment

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

The table layout should remain the same as was before the change.

@infinitespark-96
Copy link
Contributor Author

infinitespark-96 commented Jun 2, 2025

I've made the requested changes fixes and improvements. IMO, it looks good now, and the main issues addressed in issue #2227 are now fixed. If there are any additional improvements maybe better to make a separate ticket for this?

image
image
image
image
image
image

Screencast: https://github.com/user-attachments/assets/e066bc70-2e02-4626-95e4-ce3220a3d3ea
@andriidudar

Copy link
Contributor

@andriidudar andriidudar left a comment

Choose a reason for hiding this comment

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

Hey @infinitespark-96, thank you for your contribution!

From a technical perspective, your code looks solid. We’re currently having internal discussions with the product team about whether we want to introduce such a drastic change to the table layout.

There’s also an issue with some tables where column titles are being trimmed by default — we’ll need to address that.

Additionally, I suggest the following change in the DataTable file: remove the calculation of the auto column’s width and delegate that responsibility to the browser instead.
image
image

I recommend pausing on this until the product team has made a decision on how to proceed.

FYI: @jacques-comet @juanferrub @olesya-comet @aadereiko

@infinitespark-96
Copy link
Contributor Author

infinitespark-96 commented Jun 5, 2025

Got it, thanks for the review @andriidudar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing the width of one column changes the width of all other columns
3 participants