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

feat: Action redesign: Updating Mongo plugin form config #35883

Merged
merged 5 commits into from
Aug 27, 2024

Conversation

ankitakinger
Copy link
Contributor

@ankitakinger ankitakinger commented Aug 26, 2024

Description

This PR updates the form config for Mongo plugin to accommodate new SECTION_V2, SINGLE_COLUMN_ZONE, and DOUBLE_COLUMN_ZONE.

Fixes #35495

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/10561281548
Commit: b9a3f0f
Cypress dashboard.
Tags: @tag.All
Spec:


Mon, 26 Aug 2024 15:08:27 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Enhanced styling for the dynamic input text control, allowing for improved appearance and responsiveness.
    • Introduced a more versatile layout for the MongoDB plugin editor, including new control types and expanded command selection options for database operations.
  • Bug Fixes

    • Adjusted CSS properties for flexible sizing of the dynamic input text control.
  • Documentation

    • Updated JSON configuration for the MongoDB plugin to reflect new features and control types for better user guidance.

Copy link
Contributor

coderabbitai bot commented Aug 26, 2024

Walkthrough

The recent changes encompass modifications to the styling of a dynamic input text control and significant enhancements to the MongoDB plugin's editor configuration. The input control's JSX structure was updated to include a new CSS class, while the CSS styles were adjusted for greater flexibility. The MongoDB plugin's JSON configuration underwent a major restructuring, introducing new control types, expanded command options, and dynamic visibility logic for enhanced user interaction.

Changes

File Path Change Summary
app/client/src/components/formControls/DynamicInputTextControl.tsx
app/client/src/pages/Editor/ActionForm/Zone/styles.module.css
Enhanced JSX structure by adding a CSS class to the InputText component; CSS styles updated to use unset !important for more flexible sizing of the input control.
app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json Restructured JSON configuration, updating controlType from SECTION to SECTION_V2, introducing new control types, expanding command options, and adding conditional logic for input visibility.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Editor
    participant MongoDBPlugin

    User->>Editor: Select command type
    Editor->>MongoDBPlugin: Fetch input options based on command
    MongoDBPlugin-->>Editor: Return relevant input fields
    Editor-->>User: Display dynamic input fields
    User->>Editor: Submit query
    Editor->>MongoDBPlugin: Execute query
Loading

🎉 In a world of code, where changes unfold,
A dynamic input, with style so bold.
MongoDB's magic, now clearer and bright,
New commands to query, a developer's delight!
With each little tweak, our tools come alive,
In the realm of tech, together we thrive! 🌟


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

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 IDE Navigation Issues/feature requests related to IDE navigation, and context switching IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Task A simple Todo labels Aug 26, 2024
@ankitakinger
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions github-actions bot added the Enhancement New feature or request label Aug 26, 2024
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10561252900.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 35883.
recreate: .

@ankitakinger ankitakinger added the ok-to-test Required label for CI label Aug 26, 2024
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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between eda63fe and b9a3f0f.

Files selected for processing (3)
  • app/client/src/components/formControls/DynamicInputTextControl.tsx (1 hunks)
  • app/client/src/pages/Editor/ActionForm/Zone/styles.module.css (1 hunks)
  • app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json (1 hunks)
Files skipped from review due to trivial changes (2)
  • app/client/src/components/formControls/DynamicInputTextControl.tsx
  • app/client/src/pages/Editor/ActionForm/Zone/styles.module.css
Additional comments not posted (19)
app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json (19)

4-4: Excellent! Updated control type to SECTION_V2

The change from SECTION to SECTION_V2 indicates an enhancement. Ensure that the new version is backward compatible.

Please verify if there are any dependencies or other configurations that need to be updated to support SECTION_V2.


8-8: Great! Introduced DOUBLE_COLUMN_ZONE

The introduction of DOUBLE_COLUMN_ZONE allows for a more flexible UI layout. This is a good improvement for user experience.

The code changes are approved.


12-50: Well done! Expanded command options

The expanded command options provide more functionality to the users. This is a significant enhancement.

The code changes are approved.


53-71: Nice! Dynamic collection fetching

The dynamic fetching of collection options based on conditions is a great addition. This improves the user experience by showing relevant options.

The code changes are approved.


76-93: Good! Added SINGLE_COLUMN_ZONE for AGGREGATE

