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 Firestore plugin to use sections and zones format #36097

Merged
merged 5 commits into from
Sep 11, 2024

Conversation

ankitakinger
Copy link
Contributor

@ankitakinger ankitakinger commented Sep 3, 2024

Description

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

Fixes #35492

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/10791259844
Commit: 97a6327
Cypress dashboard.
Tags: @tag.All
Spec:


Tue, 10 Sep 2024 14:02:06 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Enhanced layout capabilities for various controls in the Firestore plugin, improving organization and user experience.
    • Introduction of new zone structures (DOUBLE_COLUMN_ZONE, SINGLE_COLUMN_ZONE) for better visual arrangement of input fields.
  • Bug Fixes

    • Adjusted CSS styles for the DynamicInputTextControl component to enhance flexibility and responsiveness.
  • Documentation

    • Updated JSON configurations for controls to reflect new structural changes and improved organization.

Copy link
Contributor

coderabbitai bot commented Sep 3, 2024

Walkthrough

The changes involve a significant restructuring of the Firestore plugin's JSON configuration, transitioning from a single "SECTION" control type to a more advanced "SECTION_V2" type. This update enhances the layout capabilities by introducing nested zones, such as "DOUBLE_COLUMN_ZONE" and "SINGLE_COLUMN_ZONE," which better organize the input fields across various functionalities, including document creation, retrieval, and updates.

Changes

