-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement sticky columns in GenericTable #1023
Conversation
@@ -52,7 +57,6 @@ export const CASE_NOTE_COLUMNS = { | |||
NoteContentPreview: { | |||
key: 'content-preview', | |||
header: 'Note Content Preview', | |||
maxWidth: '450px', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed since this wasn't respected (maxWidth is not a valid property on ColumnDef and GenericTable doesn't do anything with it). There is a maxWidth applied to the Box below.
@@ -74,7 +74,7 @@ const BulkServicesTable: React.FC<Props> = ({ | |||
</NotCollectedText> | |||
); | |||
return [ | |||
CLIENT_COLUMNS.name, | |||
{ ...CLIENT_COLUMNS.name, sticky: 'left' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Known issue: Checkbox is not sticky. I think my current approach would need a bit more work to accomplish more than 1 sticky column per side. It's not ideal, but I am proposing to descope this and open another ticket, unless you see an easy way around it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok with me @martha. Not sure how much it would simplify things, but one option is to make the checkbox always be sticky. That seems reasonable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Gig, good point! With this suggestion it wasn't so bad, see 273b059
<Button onClick={primaryActionConfig.onClick} {...buttonProps}> | ||
{primaryActionConfig.title} | ||
</Button> | ||
))} | ||
{primaryAction} | ||
{!!secondaryActionConfigs && secondaryActionConfigs.length > 0 && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting that I think there was agreement around including the primary action config inside the secondary menu, so I'd say we can go ahead with that. Maybe it would be as simple as passing items={[primaryActionConfig , ...secondaryActionConfigs]}
below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after suggested Typescript fixes, to ensure continued type safety.
I also think we should include the row-hover-bg-color once we deploy this as well (for review) but I'm not seeing that change on the deploy branch- will that be a separate PR?
Yes, I wanted to keep that on a separate diff since we haven't reached consensus on that change yet, but I opened a draft PR here: #1025 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
Description
GH issue: https://github.com/open-path/Green-River/issues/6761
This PR is a follow-up from this comment thread in Slack. Summary of changes:
I should note that, while I've once-overed every individual table that's using this new pattern, I haven't tested this PR extremely thoroughly, since the ticket is over estimate. For efficiency, I'm proposing to do more thorough QA in the QA environment once this is merged to the deploy branch.
Type of change
Checklist before requesting review