Skip to content

chore: Remove style from editor and setting config#38756

Merged
hetunandu merged 5 commits intoreleasefrom
chore/remove-action-style-config
Jan 23, 2025
Merged

chore: Remove style from editor and setting config#38756
hetunandu merged 5 commits intoreleasefrom
chore/remove-action-style-config

Conversation

@hetunandu
Copy link
Member

@hetunandu hetunandu commented Jan 20, 2025

Description

Removes any pending Style overrides in settings and editor config that was used by the old Query editor flows

Fixes #36897

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12879737201
Commit: fbfef1a
Cypress dashboard.
Tags: @tag.Datasource
Spec:


Tue, 21 Jan 2025 04:56:53 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Style

    • Removed custom width styling for query timeout settings across multiple plugins.
    • Enhanced layout flexibility for various form controls and components, promoting a more responsive design.
    • Cleaned up CSS rules for several components, removing unnecessary styles.
  • Refactor

    • Simplified JSON configuration formatting in plugin resources.
    • Streamlined component structures by replacing styled components with standard elements while maintaining visual behavior.
    • Added a method to retrieve control type in the InputTextControl class.
    • Updated styling and layout rules for various components to improve user interface adaptability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2025

Walkthrough

The pull request involves removing default width specifications for action settings configurations across multiple plugin JSON files on the server side. The changes primarily focus on eliminating the "width": "270px" property from various plugin settings, particularly for the "Query timeout (in milliseconds)" input field. Additionally, there's a minor CSS style removal in the SettingsPopover.tsx file related to form control rendering.

Changes