Files Change Summary
app/client/src/components/formControls/DynamicInputTextControl.tsx Added a new CSS class uqi-dynamic-input-text to the InputText component.
app/client/src/pages/Editor/ActionForm/Zone/styles.module.css Removed min-height and width properties from .uqi-dynamic-input-text, enhancing layout flexibility.
app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/*.json Transitioned from "SECTION" to "SECTION_V2" and restructured child elements into zones for better organization.

Assessment against linked issues

Objective Addressed Explanation
Add Zone & Section to Firestore plugin form (#35492)

In the code's dance, a new form takes flight,
With zones and sections, it shines so bright.
Input fields nestled, in columns they play,
A structured embrace, guiding the way.
Firestore's charm, now clearer to see,
A joyful update, for you and for me!
🌟


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.

@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 Sep 3, 2024
@github-actions github-actions bot added the Enhancement New feature or request label Sep 3, 2024
@ankitakinger ankitakinger added ok-to-test Required label for CI and removed Enhancement New feature or request labels Sep 3, 2024
@github-actions github-actions bot added the Enhancement New feature or request label Sep 3, 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

Outside diff range, codebase verification and nitpick comments (4)
app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/deleteDocument.json (1)

9-21: Excellent restructuring of the children to include a "DOUBLE_COLUMN_ZONE" parent control! 🌟

The introduction of the "DOUBLE_COLUMN_ZONE" control type is a fantastic way to enhance the layout capabilities and organize the input fields more effectively. By encapsulating the child element within this new parent control, you've laid the groundwork for a cleaner and more intuitive user interface.

It's great to see that the child element retains its essential properties, such as label, configProperty, controlType, and others. This ensures that the core functionality remains unaffected while the overall structure is improved.

One minor suggestion for consistency and readability:

Consider updating the identifier of the "DOUBLE_COLUMN_ZONE" control to follow a more descriptive naming convention. For example, instead of "DELETE-DOCUMENT-Z1", you could use "DELETE_DOCUMENT_ZONE" or "DELETE_DOCUMENT_DOUBLE_COLUMN". This makes the identifier more self-explanatory and easier to understand at a glance.

-      "identifier": "DELETE-DOCUMENT-Z1",
+      "identifier": "DELETE_DOCUMENT_DOUBLE_COLUMN",
app/client/src/pages/Editor/ActionForm/Zone/styles.module.css (1)

50-54: Ensure consistent layout after removing fixed dimensions.

The removal of the width and min-height properties for the .uqi-dynamic-input-text class allows for more flexible sizing of the input text control. This change aims to address layout issues and potentially improves responsiveness.

To ensure a consistent user experience, please verify the layout of the DynamicInputTextControl across different scenarios, such as:

  • Various input lengths
  • Different screen sizes
  • Interaction with surrounding elements

Make sure that the removal of these properties doesn't introduce any unintended layout issues or inconsistencies.

app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getCollection.json (2)

92-114: Great work introducing the GET-COLLECTION-Z4 zone! 🌟

Nesting the Start After and End Before fields within this DOUBLE_COLUMN_ZONE helps in better organizing the configuration layout. The properties of these fields are mostly preserved correctly.

Just a small nitpick:

  • There seems to be a typo in the placeholderText property of the Start After field. It should be placeholderText instead of palceholderText.
-          "palceholderText": ""
+          "placeholderText": ""

116-128: Excellent work introducing the GET-COLLECTION-Z5 zone! 👏

Nesting the Limit field within this DOUBLE_COLUMN_ZONE helps in better organizing the configuration layout. The properties of the Limit field are mostly preserved correctly.

Just a small nitpick:

  • There seems to be a typo in the placeholderText property of the Limit field. It should be placeholderText instead of palceholderText.
-          "palceholderText": "{{Table1.pageSize}}",
+          "placeholderText": "{{Table1.pageSize}}",
Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6ad6a11 and 16e84cc.

Files selected for processing (10)
  • 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/firestorePlugin/src/main/resources/editor/addToCollection.json (1 hunks)
  • app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/createDocument.json (1 hunks)
  • app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/deleteDocument.json (1 hunks)
  • app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getCollection.json (1 hunks)
  • app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getDocument.json (1 hunks)
  • app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/root.json (1 hunks)
  • app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/setDocument.json (1 hunks)
  • app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/updateDocument.json (1 hunks)
Files skipped from review due to trivial changes (1)
  • app/client/src/components/formControls/DynamicInputTextControl.tsx
Additional comments not posted (25)
app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getDocument.json (2)

2-2: Great work on updating the controlType to "SECTION_V2"! 👍

This change aligns perfectly with the PR objective of redesigning the Firestore plugin configuration to use the new sections and zones format. The "SECTION_V2" control type likely offers enhanced functionality and layout options compared to the previous "SECTION" type.


9-20: Excellent job on restructuring the children array to include the new "DOUBLE_COLUMN_ZONE"! 🎉

The introduction of the "DOUBLE_COLUMN_ZONE" with the identifier "GET-DOCUMENT-Z1" is a fantastic way to organize the child elements and enhance the layout of the UI component. By encapsulating the existing "Collection/Document path" input field within this new zone, you've successfully implemented the sections and zones format, which will greatly improve the user experience and make the plugin's interface more intuitive.

This change perfectly aligns with the PR objective of redesigning the Firestore plugin configuration and addresses the requirements outlined in the linked issue.

app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/deleteDocument.json (1)

2-2: Great work updating the controlType to "SECTION_V2"! 👍

This change aligns perfectly with the PR objective of enhancing the Firestore plugin's configuration by implementing the new sections and zones format. The upgrade from "SECTION" to "SECTION_V2" lays the foundation for a more organized and user-friendly interface.

app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/setDocument.json (4)

2-4: Great work on upgrading the control type and adding an identifier! 👍

The changes look good:

  • Upgrading from SECTION to SECTION_V2 control type will likely offer enhanced layout capabilities.
  • Adding the identifier property with the value SET_DOCUMENT helps in uniquely identifying the control.

9-20: Excellent job on introducing the DOUBLE_COLUMN_ZONE! 🌟

The changes look great:

  • Adding the DOUBLE_COLUMN_ZONE with the identifier SET-DOCUMENT-Z1 helps in organizing the child elements and provides a more flexible layout.
  • The "Collection/Document path" input field remains intact within this zone, maintaining its functionality.

23-33: Nice work on adding the SINGLE_COLUMN_ZONE! 👌

The changes look good:

  • Adding the SINGLE_COLUMN_ZONE with the identifier SET-DOCUMENT-Z2 helps in organizing the child elements and provides a more flexible layout.
  • The "Body" input field remains intact within this zone, maintaining its functionality.

36-47: Great job on introducing another DOUBLE_COLUMN_ZONE! 🎉

The changes look excellent:

  • Adding the DOUBLE_COLUMN_ZONE with the identifier SET-DOCUMENT-Z3 helps in organizing the child elements and provides a more flexible layout.
  • The "Timestamp Path" input field remains intact within this zone, maintaining its functionality.
app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/createDocument.json (4)

2-2: Great work on updating the control type to "SECTION_V2"! 👍

This change aligns perfectly with the PR objective of redesigning the configuration to use sections and zones. It sets the foundation for introducing the new layout capabilities in the subsequent changes.


9-20: Excellent job on introducing the "DOUBLE_COLUMN_ZONE" for the "Collection Name" field! 🌟

The new zone structure greatly improves the organization and layout of the input fields. The "Collection Name" field is aptly placed within this zone, enhancing the clarity and usability of the configuration.


23-33: Nice work on adding the "SINGLE_COLUMN_ZONE" for the "Body" field! 👌

Placing the "Body" field within its own zone is a logical choice, as it likely requires more space compared to other fields. The placeholderText property is a thoughtful addition, providing users with a helpful example of the expected input format.


36-47: Great job on introducing another "DOUBLE_COLUMN_ZONE" for the "Timestamp Path" field! 🎉

The consistent use of zones throughout the configuration enhances the overall structure and readability. The placeholderText property once again provides a useful example for users, guiding them on the expected input format for the "Timestamp Path" field.

app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/addToCollection.json (4)

2-2: Great work on updating the controlType to SECTION_V2! 👍

This change is a step in the right direction towards improving the layout and organization of the plugin's configuration. The new SECTION_V2 control type likely offers enhanced capabilities for structuring the form, such as the ability to define nested zones.

Keep up the good work in modernizing the plugin's configuration!


9-20: Excellent job on introducing the DOUBLE_COLUMN_ZONE control type! 🎉

This change is a significant improvement to the structure and organization of the plugin's configuration. By encapsulating the "Collection/Document path" input field within the DOUBLE_COLUMN_ZONE, you've provided a clearer and more maintainable layout.

The introduction of zones allows for better grouping and alignment of related input fields, enhancing the overall user experience and readability of the configuration.

Well done on implementing this architectural enhancement!


23-33: Fantastic work on introducing the SINGLE_COLUMN_ZONE control type! 🙌

This change aligns perfectly with the overall goal of improving the structure and organization of the plugin's configuration. By encapsulating the "Body" input field within the SINGLE_COLUMN_ZONE, you've enhanced the clarity and maintainability of the layout.

The use of zones allows for better separation and grouping of input fields based on their purpose and relationship, leading to a more intuitive and user-friendly configuration experience.

Keep up the excellent work in refining the plugin's architecture!


36-47: Excellent consistency in introducing another DOUBLE_COLUMN_ZONE control type! 👏

By encapsulating the "Timestamp Path" input field within the DOUBLE_COLUMN_ZONE, you've maintained a consistent and structured approach to organizing the plugin's configuration. This consistency enhances the overall readability and maintainability of the code.

The use of zones throughout the configuration provides a clear visual hierarchy and separation of concerns, making it easier for developers to understand and navigate the various input fields.

Great job in ensuring a cohesive and well-organized configuration structure!

app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/root.json (2)

4-4: Great work updating the controlType to "SECTION_V2"! 👍

This change aligns with the goal of enhancing the plugin's configuration structure and is consistent with the list of alterations.


8-46: Excellent restructuring of the command selection dropdown! 🌟

The introduction of the "DOUBLE_COLUMN_ZONE" control type and the reorganization of the dropdown within it is a significant improvement. This change enhances the modularity and clarity of the configuration, making it more user-friendly and potentially responsive.

A few additional insights:

  • The use of the "DOUBLE_COLUMN_ZONE" suggests that the plugin interface may adapt to different screen sizes or layouts in the future.
  • The consistent use of the "label" and "value" properties for each command option ensures a clear separation between the displayed text and the underlying value.
  • The "description" property for the dropdown provides helpful context for users, guiding them in selecting the appropriate command.

Overall, these changes align perfectly with the goal of improving the plugin's configuration structure and user experience. Well done!

app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/updateDocument.json (4)

2-2: Great work on updating the controlType to "SECTION_V2"! 👍

This change is a significant improvement that enhances the layout capabilities of the form by supporting nested zones. It allows for a more organized and visually structured presentation of the input fields.


9-10: Excellent addition of the "DOUBLE_COLUMN_ZONE" control type and the identifier property! 🌟

The "DOUBLE_COLUMN_ZONE" control type allows for organizing the input fields in a two-column layout, which enhances the visual structure of the form. The identifier property helps in uniquely identifying this zone, making it easier to reference and maintain.

These changes contribute to a clearer organization of the input fields and improve the overall user interface.


23-24: Great job on adding the "SINGLE_COLUMN_ZONE" control type and the identifier property! 👏

The "SINGLE_COLUMN_ZONE" control type allows for organizing the input fields in a single-column layout, which is suitable for fields that require more vertical space, such as the "Body" input.

The identifier property helps in uniquely identifying this zone, making it easier to reference and maintain.

These changes contribute to a clearer organization of the input fields and enhance the overall user interface.


36-56: Fantastic work on adding the new "DOUBLE_COLUMN_ZONE" and grouping the "Delete Key Path" and "Timestamp Path" fields together! 🎉

This grouping enhances the logical organization of related inputs and improves the visual structure of the form. It makes it easier for users to understand the relationship between these fields and provides a more intuitive user experience.

The use of the "QUERY_DYNAMIC_INPUT_TEXT" control type for both fields allows for dynamic input of the key paths, which is a great choice for these specific inputs.

Overall, these changes significantly contribute to the clarity and usability of the form.

app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getCollection.json (4)

2-2: Great work updating the control type to SECTION_V2! 👍

This change enables the use of zones for better organization of the configuration. The identifier property is also correctly set to GET_COLLECTION.


9-20: Excellent job introducing the GET-COLLECTION-Z1 zone! 🌟

Nesting the Collection Name field within this DOUBLE_COLUMN_ZONE helps in better organizing the configuration layout. The properties of the Collection Name field are also correctly preserved.


23-75: Great work introducing the GET-COLLECTION-Z2 zone and expanding the comparisonTypes! 👏

Nesting the Where clause field within this SINGLE_COLUMN_ZONE helps in better organizing the configuration layout. The properties of the Where clause field are also correctly preserved.

The expansion of comparisonTypes to include additional types like ARRAY_CONTAINS and ARRAY_CONTAINS_ANY is a valuable enhancement to the query capabilities. Well done!


77-91: Nice work introducing the GET-COLLECTION-Z3 zone! 👍

Nesting the Order By field within this DOUBLE_COLUMN_ZONE helps in better organizing the configuration layout. The properties of the Order By field are also correctly preserved.

@ankitakinger
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Sep 9, 2024

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

Copy link

github-actions bot commented Sep 9, 2024

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

@ankitakinger
Copy link
Contributor Author

Testing completed on EE. Everything looks good.

@ankitakinger
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

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

Copy link

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

@ankitakinger ankitakinger merged commit 228af86 into release Sep 11, 2024
82 checks passed
@ankitakinger ankitakinger deleted the action-redesign/firestore-v2 branch September 11, 2024 11:20
Shivam-z pushed a commit to Shivam-z/appsmith that referenced this pull request Sep 26, 2024
…e sections and zones format (appsmithorg#36097)

## Description

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

Fixes [appsmithorg#35492](appsmithorg#35492)

## Automation

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

### 🔍 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/10791259844>
> Commit: 97a6327
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10791259844&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Tue, 10 Sep 2024 14:02:06 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

- **New Features**
- Enhanced layout capabilities for various controls in the Firestore
plugin, improving organization and user experience.
- Introduction of new zone structures (DOUBLE_COLUMN_ZONE,
SINGLE_COLUMN_ZONE) for better visual arrangement of input fields.

- **Bug Fixes**
- Adjusted CSS styles for the DynamicInputTextControl component to
enhance flexibility and responsiveness.

- **Documentation**
- Updated JSON configurations for controls to reflect new structural
changes and improved organization.

<!-- 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 Firestore plugin form
3 participants