Skip to content

chore: Refactoring multiple environments to use editorId instead of appId#29965

Merged
ankitakinger merged 6 commits intoreleasefrom
revert-29942-revert-29873-chore/refactor-multi-env
Jan 3, 2024
Merged

chore: Refactoring multiple environments to use editorId instead of appId#29965
ankitakinger merged 6 commits intoreleasefrom
revert-29942-revert-29873-chore/refactor-multi-env

Conversation

@ankitakinger
Copy link
Contributor

@ankitakinger ankitakinger commented Jan 1, 2024

Reverts #29942

Summary by CodeRabbit

  • Refactor

    • Streamlined the process for setting workspace and editor IDs across various components and actions.
    • Enhanced the route matching mechanism for improved navigation within the app.
  • Bug Fixes

    • Corrected typos and variable naming inconsistencies to ensure clarity and consistency in the codebase.
  • Style

    • Adjusted UI components for better accessibility, including the correct use of Aria attributes.
  • Chores

    • Removed unused imports and code to clean up the codebase and improve maintainability.
  • Documentation

    • Updated internal documentation to reflect changes in function signatures and payload structures.

…editorId instead of appId" (#29942)"

This reverts commit 73b3079.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 1, 2024

Walkthrough

Walkthrough

The codebase has undergone a significant refactoring that primarily involves the introduction of structured object parameters to replace individual or single parameters in function calls and action dispatches. This refactoring affects various actions, reducers, sagas, and components, aiming to streamline the handling of editorId and workspaceId. Route matching has been updated to use react-router over path-to-regexp, and there have been adjustments to state management and UI components to align with these backend changes.

Changes

File Path Change Summary
.../actions/applicationActions.ts,
.../actions/environmentAction.ts,
.../sagas/ApplicationSagas.tsx,
.../sagas/PageSagas.tsx,
.../pages/.../ImportApplicationModal.tsx,
.../pages/Editor/gitSync/.../GitSyncModalV1.tsx,
.../pages/Editor/gitSync/.../GitSyncModalV2.tsx,
.../pages/Editor/gitSync/.../ChooseGitProvider.tsx
Updated function signatures and dispatch calls to use structured object parameters with editorId and workspaceId.
.../components/SwitchEnvironment/index.tsx Enhanced Props interface, removed unused imports, refactored state management, and updated UI component attributes.
.../constants/routes/appRoutes.ts Replaced path-to-regexp with react-router's matchPath for improved route matching.
.../pages/Applications/CreateNewAppsOption.tsx Refactored dispatch call for fetchingEnvironmentConfigs to use an object with specific properties.
.../reducers/uiReducers/applicationsReducer.tsx Adjusted action payload handling to match the updated parameter structure.
.../components/BottomBar/index.tsx Incorporated state management via useSelector and useDispatch, and added handling for environment changes.
.../pages/Editor/gitSync/ReconnectDatasourceModal.tsx Modified logic for setting workspace IDs and managing modal state.
.../utils/storage.ts Added and modified functions to update environment details with revised parameters and logic.

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 with CodeRabbit Bot (@coderabbitai)

  • You can directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging @coderabbitai in a comment. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • You can tag @coderabbitai in a PR comment and ask questions about the PR and the codebase. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid.
    • @coderabbitai read the files in the src/scheduler package and generate README in the markdown format.

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.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@ankitakinger
Copy link
Contributor Author

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

@github-actions
Copy link

github-actions bot commented Jan 1, 2024

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/7377404964.
Workflow: Appsmith External Integration Test Workflow.
Tags: ``.

@github-actions
Copy link

github-actions bot commented Jan 1, 2024

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7377404964.
Commit: ``.
Cypress dashboard url: Click here!
It seems like there are some failures 😔. We are not able to recognize it, please check this manually here.

@ankitakinger
Copy link
Contributor Author

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

@github-actions
Copy link

github-actions bot commented Jan 2, 2024

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/7384298828.
Workflow: Appsmith External Integration Test Workflow.
Tags: ``.

@github-actions
Copy link

github-actions bot commented Jan 2, 2024

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7384298828.
Commit: ``.
Cypress dashboard url: Click here!
All cypress tests have passed 🎉🎉🎉

@ankitakinger
Copy link
Contributor Author

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

@github-actions
Copy link

github-actions bot commented Jan 3, 2024

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/7395243869.
Workflow: Appsmith External Integration Test Workflow.
Tags: ``.

@github-actions
Copy link

github-actions bot commented Jan 3, 2024

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7395243869.
Commit: ``.
Cypress dashboard url: Click here!
All cypress tests have passed 🎉🎉🎉

@ankitakinger ankitakinger changed the title Revert "fix: Revert "chore: Refactoring multiple environments to use editorId instead of appId"" chore: Refactoring multiple environments to use editorId instead of appId Jan 3, 2024
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Jan 3, 2024
@ankitakinger
Copy link
Contributor Author

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

@github-actions
Copy link

github-actions bot commented Jan 3, 2024

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/7396510873.
Workflow: Appsmith External Integration Test Workflow.
Tags: ``.

@github-actions
Copy link

github-actions bot commented Jan 3, 2024

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7396510873.
Commit: ``.
Cypress dashboard: Click here!
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_2_spec.js

To know the list of identified flaky tests - Refer here

@github-actions
Copy link

github-actions bot commented Jan 3, 2024

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7396510873.
Commit: ``.
Cypress dashboard url: Click here!
All cypress tests have passed 🎉🎉🎉

@ankitakinger ankitakinger merged commit 9bc4c97 into release Jan 3, 2024
@ankitakinger ankitakinger deleted the revert-29942-revert-29873-chore/refactor-multi-env branch January 3, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Adding this label to a PR prevents it from being listed in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants