## Description
Refactor TableWidget for Improved Organization, Context Management &
Rendering Efficiency
### Overview
This PR restructures the TableWidget to enhance code organization,
improve context management, and optimize rendering performance. Key
improvements include extracting reusable components, introducing a
shared TableContext, and simplifying table rendering logic.
### Key Changes
✅ Improved Table Header Organization & Context Management
✅ Refactored Table & Virtualization Logic
✅ Simplified Header Components
✅ Enhanced Empty Row Handling
✅ Reorganized Core Components(Static table, virtual table)
### Why These Changes?
• Improves maintainability and readability by reducing prop drilling and
redundant code.
• Enhances performance through better state management and rendering
optimizations.
• Provides a scalable structure for future improvements in the
TableWidget.
Fixes#39308
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags="@tag.Table, @tag.Sanity, @tag.Datasource"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/13761069297>
> Commit: 524a8464a65576c9da485f686e6598eba38358a5
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13761069297&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Sanity, @tag.Datasource`
> Spec:
> <hr>Mon, 10 Mar 2025 12:31:27 UTC
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary by CodeRabbit
- **New Features**
- Introduced new virtualized table components that enhance dynamic
scrolling and table interactions.
- Added a new table constant to ensure smoother scrolling behavior.
- Implemented a centralized table state provider to consolidate table
functionality.
- Added a new `BannerNActions` component for improved header action
management.
- Added a new `StaticTableBodyComponent` for rendering static table
bodies.
- **Refactor**
- Streamlined static table rendering along with header and cell
interactions.
- Simplified component interfaces by shifting from prop-based to
context-driven state management.
- Enhanced the `Actions` component to utilize context for state
management.
- Refactored the `Table` component to improve clarity and efficiency.
- **Tests**
- Expanded and improved test coverage to ensure robust rendering, error
handling, and performance.
- Introduced tests for new components such as `StaticTableBodyComponent`
and `BannerNActions`.
- Updated tests to reflect changes in context management and component
structure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->