The addition of SINGLE_COLUMN_ZONE for the AGGREGATE command with specific fields is well-structured.

The code changes are approved.


95-109: Nice! Added DOUBLE_COLUMN_ZONE for AGGREGATE

The addition of DOUBLE_COLUMN_ZONE for the AGGREGATE command with specific fields is well-structured.

The code changes are approved.


111-127: Good! Added SINGLE_COLUMN_ZONE for COUNT

The addition of SINGLE_COLUMN_ZONE for the COUNT command with specific fields is well-structured.

The code changes are approved.


130-147: Nice! Added SINGLE_COLUMN_ZONE for DELETE

The addition of SINGLE_COLUMN_ZONE for the DELETE command with specific fields is well-structured.

The code changes are approved.


149-175: Good! Added DOUBLE_COLUMN_ZONE for DELETE

The addition of DOUBLE_COLUMN_ZONE for the DELETE command with specific fields is well-structured.

The code changes are approved.


177-194: Nice! Added SINGLE_COLUMN_ZONE for DISTINCT

The addition of SINGLE_COLUMN_ZONE for the DISTINCT command with specific fields is well-structured.

The code changes are approved.


196-210: Good! Added DOUBLE_COLUMN_ZONE for DISTINCT

The addition of DOUBLE_COLUMN_ZONE for the DISTINCT command with specific fields is well-structured.

The code changes are approved.


212-228: Nice! Added SINGLE_COLUMN_ZONE for FIND

The addition of SINGLE_COLUMN_ZONE for the FIND command with specific fields is well-structured.

The code changes are approved.


230-253: Good! Added DOUBLE_COLUMN_ZONE for FIND

The addition of DOUBLE_COLUMN_ZONE for the FIND command with specific fields is well-structured.

The code changes are approved.


255-276: Nice! Added DOUBLE_COLUMN_ZONE for FIND

The addition of DOUBLE_COLUMN_ZONE for the FIND command with specific fields is well-structured.

The code changes are approved.


278-295: Good! Added SINGLE_COLUMN_ZONE for INSERT

The addition of SINGLE_COLUMN_ZONE for the INSERT command with specific fields is well-structured.

The code changes are approved.


297-314: Nice! Added SINGLE_COLUMN_ZONE for UPDATE

The addition of SINGLE_COLUMN_ZONE for the UPDATE command with specific fields is well-structured.

The code changes are approved.


316-331: Good! Added SINGLE_COLUMN_ZONE for UPDATE

The addition of SINGLE_COLUMN_ZONE for the UPDATE command with specific fields is well-structured.

The code changes are approved.


333-359: Nice! Added DOUBLE_COLUMN_ZONE for UPDATE

The addition of DOUBLE_COLUMN_ZONE for the UPDATE command with specific fields is well-structured.

The code changes are approved.


361-387: Good! Added SINGLE_COLUMN_ZONE for RAW

The addition of SINGLE_COLUMN_ZONE for the RAW command with specific fields is well-structured.

The code changes are approved.

Copy link

Deploy-Preview-URL: https://ce-35883.dp.appsmith.com

Copy link

Failed server tests

  • com.appsmith.server.git.ServerSchemaMigrationEnforcerTest#saveGitRepo_ImportAndThenExport_diffOccurs

@ankitakinger ankitakinger merged commit 0a3492f into release Aug 27, 2024
86 checks passed
@ankitakinger ankitakinger deleted the action-redesign/mongodb branch August 27, 2024 03:57
ankitakinger added a commit that referenced this pull request Aug 27, 2024
abhvsn pushed a commit that referenced this pull request Aug 27, 2024
…5903)

Reverts #35883

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced user-friendly configurations for various MongoDB
operations, including "AGGREGATE," "COUNT," "DELETE," "DISTINCT,"
"FIND," "INSERT," "RAW," and "UPDATE."
- Enhanced dynamic dropdowns for selecting collections and streamlined
input sections for constructing queries.

- **Bug Fixes**
- Simplified the structure of the input text controls for better
usability and responsiveness in UI design.

- **Refactor**
- Cleaned up unnecessary elements in the codebase to improve
maintainability and performance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request IDE Navigation Issues/feature requests related to IDE navigation, and context switching IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product ok-to-test Required label for CI Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Add Zone & Section to Mongo DB plugin form
4 participants