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 the config for MongoDB plugin to use sections and zones format #35922

Closed
wants to merge 9 commits into from

Conversation

ankitakinger
Copy link
Contributor

@ankitakinger ankitakinger commented Aug 28, 2024

Description

Action redesign: Updating the config for MongoDB plugin to use sections and zones format

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/10659602683
Commit: 23f2285
Cypress dashboard.
Tags: @tag.All
Spec:


Mon, 02 Sep 2024 04:52:56 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Enhanced styling capabilities for dynamic input text controls with a new CSS class.
    • Improved responsiveness of UI elements by removing fixed dimensions for dynamic input text controls.
    • Revamped MongoDB plugin editor with a more versatile layout and expanded command options, including enhanced commands for querying and additional input fields for better interactivity.
  • Bug Fixes

    • Adjusted visibility conditions for input fields based on selected commands to improve user experience.

Copy link
Contributor

coderabbitai bot commented Aug 28, 2024

Walkthrough

The recent updates involve modifications to the DynamicInputTextControl.tsx component, enhancing its styling capabilities, and adjustments to the CSS for improved responsiveness. Additionally, significant changes were made to the MongoDB plugin's editor configuration, transitioning to a more complex control type and expanding command options for database interactions, thereby facilitating a more dynamic user interface.

Changes

Files Change Summary
app/client/src/components/formControls/DynamicInputTextControl.tsx
app/client/src/pages/Editor/ActionForm/Zone/styles.module.css
The DynamicInputTextControl.tsx now includes a new CSS class for enhanced styling. The associated CSS class .uqi-dynamic-input-text had its minimum height and width constraints removed for better responsiveness.
app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json The MongoDB plugin's editor configuration was updated to use SECTION_V2 control type, with a new identifier "SECTION-ONE." New zones were added for better organization, and commands for database operations were expanded. Input fields are now dynamically displayed based on the selected command, enhancing interactivity and user experience.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Editor
    participant Database

    User->>Editor: Select Command
    Editor->>Editor: Display Relevant Fields
    User->>Editor: Input Data
    Editor->>Database: Execute Command
    Database-->>Editor: Return Results
    Editor-->>User: Show Results
Loading

🎉 In the code so bright,
New classes take their flight.
Mongo commands now expand,
A dynamic, user-friendly hand.
With styles that flex and flow,
Responsive design steals the show! 🌟


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 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 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.
Early access features: disabled

We are currently testing the following features in early access:

  • Anthropic claude-3-5-sonnet for code reviews: Anthropic claims that the new Claude model has stronger code understanding and code generation capabilities than their previous models. Note: Our default code review model was also updated late last week. Please compare the quality of the reviews between the two models by toggling the early access feature.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues on the discussion post.

@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 Enhancement New feature or request labels Aug 28, 2024
@ankitakinger ankitakinger added the ok-to-test Required label for CI label Aug 28, 2024
@ankitakinger
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c567b13 and 4134c5a.

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 (1)
  • app/client/src/components/formControls/DynamicInputTextControl.tsx
Additional comments not posted (1)
app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json (1)

4-377: Great improvements in organization and usability, but consider enhancing user guidance.

The restructuring of the MongoDB plugin's configuration into sections and zones with conditional visibility is a significant improvement. It makes the interface cleaner and more user-friendly. However, the added complexity might confuse new or less technical users. Consider adding detailed tooltips, documentation links, or inline help within the UI to assist users in understanding the new configurations and options.

Additionally, ensure that the conditional visibility logic is thoroughly tested to prevent any UI issues or bugs that might arise from complex conditional statements.

To ensure the UI behaves as expected, consider adding or enhancing Cypress tests that specifically cover the new conditional logic and the dynamic behavior of the configuration interface.

Copy link

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

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 c567b13 and 4134c5a.

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 (1)
  • app/client/src/components/formControls/DynamicInputTextControl.tsx
Additional comments not posted (4)
app/client/src/pages/Editor/ActionForm/Zone/styles.module.css (1)

51-54: CSS Changes Reviewed: Dynamic Input Text Control

The changes to the .uqi-dynamic-input-text class, setting width and min-height to unset with !important, are appropriate for enhancing UI flexibility. This allows the element to adapt its size based on its content, which is beneficial in responsive design contexts.

However, using !important can lead to maintenance challenges, especially if styles need to be overridden in the future. Consider if there's a way to achieve the desired styling without resorting to !important, perhaps by ensuring this class has higher specificity or by reevaluating the need for conflicting styles elsewhere.

The changes are approved, but with a caution regarding the use of !important.

app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json (3)

4-5: Updated Section and Identifier

The transition from controlType: "SECTION" to controlType: "SECTION_V2" and from identifier: "SELECTOR" to identifier: "SECTION-ONE" is a significant structural change. This aligns with the PR's objective to enhance the configuration's organization by using sections and zones.

Ensure that this change is reflected across all relevant parts of the application to maintain consistency and avoid integration issues.

The changes are approved, but ensure consistency across the application.


8-87: Introduction of Zones and Dynamic Controls

The addition of DOUBLE_COLUMN_ZONE and SINGLE_COLUMN_ZONE along with dynamic controls for different MongoDB commands (Find, Insert, Update, Delete, etc.) significantly enhances the editor's usability. The use of DROP_DOWN controls with conditionals to display relevant fields based on the selected command is a smart design choice.

Ensure that these new controls are tested thoroughly to verify that they only display appropriate options and that the dynamic content loads correctly based on user interactions.

The structural changes and dynamic behavior enhancements are approved. Recommend thorough testing to ensure functionality.


88-387: Dynamic Text and Input Controls Across Commands

The detailed setup for commands like AGGREGATE, COUNT, DELETE, DISTINCT, and FIND with specific conditionals and placeholders provides a tailored user experience. The use of QUERY_DYNAMIC_TEXT and QUERY_DYNAMIC_INPUT_TEXT controls allows for complex queries to be inputted directly by the user, enhancing the plugin's flexibility.

It's crucial to ensure that these inputs are sanitized and validated to prevent injection attacks or other security issues, given the direct user input capability.

The implementation of dynamic text and input controls is approved, with a recommendation to ensure input validation and sanitation.

Copy link

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

@ankitakinger
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

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

Copy link

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

@ankitakinger ankitakinger changed the title feat: Action redesign: Updating the config for Mongo plugin to use sections and zones format feat: Action redesign: Updating the config for MongoDB plugin to use sections and zones format Aug 30, 2024
@hetunandu hetunandu requested review from AmanAgarwal041 and removed request for hetunandu August 30, 2024 09:29
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 4134c5a and 80e4f91.

Files selected for processing (1)
  • app/client/src/pages/Editor/ActionForm/Zone/styles.module.css (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/client/src/pages/Editor/ActionForm/Zone/styles.module.css

@albinAppsmith
Copy link
Collaborator

/build-deploy-preview skip-tests=true

Copy link

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

Copy link

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

@albinAppsmith
Copy link
Collaborator

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Sep 2, 2024

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

Copy link

github-actions bot commented Sep 2, 2024

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

@ankitakinger ankitakinger deleted the action-redesign/mongodb branch September 11, 2024 07:20
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
2 participants