File Path Change Summary
app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx Removed CSS styles for .t--form-control-INPUT_TEXT and .t--form-control-DROP_DOWN classes.
app/server/appsmith-plugins/*/src/main/resources/setting.json Removed "width": "270px" from "Query timeout (in milliseconds)" setting across multiple plugin configurations.
app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/*.json Removed customStyles from controls and retained dataType properties.

Assessment against linked issues

Objective Addressed Explanation
Remove default width for action settings config

Suggested labels

Bug, UI Improvement, Low, Production, Needs Triaging

Suggested reviewers

  • ankitakinger

Poem

Code flows like water, clean and bright,
Widths unshackled, settings take flight,
Plugins dancing, styles set free,
Simplicity reigns, can't you see? 🚀
Configuration's zen, now complete!


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76225f6 and fbfef1a.

📒 Files selected for processing (4)
  • app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts (0 hunks)
  • app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts (0 hunks)
  • app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts (0 hunks)
  • app/client/test/factories/MockPluginsState.ts (0 hunks)
🔥 Files not summarized due to errors (1)
  • app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts: Error: Server error: no LLM provider could handle the message
💤 Files with no reviewable changes (4)
  • app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts
  • app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts
  • app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts
  • app/client/test/factories/MockPluginsState.ts
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-build / client-build
  • GitHub Check: server-unit-tests / server-unit-tests
  • GitHub Check: server-spotless / spotless-check

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

@hetunandu
Copy link
Member Author

/build-deploy-preview

@github-actions github-actions bot added IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Task A simple Todo skip-changelog Adding this label to a PR prevents it from being listed in the changelog labels Jan 20, 2025
@github-actions
Copy link

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

@github-actions
Copy link

Failed server tests

  • com.appsmith.server.services.ce.ApplicationServiceCETest#invalidUpdateApplication

@hetunandu
Copy link
Member Author

/build-deploy-preview skip-tests=true

@github-actions
Copy link

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

@github-actions
Copy link

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

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

🧹 Nitpick comments (4)
app/client/src/components/formControls/FieldArrayControl.tsx (1)

31-39: Consider removing fixed width for dropdown controls.

While the recent changes improve layout flexibility, the dropdown controls still use a fixed width of 12vw. Consider making this responsive as well to maintain consistency with the other style changes.

-  & > .t--form-control-DROP_DOWN,
-  & > .t--form-control-DROP_DOWN > div > div,
-  & > .t--form-control-DROP_DOWN > div > div > div > div {
-    width: 12vw;
-  }
app/client/src/components/formControls/DynamicInputTextControl.tsx (1)

Line range hint 79-91: Clean up unused prop and TODO comment.

Since custom styles have been removed, we should:

  1. Remove the unused customStyles prop
  2. Address the TODO comment about eslint disable
- // TODO: Fix this the next time the file is edited
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- customStyles?: any;
app/client/src/components/formControls/DropDownControl.tsx (1)

88-99: Remove commented-out width style.

The width style is commented out but still present in the styles object. Either remove it completely or document why it's being kept.

  const styles = {
-   // width: "280px",
    ...("customStyles" in this.props &&
    typeof this.props.customStyles === "object"
      ? this.props.customStyles
      : {}),
  };
app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Zone/styles.module.css (1)

24-34: Consider documenting the reset styles.

The reset styles for .ads-v2-select and .ar-form-info-text lack context. Add comments explaining why these resets are necessary.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 34e3401 and 07f6a43.

📒 Files selected for processing (9)
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Zone/styles.module.css (1 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx (2 hunks)
  • app/client/src/components/formControls/DropDownControl.tsx (1 hunks)
  • app/client/src/components/formControls/DynamicInputTextControl.tsx (2 hunks)
  • app/client/src/components/formControls/DynamicTextFieldControl.tsx (1 hunks)
  • app/client/src/components/formControls/FieldArrayControl.tsx (1 hunks)
  • app/client/src/components/formControls/InputTextControl.tsx (1 hunks)
  • app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json (3 hunks)
  • app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • app/client/src/components/formControls/DynamicTextFieldControl.tsx
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json
  • app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: server-unit-tests / server-unit-tests
  • GitHub Check: client-build / client-build
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: server-spotless / spotless-check
🔇 Additional comments (5)
app/client/src/components/formControls/FieldArrayControl.tsx (2)

31-31: LGTM! Improved responsive layout.

The change from min-content to 100% width enhances the component's responsiveness.


36-39: LGTM! Better space distribution.

Adding flex: 1 ensures child elements share available space evenly, which is a good responsive design practice.

app/client/src/components/formControls/DynamicInputTextControl.tsx (1)

Line range hint 29-42: LGTM! Good use of design system variables.

The styling changes improve consistency by using design system variables and enhance user feedback with hover states.

app/client/src/components/formControls/InputTextControl.tsx (1)

194-197: LGTM! Verify usage of control type identifier.

The implementation of getControlType is clean and follows best practices.

Let's verify how this control type identifier is used in the new styling system:

✅ Verification successful

Implementation follows standard control type pattern

The getControlType method implementation is consistent with the application's form control patterns and is safely isolated from the style removal changes.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for usages of INPUT_TEXT in style-related files
rg -l "INPUT_TEXT" | rg -i "style|theme|css"

# Search for any removed style references to this control type
git log -p | rg -B2 -A2 "\.t--form-control-INPUT_TEXT"

Length of output: 118


Script:

#!/bin/bash
# Check content of the style config file
cat app/client/src/widgets/TableWidgetV2/widget/propertyConfig/styleConfig.ts

# Search for all INPUT_TEXT occurrences
rg "INPUT_TEXT" -A 2 -B 2

# Look for interface/type definitions related to control types
ast-grep --pattern 'interface $_ {
  $$$
  getControlType$$$
  $$$
}'

Length of output: 66206

app/client/src/components/formControls/DropDownControl.tsx (1)

88-99: LGTM! Clean implementation of the dropdown wrapper.

The replacement of the styled component with a simple div maintains functionality while reducing complexity.

@hetunandu
Copy link
Member Author

/build-deploy-preview skip-tests=true

@hetunandu hetunandu added the ok-to-test Required label for CI label Jan 20, 2025
@github-actions
Copy link

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

@github-actions
Copy link

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

Copy link
Contributor

@ankitakinger ankitakinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@ankitakinger ankitakinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, queries are no longer showing numbering like JS object.

@hetunandu
Copy link
Member Author

/build-deploy-preview skip-tests=true

@github-actions
Copy link

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

@github-actions
Copy link

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

@ankitakinger
Copy link
Contributor

Following files need width removed as well, coz settings in APIs is breaking UI for API timeout field:
Screenshot 2025-01-20 at 6 15 04 PM

@ankitakinger
Copy link
Contributor

/build-deploy-preview skip-tests=true

@github-actions
Copy link

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

@github-actions
Copy link

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

Copy link
Contributor

@ankitakinger ankitakinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me even after DP testing.

className={`t--${props?.name} uqi-dynamic-input-text`}
style={customStyle}
>
<div className={`t--${props?.name} uqi-dynamic-input-text`}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: name is a required prop of string type, so there is no need to check if it's present.

@ankitakinger
Copy link
Contributor

We cannot merge this in. Seems there are some UI issues in side by side mode as compared to release. @hetunandu

Copy link
Contributor

@ankitakinger ankitakinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to look at UI fixes for side by side mode

@hetunandu hetunandu merged commit 7871822 into release Jan 23, 2025
42 checks passed
@hetunandu hetunandu deleted the chore/remove-action-style-config branch January 23, 2025 07:59
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Feb 7, 2025
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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 skip-changelog Adding this label to a PR prevents it from being listed in the changelog Task A simple Todo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Remove default width for action settings config on server side

3 participants