Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Data grid add column actions #2024

Merged
merged 98 commits into from
Feb 28, 2024
Merged

Data grid add column actions #2024

merged 98 commits into from
Feb 28, 2024

Conversation

adoroshk
Copy link
Contributor

@adoroshk adoroshk commented Feb 7, 2024

Summary

  • This PR adds column actions row to terra-table, terra-worklist-data-grid, terra-flowsheet-data-grid components. The column actions are placed in a separate row below the header row, they have resize handle feature the same way header cells do.
  • Previously the header cell in the last pinged columns had a shadow on the bottom, that was actually a side effect for the shadow on the right needed for pinned column. As that shadow was visible on action row, it was removed. That change attributed to changes in css files and required regeneration of many wdio screenshots.
  • Changes to compact-interactive-list component in this PR are only for typo fixes.

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR is a part of
UXPLATFORM-10180

@adoroshk adoroshk changed the title [do not merge] Data grid add column action POC Data grid add column actions Feb 12, 2024
Copy link
Contributor

@sycombs sycombs left a comment

Choose a reason for hiding this comment

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

Have a few comments on wording/variable naming but otherwise LGTM!

* Removed the default rowMinimumHeight from FlowsheetDataGrid so that the `terra-table` default value is used.

* Added
* Column actions support added.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit (for consistency):

Suggested change
* Column actions support added.
* Added support for column actions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 7dec538

* @param {PropTypes.arrayOf(columnShape)} columns - array of data grid columns
* @returns bool
*/
const checkForColumnActions = (columns) => (!!columns.find(column => column.action));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we rename this to hasColumnActions to be more in line with how Terra generally names booleans/functions returning booleans?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed in d050bcd

/**
* String that specifies the init height for the resize handler to accommodate actions row.
*/
resizeHandlerInitHeight: PropTypes.string,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Can we just call this initialHeight so we don't have to abbreviate to 'init'? It can be assumed that the height is for the resize handler since it's on the ColumnResizeHandle component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed in 111b1e8

packages/terra-data-grid/src/DataGrid.jsx Outdated Show resolved Hide resolved
packages/terra-table/src/subcomponents/ColumnHeader.jsx Outdated Show resolved Hide resolved
adoroshk and others added 4 commits February 26, 2024 17:20
…mples/TableColumnActions.doc.mdx

Co-authored-by: Sydney Combs <[email protected]>
…/WorklistDataGrid.1/Examples.3/ColumnActions.7.doc.mdx

Co-authored-by: Sydney Combs <[email protected]>
…/WorklistDataGrid.1/Examples.3/ColumnActions.7.doc.mdx

Co-authored-by: Sydney Combs <[email protected]>
@github-actions github-actions bot temporarily deployed to preview-pr-2024 February 28, 2024 14:24 Destroyed
@adoroshk adoroshk merged commit 365c26a into main Feb 28, 2024
21 of 22 checks passed
@adoroshk adoroshk deleted the data-grid-add-column-action branch February 28, 2024 15:15
@eawww
Copy link
Contributor

eawww commented Feb 28, 2024

Retroactively approving. Thanks Alla!

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

Successfully merging this pull request may close these issues.

7 participants