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

chore: Split canvas widget reducers #39327

Merged
merged 3 commits into from
Feb 18, 2025
Merged

Conversation

ashit-rath
Copy link
Contributor

@ashit-rath ashit-rath commented Feb 18, 2025

Description

Split canvasWidgetsReducer and canvasWidgetsStructureReducer for UI modules

Fixes #39326

Automation

/ok-to-test tags="@tag.All"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13385385883
Commit: ec13bb0
Cypress dashboard.
Tags: @tag.All
Spec:


Tue, 18 Feb 2025 08:41:34 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Refactor
    • Streamlined internal dependency management and reorganized module paths for improved maintainability.
    • Updated import paths for CanvasWidgetsReduxState, FlattenedWidgetProps, and related types to reflect a new organizational structure.
    • These behind-the-scenes changes do not affect any user-visible functionality.

@ashit-rath ashit-rath requested a review from a team February 18, 2025 06:15
@ashit-rath ashit-rath requested a review from a team as a code owner February 18, 2025 06:15
@ashit-rath ashit-rath requested review from AnaghHegde and removed request for a team February 18, 2025 06:15
@ashit-rath ashit-rath self-assigned this Feb 18, 2025
Copy link
Contributor

coderabbitai bot commented Feb 18, 2025

Walkthrough

This pull request updates numerous import statements across the codebase to reflect a new module organization. In particular, types such as CanvasWidgetsReduxState, FlattenedWidgetProps, and UpdateWidgetsPayload are now imported from the ee/reducers/entityReducers/... path instead of their previous locations. There are also new re-export files for the canvas widgets reducers. No changes to functionality, control flow, or logic have been introduced.

Changes

