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, UQI upgrade S3 plugin config to dual zone format & sorting field responsiveness #36002

Closed
wants to merge 4 commits into from

Conversation

alex-golovanov
Copy link
Contributor

@alex-golovanov alex-golovanov commented Aug 30, 2024

Description

Upgrade S3 plugin config to new format using SECTION_V2, SINGLE_COLUMN_ZONE, and DOUBLE_COLUMN_ZONE.

Fixes #35484

Automation

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

🔍 Cypress test results

Caution

🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10662975214
Commit: 1905f4d
Cypress dashboard.
Tags: @tag.All
Spec:
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ServerSide/ApiTests/API_All_Verb_spec.js
List of identified flaky tests.
Mon, 02 Sep 2024 08:57:59 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Enhanced sorting control with improved responsiveness and layout adjustments.
    • Upgraded Amazon S3 plugin editor interface with new control types for better user interaction.
    • Added new commands for file operations, including upload and delete functionalities with conditional logic.
    • Introduced fields for generating signed and unsigned URLs with customizable expiration settings.
  • Bug Fixes

    • Streamlined internal logic for sorting fields, reducing complexity and improving performance.

@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 30, 2024
Copy link
Contributor

coderabbitai bot commented Aug 30, 2024

Walkthrough

The recent changes involve significant updates to the SortingControl component in the client application, enhancing type safety and responsiveness. Additionally, the Amazon S3 plugin's editor configuration has been upgraded to include new control types and improved layout options, facilitating more complex user interactions and file management functionalities.

Changes

Files Change Summary
app/client/src/components/formControls/SortingControl.tsx Enhanced type safety with TypeScript types, updated layout to a grid system for responsiveness, refined logic in useEffect, and adjusted field rendering.
app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/root.json Transitioned to "SECTION_V2" control type, added new control types for layout zones, expanded command options, and introduced fields for URL generation.

Assessment against linked issues

Objective Addressed Explanation
Add Zone & Section to Amazon S3 plugin form (#35484)

🎉 In code we trust, with types so bright,
Sorting and S3, now a delight!
Grids and zones, a layout so fine,
File operations, all in a line.
With each change, a step we take,
For a smoother path, let’s celebrate! 🎊


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

/build-deploy-preview skip-tests=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10629833514.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 36002.
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: 1

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4b89c1c and d6c086a.

Files selected for processing (2)
  • app/client/src/components/formControls/SortingControl.tsx (4 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/root.json (1 hunks)
Additional context used
Biome
app/client/src/components/formControls/SortingControl.tsx

[error] 156-156: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)


[error] 180-190: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

Additional comments not posted (12)
app/client/src/components/formControls/SortingControl.tsx (7)

77-77: Type Definition Update: SortingControlProps

The update to SortingControlProps to directly extend ControlProps simplifies the type hierarchy and ensures that all properties from ControlProps are available, enhancing type safety and clarity.


79-80: Type Definition Update: SortingComponentProps

The new definition for SortingComponentProps combines WrappedFieldArrayProps with selected properties from SortingControlProps. This change is beneficial as it narrows down the properties to what is actually used in the component, improving type safety and clarity.


55-60: Updated Layout Using CSS Grid

The transition from a flexbox to a grid system in SortingContainer allows for more responsive design adjustments. This is a positive change as it enhances the layout's adaptability to different screen sizes.


63-68: Responsive Design in SortingFields

The use of CSS grid in SortingFields for responsive layout adjustments is commendable. It improves the component's responsiveness and aligns with modern web design practices.


112-130: Refinement of Logic in useEffect Hook

The logic within the useEffect hook has been simplified by directly checking sortObjectValue before proceeding with conditional checks for pushing new fields. This streamlining reduces unnecessary complexity and enhances the readability and maintainability of the component.


90-90: Direct Reference in onDeletePressed Function

The update to use fields.remove(index) directly instead of props.fields.remove(index) aligns with the updated props structure and simplifies the function's implementation.


155-191: Rendering of Sorting Fields with Responsive Design

The rendering logic for sorting fields now utilizes the new SortingFields styled component, incorporating responsive design principles. This change is beneficial as it ensures the UI adapts well to different screen sizes.

Tools
Biome

[error] 156-156: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)


[error] 180-190: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/root.json (5)

4-4: Transition to SECTION_V2 Control Type

The upgrade from SECTION to SECTION_V2 enhances the organization and functionality of the editor by allowing for more complex interactions and configurations. This change is crucial for supporting the new dual zone format and improving the user interface.


9-53: Addition of DOUBLE_COLUMN_ZONE

The introduction of DOUBLE_COLUMN_ZONE facilitates a more sophisticated layout for user inputs. This change is significant as it allows for a clearer separation of controls and enhances the overall user experience by organizing related settings more intuitively.


56-69: Conditional Visibility in DOUBLE_COLUMN_ZONE

The use of conditional logic to show or hide zones based on user selections is a smart addition. It streamlines the user experience by only displaying relevant options, reducing clutter and potential confusion.


71-109: Enhanced File Operation Configurations

The new fields for generating signed and unsigned URLs, complete with options for expiration durations, reflect a more comprehensive approach to managing file operations. This enhancement provides users with greater flexibility and control, improving the functionality of the S3 plugin.


111-245: Expanded Command Options and Conditional Fields

The expansion of command options and the addition of conditional fields for various file operations like uploading and deleting multiple files enhance the plugin's capabilities. These changes make the interface more robust and user-friendly by catering to a wider range of user needs.

Copy link

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

@hetunandu hetunandu requested review from AmanAgarwal041 and sneha122 and removed request for hetunandu August 30, 2024 09:28
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 (1)
app/client/src/components/formControls/SortingControl.tsx (1)

1-9: Reminder: Address TODO items.

The TODO comments suggest improvements for type safety in future edits. It's important to address these soon to maintain code quality and avoid technical debt.

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d6c086a and 88f5b58.

Files selected for processing (1)
  • app/client/src/components/formControls/SortingControl.tsx (4 hunks)
Additional comments not posted (4)
app/client/src/components/formControls/SortingControl.tsx (4)

82-131: Good simplification of logic.

The refactoring within SortingComponent enhances readability and reduces complexity. Ensure that direct manipulations of Redux state, like fields.remove(index), are properly managed to avoid state inconsistencies.


220-230: Efficient use of React hooks.

The use of useMemo for optimizing props passed to FieldArray is a good practice, ensuring that the component only re-renders when necessary.


77-80: Enhanced type safety.

Updating SortingControlProps and SortingComponentProps to be more specific improves clarity and helps prevent type-related bugs.


55-68: Responsive layout improvements.

Switching to a grid layout and using isBreakpointSmall for responsive adjustments enhances the UI's adaptability across different devices.

@alex-golovanov alex-golovanov changed the title feat: action redesign, UQI upgrade S# plugin config to dual zone format & sorting field responsiveness feat: action redesign, UQI upgrade S3 plugin config to dual zone format & sorting field responsiveness Sep 2, 2024
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 Amazon S3 plugin form
1 participant