-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(generics): add a new performant resizable table #6751
Conversation
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.
❌ Changes requested. Reviewed everything up to 00647eb in 1 minute and 30 seconds
More details
- Looked at
235
lines of code in3
files - Skipped
1
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. frontend/src/components/PerformantColumnResizingTable/PerformantColumnResizingTable.tsx:27
- Draft comment:
Avoid usingany
incell.renderValue<any>()
. Consider using a more specific type for better type safety. - Reason this comment was not posted:
Confidence changes required:50%
The use ofany
incell.renderValue<any>()
can be avoided by using a more specific type. This will improve type safety and maintainability of the code.
2. frontend/src/components/PerformantColumnResizingTable/PerformantColumnResizingTable.tsx:81
- Draft comment:
Avoid using non-null assertions like!
inheaders[i]!
. Consider handling potential null or undefined values explicitly. - Reason this comment was not posted:
Confidence changes required:50%
The use of!
inheaders[i]!
indicates a non-null assertion. It's better to handle potential null or undefined values explicitly to avoid runtime errors.
3. frontend/src/components/PerformantColumnResizingTable/PerformantColumnResizingTable.tsx:68
- Draft comment:
EnsuredebugTable
,debugHeaders
, anddebugColumns
are disabled in production to avoid unnecessary console output. - Reason this comment was not posted:
Confidence changes required:50%
ThedebugTable
,debugHeaders
, anddebugColumns
options are set to true, which might be intended for development purposes. Ensure these are disabled in production to avoid unnecessary console output.
4. frontend/src/components/PerformantColumnResizingTable/PerformantColumnResizingTable.styles.scss:57
- Draft comment:
Consider adding a CSS transition foropacity
in the.resizer
class to enhance user experience during hover. - Reason this comment was not posted:
Confidence changes required:33%
Theopacity
transition for the.resizer
class could be smoother with a CSS transition, enhancing user experience during hover.
5. frontend/src/components/PerformantColumnResizingTable/PerformantColumnResizingTable.tsx:24
- Draft comment:
Avoid using inline styles. Consider using CSS classes or styled components instead. This applies to other inline styles in this file as well. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
This is a special case where inline styles are actually appropriate. The widths need to be dynamically calculated and set using CSS variables, which is a performance optimization explained in the code comments. Moving these to CSS classes wouldn't make sense since the values are computed at runtime. The component already uses CSS classes for static styling (see the imported .scss file and className usage).
Maybe there's a way to handle dynamic widths using CSS custom properties defined at a higher level? Could styled-components handle this use case more elegantly?
While there might be alternative approaches, the current implementation is a valid and performant solution. The inline styles are used appropriately for dynamic values, while static styles are properly maintained in an external stylesheet.
The comment should be deleted as it's suggesting a change that would not improve the code. The inline styles here are being used appropriately for dynamic values that can't be predetermined in a stylesheet.
Workflow ID: wflow_6zypLG6zT8UVX5NG
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
frontend/src/components/PerformantColumnResizingTable/PerformantColumnResizingTable.styles.scss
Outdated
Show resolved
Hide resolved
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.
❌ Changes requested. Incremental review on 42e0361 in 42 seconds
More details
- Looked at
124
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. frontend/src/components/TableV3/TableV3.tsx:55
- Draft comment:
SetdebugTable
,debugHeaders
, anddebugColumns
to false or remove them in production to avoid unnecessary console output. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
2. frontend/src/components/TableV3/TableV3.tsx:23
- Draft comment:
Avoid using inline styles. Consider using CSS classes or styled components instead. This applies to other inline styles in this file as well. - Reason this comment was not posted:
Comment was on unchanged code.
3. frontend/src/components/TableV3/TableV3.styles.scss:2
- Draft comment:
Use design tokens or predefined color constants instead of hardcoding color values like 'lightgray' and 'blue'. This applies to other color values in this file as well. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_jAz0e88UHUwjbEcy
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Summary
react-table
Related Issues / PR's
contributes to - #6132