-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix: Reverting the previous fix for table scrollbar and hiding vertical scrollbar when needed #33806
Conversation
WalkthroughThe changes primarily focus on improving the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9270350713. |
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (7)
app/client/src/widgets/TableWidgetV2/component/Table.tsx (5)
Line range hint
62-62
: Consider replacing the template literal with a regular string since no interpolation is used.- border-radius: ${({ borderRadius }) => - borderRadius >= `1.5rem` ? `0.375rem` : borderRadius} !important; + border-radius: ${({ borderRadius }) => + borderRadius >= '1.5rem' ? '0.375rem' : borderRadius} !important;
Line range hint
104-104
: Specify explicit types instead of usingany
.Using
any
type defeats the purpose of TypeScript's static typing. It's better to specify explicit types for better type checking and to avoid potential runtime errors.Also applies to: 152-152, 162-162, 168-168
Line range hint
246-249
: Convert this function expression to an arrow function for consistency and better handling ofthis
context.- setTimeout(function () { + setTimeout(() => {
Line range hint
285-285
: Remove redundantBoolean
conversion.- toggleAllRowSelect(!Boolean(rowSelectionState), page); + toggleAllRowSelect(!rowSelectionState, page);
Line range hint
321-321
: Use optional chaining to safely access nested properties.- if (scrollBarRef && scrollBarRef?.current) { + if (scrollBarRef?.current) {app/client/src/widgets/TableWidgetV2/widget/derived.js (2)
Line range hint
56-58
: Consider usingfor...of
instead offorEach
for better performance and readability.Using
for...of
allows for easier control flow management (likebreak
orcontinue
) and can be more performant in some cases.Also applies to: 105-107, 229-241, 249-257, 268-272, 283-313, 690-709
Line range hint
246-246
: Use optional chaining to simplify property access and prevent runtime errors.- if (column && column.displayText) { + if (column?.displayText) {Also applies to: 269-269, 286-286, 328-328, 618-618
Deploy-Preview-URL: https://ce-33806.dp.appsmith.com |
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.
Actionable comments posted: 2
Outside diff range and nitpick comments (2)
app/client/src/widgets/TableWidgetV2/component/TableBody/index.tsx (2)
Line range hint
113-113
: Avoid using the index as a key in React lists. Use a unique identifier from the row data if available.- key={index} + key={row.id} // Assuming 'id' is a unique identifier in the row data
Line range hint
67-69
: The else clause here is redundant since the previous branches break early. Consider simplifying the logic.- } else { - return <EmptyRow style={style} />; - } + return <EmptyRow style={style} />;
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (2)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/scrollbar_spec.ts (1)
Line range hint
19-30
: Convert the function expression to an arrow function for consistency with modern JavaScript practices.- before(() => { + before(() => {app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Pagesize_spec.ts (1)
Line range hint
9-46
: Convert the function expression to an arrow function to align with modern JavaScript practices.- it("1. should test that pageSize is computed properly for all the row sizes", function () { + it("1. should test that pageSize is computed properly for all the row sizes", () => {
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Pagesize_spec.ts (1)
Line range hint
9-46
: Consider refactoring this function expression into an arrow function for consistency and improved readability.- function () { + () => {
/build-deploy-preview recreate=true skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9282022129. |
Deploy-Preview-URL: https://ce-33806.dp.appsmith.com |
/build-deploy-preview recreate=true skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9283849994. |
Deploy-Preview-URL: https://ce-33806.dp.appsmith.com |
/build-deploy-preview recreate=true skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9285735821. |
Deploy-Preview-URL: https://ce-33806.dp.appsmith.com |
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Pagesize_spec.ts (1)
Line range hint
9-46
: Refactor to use arrow functions for consistency and improved readability.- function () { + () => {Apply this change throughout the test suite where traditional function expressions are used.
Also applies to: 8-47
…o fix/table-scrollbar-visibility
/build-deploy-preview recreate=true skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9286802499. |
Deploy-Preview-URL: https://ce-33806.dp.appsmith.com |
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9287305930. |
Deploy-Preview-URL: https://ce-33806.dp.appsmith.com |
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9288088611. |
Deploy-Preview-URL: https://ce-33806.dp.appsmith.com |
Looks good, |
Description
Reverting the previous fix for table scrollbar and hiding vertical scrollbar when needed, with a new fix.
Fixes #33774 #33557 #17857
Automation
/ok-to-test tags="@tag.Table"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9287519606
Commit: f4d3b4e
Cypress dashboard url: Click here!
Communication
Should the DevRel and Marketing teams inform users about this change?