File(s) Change Summary
app/client/src/.../BindDataButton.tsx, app/client/src/entities/DataTree/dataTreeWidget(.test).ts, app/client/src/widgets/BaseWidget.tsx Updated FlattenedWidgetProps import: from "reducers/entityReducers/canvasWidgetsReducer""ee/reducers/entityReducers/canvasWidgetsReducer"
app/client/src/.../WidgetProvider/**, app/client/src/actions/autoLayoutActions.ts, app/client/src/ce/sagas/JSActionSagas.ts, app/client/src/pages/Editor/FirstTimeUserOnboarding/Checklist.tsx, etc. Updated CanvasWidgetsReduxState import: from "reducers/entityReducers/canvasWidgetsReducer""ee/reducers/entityReducers/canvasWidgetsReducer"
app/client/src/reducers/entityReducers/metaWidgetsReducer.ts Updated UpdateWidgetsPayload import: from relative "./canvasWidgetsReducer" → absolute "ee/reducers/entityReducers/canvasWidgetsReducer"
app/client/src/ee/reducers/entityReducers/canvasWidgetsReducer.ts, .../canvasWidgetsStructureReducer.ts Introduced new re-export files that import from the ce/reducers/entityReducers directory and re-export as default entries
Multiple other files (e.g., in sagas, selectors, utils, modules, and tests) Uniformly updated import paths to reflect the new ee/reducers/... structure

Possibly related PRs

Suggested labels

Task, skip-changelog, ok-to-test

Suggested reviewers

  • hetunandu
  • alex-golovanov
  • ankitakinger

Poem

In the code’s vast maze of files,
A simple shift now neatly compiles,
Paths have changed, yet logic stays—
A reorganization in seamless arrays.
Cheers to clean imports and brighter days!

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added Frontend This label marks the issue or pull request to reference client code Packages & Git Pod All issues belonging to Packages and Git Packages Pod issues that belong to the packages pod Task A simple Todo labels Feb 18, 2025
@ashit-rath ashit-rath requested review from rahulbarwal, ankitakinger and jsartisan and removed request for ApekshaBhosale, a team and AnaghHegde February 18, 2025 06:15
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Feb 18, 2025
@ashit-rath ashit-rath added ok-to-test Required label for CI and removed skip-changelog Adding this label to a PR prevents it from being listed in the changelog labels Feb 18, 2025
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Feb 18, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
app/client/src/ce/reducers/index.tsx (1)

161-163: 🛠️ Refactor suggestion

Address TODOs and remove any types.

There are multiple TODOs with eslint-disable directives and any types that should be addressed:

  1. moduleInstanceEntities: any
  2. Form reducer's key type
  3. Tenant reducer's generic type

Consider creating proper type definitions for these cases to improve type safety. Would you like me to help define these types?

Also applies to: 176-178, 181-183

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 07187a7 and 181eb20.

📒 Files selected for processing (107)
  • app/client/src/PluginActionEditor/components/PluginActionResponse/components/BindDataButton.tsx (1 hunks)
  • app/client/src/WidgetProvider/factory/index.tsx (1 hunks)
  • app/client/src/actions/autoLayoutActions.ts (1 hunks)
  • app/client/src/actions/controlActions.tsx (1 hunks)
  • app/client/src/actions/pageActions.tsx (1 hunks)
  • app/client/src/ce/entities/DataTree/types.ts (1 hunks)
  • app/client/src/ce/reducers/entityReducers/canvasWidgetsReducer.test.ts (1 hunks)
  • app/client/src/ce/reducers/entityReducers/canvasWidgetsReducer.ts (1 hunks)
  • app/client/src/ce/reducers/entityReducers/index.ts (1 hunks)
  • app/client/src/ce/reducers/index.tsx (1 hunks)
  • app/client/src/ce/sagas/JSActionSagas.ts (1 hunks)
  • app/client/src/ce/sagas/PageSagas.tsx (1 hunks)
  • app/client/src/ce/selectors/entitiesSelector.ts (1 hunks)
  • app/client/src/ee/reducers/entityReducers/canvasWidgetsReducer.ts (1 hunks)
  • app/client/src/ee/reducers/entityReducers/canvasWidgetsStructureReducer.ts (1 hunks)
  • app/client/src/entities/AppTheming/utils.ts (1 hunks)
  • app/client/src/entities/DataTree/dataTreeFactory.ts (1 hunks)
  • app/client/src/entities/DataTree/dataTreeWidget.test.ts (1 hunks)
  • app/client/src/entities/DataTree/dataTreeWidget.ts (1 hunks)
  • app/client/src/entities/Replay/ReplayEntity/ReplayCanvas.ts (1 hunks)
  • app/client/src/entities/Widget/utils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/editor/canvasArenas/hooks/useAnvilDnDListenerStates.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/editor/canvasArenas/utils/utils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/integrations/sagas/anvilDraggingSagas/index.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/integrations/sagas/anvilSpaceDistributionSagas.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/integrations/sagas/anvilWidgetAdditionSagas/helpers.test.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/integrations/sagas/anvilWidgetAdditionSagas/helpers.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/integrations/sagas/anvilWidgetAdditionSagas/index.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/integrations/sagas/pasteSagas/index.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/integrations/sagas/sectionSagas.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/layoutComponents/components/zone/useZoneMinWidth.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/sectionSpaceDistributor/utils/spaceRedistributionSagaUtils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/anvilChecksUtils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/layouts/update/deletionUtils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/layouts/update/mainCanvasLayoutUtils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/layouts/update/moveUtils.test.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/layouts/update/moveUtils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/layouts/update/sectionUtils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/layouts/update/zoneUtils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/paste/destinationUtils/index.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/paste/mainCanvasPasteUtils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/paste/sectionPasteUtils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/paste/types.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/paste/utils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/paste/zonePasteUtils.ts (1 hunks)
  • app/client/src/layoutSystems/anvil/utils/sectionOperationUtils.ts (1 hunks)
  • app/client/src/layoutSystems/autolayout/utils/AutoLayoutUtils.ts (1 hunks)
  • app/client/src/layoutSystems/autolayout/utils/autoLayoutDraggingUtils.test.ts (1 hunks)
  • app/client/src/layoutSystems/autolayout/utils/autoLayoutDraggingUtils.ts (1 hunks)
  • app/client/src/layoutSystems/autolayout/utils/autoLayoutUtils.test.ts (1 hunks)
  • app/client/src/layoutSystems/autolayout/utils/heightUpdateUtils.ts (1 hunks)
  • app/client/src/layoutSystems/autolayout/utils/highlightUtils.ts (1 hunks)
  • app/client/src/layoutSystems/autolayout/utils/positionUtils.test.ts (1 hunks)
  • app/client/src/layoutSystems/autolayout/utils/positionUtils.ts (1 hunks)
  • app/client/src/layoutSystems/common/DSLConversions/autoToFixedLayout.ts (1 hunks)
  • app/client/src/layoutSystems/common/DSLConversions/tests/autoToFixedLayout.test.ts (1 hunks)
  • app/client/src/layoutSystems/common/utils/canvasDraggingUtils.ts (1 hunks)
  • app/client/src/modules/ui-builder/ui/wds/WDSCustomWidget/config/defaultsConfig.ts (1 hunks)
  • app/client/src/modules/ui-builder/ui/wds/WDSModalWidget/config/defaultsConfig.ts (1 hunks)
  • app/client/src/modules/ui-builder/ui/wds/WDSModalWidget/widget/index.tsx (1 hunks)
  • app/client/src/modules/ui-builder/ui/wds/WDSSectionWidget/config/defaultConfig.ts (1 hunks)
  • app/client/src/modules/ui-builder/ui/wds/WDSSectionWidget/widget/index.tsx (1 hunks)
  • app/client/src/modules/ui-builder/ui/wds/WDSTableWidget/widget/index.tsx (1 hunks)
  • app/client/src/modules/ui-builder/ui/wds/WDSZoneWidget/widget/config/defaultConfig.ts (1 hunks)
  • app/client/src/modules/ui-builder/ui/wds/WDSZoneWidget/widget/index.tsx (1 hunks)
  • app/client/src/pages/Editor/FirstTimeUserOnboarding/Checklist.tsx (1 hunks)
  • app/client/src/reducers/entityReducers/metaWidgetsReducer.ts (1 hunks)
  • app/client/src/sagas/AppThemingSaga.tsx (1 hunks)
  • app/client/src/sagas/AutoLayoutUpdateSagas.tsx (1 hunks)
  • app/client/src/sagas/BuildingBlockSagas/BuildingBlockAdditionSagas.ts (1 hunks)
  • app/client/src/sagas/BuildingBlockSagas/tests/fixtures.ts (1 hunks)
  • app/client/src/sagas/CanvasSagas/AutoLayoutDraggingSagas.ts (1 hunks)
  • app/client/src/sagas/CanvasSagas/DraggingCanvasSagas.ts (1 hunks)
  • app/client/src/sagas/CanvasSagas/SelectionCanvasSagas.ts (1 hunks)
  • app/client/src/sagas/ModalSagas.ts (1 hunks)
  • app/client/src/sagas/PartialImportExportSagas/PartialExportSagas.ts (1 hunks)
  • app/client/src/sagas/PasteWidgetUtils/index.ts (1 hunks)
  • app/client/src/sagas/SnipingModeSagas.ts (1 hunks)
  • app/client/src/sagas/WidgetAdditionSagas.ts (1 hunks)
  • app/client/src/sagas/WidgetBlueprintSagas.ts (1 hunks)
  • app/client/src/sagas/WidgetDeletionSagas.ts (1 hunks)
  • app/client/src/sagas/WidgetEnhancementHelpers.ts (1 hunks)
  • app/client/src/sagas/WidgetOperationSagas.tsx (1 hunks)
  • app/client/src/sagas/WidgetOperationUtils.test.ts (1 hunks)
  • app/client/src/sagas/WidgetOperationUtils.ts (1 hunks)
  • app/client/src/sagas/WidgetSelectUtils.test.ts (1 hunks)
  • app/client/src/sagas/WidgetSelectUtils.ts (1 hunks)
  • app/client/src/sagas/WidgetSelectionSagas.ts (1 hunks)
  • app/client/src/sagas/autoHeightSagas/batcher.ts (1 hunks)
  • app/client/src/sagas/autoHeightSagas/containers.ts (1 hunks)
  • app/client/src/sagas/autoHeightSagas/helpers.ts (1 hunks)
  • app/client/src/sagas/autoHeightSagas/widgets.ts (1 hunks)
  • app/client/src/sagas/selectors.tsx (1 hunks)
  • app/client/src/selectors/debuggerSelectors.test.ts (1 hunks)
  • app/client/src/selectors/debuggerSelectors.tsx (1 hunks)
  • app/client/src/selectors/editorSelectors.tsx (1 hunks)
  • app/client/src/selectors/flattenedChildCanvasSelector.ts (1 hunks)
  • app/client/src/selectors/propertyPaneSelectors.tsx (1 hunks)
  • app/client/src/selectors/widgetEnhancementSelectors.ts (1 hunks)
  • app/client/src/selectors/widgetSelectors.ts (1 hunks)
  • app/client/src/utils/WidgetPropsUtils.tsx (1 hunks)
  • app/client/src/utils/helpers.test.ts (1 hunks)
  • app/client/src/utils/helpers.tsx (1 hunks)
  • app/client/src/utils/reflowHookUtils.ts (1 hunks)
  • app/client/src/utils/widgetRenderUtils.test.ts (1 hunks)
  • app/client/src/utils/widgetRenderUtils.tsx (1 hunks)
  • app/client/src/widgets/BaseWidget.tsx (1 hunks)
⛔ Files not processed due to max files limit (12)
  • app/client/src/widgets/ContainerWidget/widget/index.tsx
  • app/client/src/widgets/FormWidget/widget/index.tsx
  • app/client/src/widgets/ListWidgetV2/widget/defaultProps.ts
  • app/client/src/widgets/ModalWidget/widget/index.tsx
  • app/client/src/widgets/StatboxWidget/widget/index.tsx
  • app/client/src/widgets/WidgetUtils.ts
  • app/client/src/workers/Evaluation/ReplayDSL.ts
  • app/client/src/workers/Evaluation/fns/resetWidget.ts
  • app/client/src/workers/Evaluation/handlers/evalTree.ts
  • app/client/src/workers/Evaluation/replayUtils.ts
  • app/client/src/workers/Evaluation/types.ts
  • app/client/test/testCommon.ts
✅ Files skipped from review due to trivial changes (97)
  • app/client/src/ce/entities/DataTree/types.ts
  • app/client/src/selectors/debuggerSelectors.tsx
  • app/client/src/layoutSystems/anvil/integrations/sagas/anvilWidgetAdditionSagas/helpers.test.ts
  • app/client/src/WidgetProvider/factory/index.tsx
  • app/client/src/layoutSystems/anvil/editor/canvasArenas/hooks/useAnvilDnDListenerStates.ts
  • app/client/src/layoutSystems/anvil/utils/paste/zonePasteUtils.ts
  • app/client/src/sagas/BuildingBlockSagas/tests/fixtures.ts
  • app/client/src/ce/reducers/entityReducers/canvasWidgetsReducer.ts
  • app/client/src/layoutSystems/anvil/utils/paste/sectionPasteUtils.ts
  • app/client/src/layoutSystems/anvil/layoutComponents/components/zone/useZoneMinWidth.ts
  • app/client/src/sagas/CanvasSagas/SelectionCanvasSagas.ts
  • app/client/src/ee/reducers/entityReducers/canvasWidgetsStructureReducer.ts
  • app/client/src/sagas/CanvasSagas/DraggingCanvasSagas.ts
  • app/client/src/sagas/AppThemingSaga.tsx
  • app/client/src/layoutSystems/anvil/utils/sectionOperationUtils.ts
  • app/client/src/sagas/PasteWidgetUtils/index.ts
  • app/client/src/sagas/autoHeightSagas/batcher.ts
  • app/client/src/utils/helpers.tsx
  • app/client/src/layoutSystems/anvil/utils/anvilChecksUtils.ts
  • app/client/src/sagas/WidgetDeletionSagas.ts
  • app/client/src/layoutSystems/anvil/utils/paste/mainCanvasPasteUtils.ts
  • app/client/src/ce/reducers/entityReducers/canvasWidgetsReducer.test.ts
  • app/client/src/layoutSystems/autolayout/utils/positionUtils.ts
  • app/client/src/sagas/autoHeightSagas/containers.ts
  • app/client/src/sagas/WidgetEnhancementHelpers.ts
  • app/client/src/entities/Replay/ReplayEntity/ReplayCanvas.ts
  • app/client/src/widgets/BaseWidget.tsx
  • app/client/src/layoutSystems/anvil/utils/layouts/update/deletionUtils.ts
  • app/client/src/ee/reducers/entityReducers/canvasWidgetsReducer.ts
  • app/client/src/entities/AppTheming/utils.ts
  • app/client/src/layoutSystems/anvil/integrations/sagas/pasteSagas/index.ts
  • app/client/src/sagas/SnipingModeSagas.ts
  • app/client/src/modules/ui-builder/ui/wds/WDSZoneWidget/widget/config/defaultConfig.ts
  • app/client/src/utils/widgetRenderUtils.tsx
  • app/client/src/layoutSystems/autolayout/utils/autoLayoutUtils.test.ts
  • app/client/src/entities/DataTree/dataTreeWidget.test.ts
  • app/client/src/utils/WidgetPropsUtils.tsx
  • app/client/src/sagas/WidgetSelectUtils.ts
  • app/client/src/layoutSystems/anvil/integrations/sagas/anvilSpaceDistributionSagas.ts
  • app/client/src/layoutSystems/autolayout/utils/autoLayoutDraggingUtils.test.ts
  • app/client/src/sagas/PartialImportExportSagas/PartialExportSagas.ts
  • app/client/src/actions/pageActions.tsx
  • app/client/src/modules/ui-builder/ui/wds/WDSSectionWidget/widget/index.tsx
  • app/client/src/utils/reflowHookUtils.ts
  • app/client/src/layoutSystems/anvil/editor/canvasArenas/utils/utils.ts
  • app/client/src/layoutSystems/anvil/sectionSpaceDistributor/utils/spaceRedistributionSagaUtils.ts
  • app/client/src/actions/autoLayoutActions.ts
  • app/client/src/layoutSystems/autolayout/utils/highlightUtils.ts
  • app/client/src/sagas/autoHeightSagas/widgets.ts
  • app/client/src/sagas/selectors.tsx
  • app/client/src/utils/helpers.test.ts
  • app/client/src/layoutSystems/anvil/utils/layouts/update/moveUtils.test.ts
  • app/client/src/selectors/widgetSelectors.ts
  • app/client/src/layoutSystems/anvil/integrations/sagas/anvilWidgetAdditionSagas/helpers.ts
  • app/client/src/pages/Editor/FirstTimeUserOnboarding/Checklist.tsx
  • app/client/src/actions/controlActions.tsx
  • app/client/src/selectors/propertyPaneSelectors.tsx
  • app/client/src/sagas/WidgetSelectionSagas.ts
  • app/client/src/sagas/autoHeightSagas/helpers.ts
  • app/client/src/ce/sagas/PageSagas.tsx
  • app/client/src/sagas/WidgetOperationSagas.tsx
  • app/client/src/PluginActionEditor/components/PluginActionResponse/components/BindDataButton.tsx
  • app/client/src/layoutSystems/autolayout/utils/heightUpdateUtils.ts
  • app/client/src/layoutSystems/anvil/integrations/sagas/anvilWidgetAdditionSagas/index.ts
  • app/client/src/layoutSystems/common/DSLConversions/tests/autoToFixedLayout.test.ts
  • app/client/src/layoutSystems/common/DSLConversions/autoToFixedLayout.ts
  • app/client/src/ce/sagas/JSActionSagas.ts
  • app/client/src/utils/widgetRenderUtils.test.ts
  • app/client/src/sagas/WidgetBlueprintSagas.ts
  • app/client/src/layoutSystems/autolayout/utils/AutoLayoutUtils.ts
  • app/client/src/layoutSystems/anvil/utils/layouts/update/moveUtils.ts
  • app/client/src/layoutSystems/anvil/utils/paste/types.ts
  • app/client/src/layoutSystems/anvil/utils/paste/utils.ts
  • app/client/src/sagas/AutoLayoutUpdateSagas.tsx
  • app/client/src/selectors/widgetEnhancementSelectors.ts
  • app/client/src/sagas/BuildingBlockSagas/BuildingBlockAdditionSagas.ts
  • app/client/src/layoutSystems/autolayout/utils/positionUtils.test.ts
  • app/client/src/sagas/ModalSagas.ts
  • app/client/src/entities/Widget/utils.ts
  • app/client/src/modules/ui-builder/ui/wds/WDSTableWidget/widget/index.tsx
  • app/client/src/selectors/debuggerSelectors.test.ts
  • app/client/src/layoutSystems/anvil/utils/layouts/update/mainCanvasLayoutUtils.ts
  • app/client/src/layoutSystems/anvil/utils/paste/destinationUtils/index.ts
  • app/client/src/layoutSystems/common/utils/canvasDraggingUtils.ts
  • app/client/src/layoutSystems/anvil/utils/layouts/update/zoneUtils.ts
  • app/client/src/layoutSystems/anvil/integrations/sagas/sectionSagas.ts
  • app/client/src/layoutSystems/anvil/integrations/sagas/anvilDraggingSagas/index.ts
  • app/client/src/layoutSystems/autolayout/utils/autoLayoutDraggingUtils.ts
  • app/client/src/sagas/WidgetSelectUtils.test.ts
  • app/client/src/layoutSystems/anvil/utils/layouts/update/sectionUtils.ts
  • app/client/src/sagas/CanvasSagas/AutoLayoutDraggingSagas.ts
  • app/client/src/entities/DataTree/dataTreeWidget.ts
  • app/client/src/sagas/WidgetOperationUtils.test.ts
  • app/client/src/selectors/editorSelectors.tsx
  • app/client/src/sagas/WidgetOperationUtils.ts
  • app/client/src/ce/selectors/entitiesSelector.ts
  • app/client/src/sagas/WidgetAdditionSagas.ts
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
🔇 Additional comments (9)
app/client/src/modules/ui-builder/ui/wds/WDSSectionWidget/config/defaultConfig.ts (1)

9-9:

❓ Verification inconclusive

LGTM! Import path updated correctly.

The import path change aligns with the PR objective of restructuring the canvas widget reducers.

Let's verify that the module exists in the new location:


🏁 Script executed:

#!/bin/bash
# Verify the existence of the canvasWidgetsReducer in the ee directory
fd -t f "canvasWidgetsReducer.ts" -p "ee/reducers/entityReducers"

Length of output: 177


LGTM! The updated import path aligns with the PR objective of restructuring the canvas widget reducers.
However, our automated check using the provided shell script didn’t locate the file under "ee/reducers/entityReducers". Please verify manually that the canvasWidgetsReducer module exists in its new expected location.

app/client/src/modules/ui-builder/ui/wds/WDSModalWidget/config/defaultsConfig.ts (1)

9-9: LGTM! Import path updated correctly.

The import path change is consistent with the codebase restructuring.

app/client/src/ce/reducers/entityReducers/index.ts (1)

3-4: LGTM! Import paths updated correctly.

Both canvas widget reducers have been moved to the enterprise edition namespace, maintaining consistency with the PR objective.

app/client/src/selectors/flattenedChildCanvasSelector.ts (1)

7-7: LGTM! Import path updated correctly.

The import path change is consistent with other files in the PR.

app/client/src/modules/ui-builder/ui/wds/WDSCustomWidget/config/defaultsConfig.ts (1)

9-9:

❓ Verification inconclusive

Verify the import path change impact.

The import path has been updated to use the enterprise edition (ee) path. Please ensure all consumers of this module have been updated accordingly.


🏁 Script executed:

#!/bin/bash
# Search for any remaining old import paths
rg "from ['\"]reducers/entityReducers/canvasWidgetsReducer['\"]"

Length of output: 70


Action Required: Double-check Consumers of the Updated Import Path

The change to use the enterprise import "ee/reducers/entityReducers/canvasWidgetsReducer" in app/client/src/modules/ui-builder/ui/wds/WDSCustomWidget/config/defaultsConfig.ts appears consistent. A grep for the old import path ("reducers/entityReducers/canvasWidgetsReducer") returned no instances. However, please manually verify that every consumer—whether in tests or in runtime usage—has been updated to use the enterprise edition path.

  • File: app/client/src/modules/ui-builder/ui/wds/WDSCustomWidget/config/defaultsConfig.ts (line 9)
  • Action: Confirm that no part of the codebase is still referencing the old import path.
app/client/src/modules/ui-builder/ui/wds/WDSZoneWidget/widget/index.tsx (1)

28-28: LGTM! Import path updated correctly.

The import path change aligns with the codebase restructuring.

app/client/src/entities/DataTree/dataTreeFactory.ts (1)

12-12: LGTM! Import path updated correctly.

The import path change is consistent with other enterprise edition imports in this file.

app/client/src/modules/ui-builder/ui/wds/WDSModalWidget/widget/index.tsx (1)

12-12: LGTM! Import path updated correctly.

The import path change aligns with the enterprise edition structure.

app/client/src/reducers/entityReducers/metaWidgetsReducer.ts (1)

9-9:

✅ Verification successful

LGTM! Import path update aligns with reducer split.

The change from relative to absolute import path is consistent with the PR's objective to split canvas widget reducers.

Let's verify that the new import path exists and is correctly structured:


🏁 Script executed:

#!/bin/bash
# Verify the new import path exists
fd -t f "canvasWidgetsReducer.ts" "ee/reducers/entityReducers"

# Verify the type is exported from the new location
ast-grep --pattern 'export type UpdateWidgetsPayload = $_'

Length of output: 843


LGTM! The updated absolute import path is correctly aligned with the reducer refactor.

We verified that the UpdateWidgetsPayload type is exported from the file (located at app/client/src/ce/reducers/entityReducers/canvasWidgetsReducer.ts), which indicates that the ee alias (as configured in your TypeScript paths) correctly maps to the intended file. Note that the fd error is expected since path aliases aren’t resolved through direct filesystem lookup.

jsartisan
jsartisan previously approved these changes Feb 18, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
app/client/src/ce/reducers/entityReducers/canvasWidgetsStructureReducer.ts (1)

34-50: Consider enhancing type safety for handlers.

While the extraction of handlers is good for maintainability, we can improve type safety.

Consider this type-safe approach:

-export const handlers = {
+type Handlers = {
+  [K in ReduxActionTypes]?: (
+    state: CanvasWidgetsStructureReduxState,
+    action: ReduxAction<UpdateCanvasPayload>
+  ) => CanvasWidgetsStructureReduxState;
+};
+
+export const handlers: Handlers = {
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 181eb20 and ec13bb0.

📒 Files selected for processing (2)
  • app/client/src/ce/reducers/entityReducers/canvasWidgetsReducer.ts (3 hunks)
  • app/client/src/ce/reducers/entityReducers/canvasWidgetsStructureReducer.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/client/src/ce/reducers/entityReducers/canvasWidgetsReducer.ts
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-build / client-build
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (2)
app/client/src/ce/reducers/entityReducers/canvasWidgetsStructureReducer.ts (2)

27-32: LGTM! Good practice to export the initial state.

Exporting the initial state enhances testability and reusability.


52-55: LGTM! Clean reducer implementation.

The reducer creation is clean and properly utilizes the extracted handlers.

@ashit-rath ashit-rath requested a review from jsartisan February 18, 2025 09:06
@ashit-rath ashit-rath merged commit 88d3599 into release Feb 18, 2025
85 checks passed
@ashit-rath ashit-rath deleted the chore/split-canvas-reducer branch February 18, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend This label marks the issue or pull request to reference client code ok-to-test Required label for CI Packages & Git Pod All issues belonging to Packages and Git Packages Pod issues that belong to the packages pod skip-changelog Adding this label to a PR prevents it from being listed in the changelog Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] Split widget reducers
2 participants