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

Grid upgrade #3395

Merged
merged 5 commits into from
Jun 14, 2023
Merged

Grid upgrade #3395

merged 5 commits into from
Jun 14, 2023

Conversation

lbwexler
Copy link
Member

Hoist P/R Checklist

Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.

  • Caught up with develop branch as of last change.
  • Added CHANGELOG entry, or determined not required.
  • Reviewed for breaking changes, added breaking-change label + CHANGELOG if so.
  • Updated doc comments / prop-types, or determined not required.
  • Reviewed and tested on Mobile, or determined not required.
  • Created Toolbox branch / PR, or determined not required.

If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.

Pull request reviewers: when merging this P/R, please consider using a squash commit to
collapse multiple intermediate commits into a single commit representing the overall feature
change. This helps keep the commit log clean and easy to scan across releases. PRs containing a
single commit should be rebased when possible.

@lbwexler lbwexler requested review from amcclain and TomTirapani June 14, 2023 02:13
@lbwexler
Copy link
Member Author

Not quite sure how to handle this. It looks like the type for headerName: is 'string' although the ReactNode form that we use in our column value filter implementation continues to work fine.

Given that the filter is an implementation class and continues to work well, I see no reason for immediate change, but we should probably respect agGrid's specified string type in our Column and ColumnGroup class.

@lbwexler
Copy link
Member Author

Not sure if needs to be called out as a breaking change. we could canvas people to see if it is being used to return ReactNodes elsewhere

@TomTirapani
Copy link
Member

I don't understand the need to change the headerName type? It doesn't look like this is ever used directly by agGrid - the agGrid column uses it in its headerValueGetter, which already includes an isString check. Display is handled by our custom ColumnHeader component.

If there's no actual issue with using ReactNodes, why can't we keep the current types and avoid the breaking change? I know of a few cases where we use icons for header names.

@lbwexler
Copy link
Member Author

Ah, I think I understand this better. The problem is really just for ColumnGroup, where we don't have a displayName to fall back on if the user is supplying a react Node for the header name.

@@ -98,7 +98,7 @@ export interface ColumnSpec {
* User-facing text/element displayed in the Column header, or a function to produce the same.
* Defaulted from `displayName`.
*/
headerName?: ColumnHeaderNameFn | ReactNode;
headerName?: ColumnHeaderNameFn | string;
Copy link
Member

Choose a reason for hiding this comment

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

Let's undo this change, headerName can be ReactNode again

cmp/grid/columns/ColumnGroup.ts Show resolved Hide resolved
@lbwexler lbwexler merged commit d042c86 into develop Jun 14, 2023
@lbwexler lbwexler deleted the gridUpgrade branch June 14, 2023 14:34
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.

2 participants