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

#1644 Add button for VirtualizedTable Rows in Expression Builder #1645

Merged
merged 8 commits into from
Jan 5, 2024

Conversation

veenas1
Copy link
Contributor

@veenas1 veenas1 commented Dec 13, 2023

Fixes: #1644

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

Copy link
Member

@matthoward366 matthoward366 left a comment

Choose a reason for hiding this comment

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

Can we do something to make it so the add button row stays the same width? In some case it's using too much space and caused an ellipsis.
Screenshot 2023-12-19 at 10 59 48 AM

Also, I found a defect when sorting a column then clicking on it. The wrong row is selected. This isn't caused by your change but can you have a look to see if it's an easy fix or create a new issue for it.

@veenas1 veenas1 force-pushed the 8415_add_column_virtualized_table branch from 000a423 to bf56d13 Compare December 25, 2023 03:44
@veenas1
Copy link
Contributor Author

veenas1 commented Dec 25, 2023

@matthoward366

  • Add column width: Could you please check now, I have made the width to be in px, so that it's used as is and not adjusted.
  • Column Sort: Unable to replicate the issue. If you can still see the defect, I can work on it with a new issue.

{
key: "addColumn",
label: formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_ADD_COLUMN),
width: "50px",
Copy link
Member

Choose a reason for hiding this comment

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

For all the addColumn fields we should also add addColumn staticWidth: true

{
key: "values",
label: categoryInfo.field_columns.value_column_info.locLabel,
description: categoryInfo.field_columns.value_column_info.descLabel,
Copy link
Member

Choose a reason for hiding this comment

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

Remove comma at the end


headers.push({ key: "function", label: functionColumn, width: 73, resizable: true });
headers.push({ key: "return", label: returnColumn, width: 27 });
headers.push({ key: "addColumn", label: addNewColumn, width: "50px", resizable: true });
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't have resizable

@matthoward366
Copy link
Member

Here is what I'm seeing for sort. The selection gets off.
sort issue

@veenas1 veenas1 force-pushed the 8415_add_column_virtualized_table branch from 6cbcc4d to c7a0d97 Compare January 4, 2024 05:19
@veenas1 veenas1 requested a review from matthoward366 January 4, 2024 10:45
@@ -380,7 +380,7 @@ class VirtualizedTable extends React.Component {
}

if (this.props.selectable) {
const rowSelected = this.isRowSelected(rowData.originalRowIndex);
const rowSelected = this.props.sortDirection ? this.isRowSelected(rowData.index) : this.isRowSelected(rowData.originalRowIndex); // use current row index when Sorted
Copy link
Member

Choose a reason for hiding this comment

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

@caritaou Do you see any issue with this change? I did some testing around row selection and for the most part it doesn't really work correctly onSort in the table controls. It just clears the selection.

Copy link
Member

Choose a reason for hiding this comment

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

but this does fix the issue in the expressionBuilder around sorting and selection.

Copy link
Member

Choose a reason for hiding this comment

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

This looks good to me, considering this never worked for sorting columns with row selections.

Copy link
Member

@matthoward366 matthoward366 left a comment

Choose a reason for hiding this comment

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

lgtm. @caritaou can you merge if you think the selection change is good.

@caritaou caritaou merged commit cdfe00b into elyra-ai:main Jan 5, 2024
3 checks passed
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.

Add button for VirtualizedTable Rows in Expression Builder
3 participants