appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

chore: Adding missing function in cypress git sync helper and syncing the common file across the two repositories.

Open trishaanand opened this issue 9 months ago β€’ 1 comments

…

Description

[!TIP]
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes #Issue Number
or
Fixes Issue URL

[!WARNING]
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

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

:mag: Cypress test results

[!TIP] 🟒 🟒 🟒 All cypress tests have passed! πŸŽ‰ πŸŽ‰ πŸŽ‰ Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9034256269 Commit: 0a0e0308f907ced069f93e2dd01506c0711537ef Cypress dashboard url: Click here!

Communication

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

  • [ ] Yes
  • [ ] No

trishaanand avatar May 10 '24 15:05 trishaanand

Walkthrough

Walkthrough

The recent changes across various icon components focus on improving code readability by restructuring the SVG content within multi-line JSX blocks. These updates aim to enhance maintainability without altering the underlying functionality of the components.

Changes

File Group Change Summary
InputIcon.tsx Refactored InputIcon component with multi-line JSX syntax for improved readability.
KeyValueIcon.tsx Updated KeyValueIcon component with additional formatting for the SVG element.
MenuButtonIcon.tsx Refactored MenuButtonIcon component for improved readability using multi-line JSX structure.
ModalIcon.tsx Modified ModalIcon component to enhance readability by wrapping SVG content in a JSX block.
ParagraphIcon.tsx Updated ParagraphIcon component to improve readability by wrapping SVG content in a JSX block.
PhoneInputIcon.tsx Refactored PhoneInputIcon component for improved readability and structured SVG paths.
RadioGroupIcon.tsx Reformatted RadioGroupIcon component for better readability without functional changes.
SectionIcon.tsx Modified SectionIcon component's structure for improved readability and organization.
StatsBoxIcon.tsx Refactored StatsBoxIcon component for better code organization and readability.
SwitchGroupIcon.tsx Improved readability of SwitchGroupIcon component by splitting SVG content into multiple lines.
SwitchIcon.tsx Updated SwitchIcon component with structured JSX syntax for better readability.
TableIcon.tsx Modified TableIcon component to wrap SVG content within a JSX block for improved readability.
ToolbarButtonsIcon.tsx Enhanced readability of ToolbarButtonsIcon component by wrapping SVG content in a multi-line JSX block.
ZoneIcon.tsx Restructured ZoneIcon component for better readability with a more structured JSX format.

[!TIP] 🟒 🟒 🟒 All cypress tests have passed! πŸŽ‰ πŸŽ‰ πŸŽ‰ Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9034256269 Commit: 0a0e0308f907ced069f93e2dd01506c0711537ef Cypress dashboard url: Click here!

Communication

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

  • [ ] Yes
  • [ ] No

-->
<!-- end of auto-generated comment: pr objectives by coderabbit.ai --><!-- This is an auto-generated comment: shorter summary by coderabbit.ai -->
<!--


### AI-generated Summary of Generated Summaries

Several components in the `Icons` directory underwent refactoring to improve code readability without changing their core functionality. The changes primarily involved restructuring the SVG content within multi-line JSX blocks for better organization and maintenance. Notable alterations include updating the `InputIcon`, `KeyValueIcon`, `ModalIcon`, `ParagraphIcon`, `RadioGroupIcon`, `SwitchGroupIcon`, `TableIcon`, and `ZoneIcon` components. These modifications enhance the visual structure of the components while keeping the SVG paths intact.

### Alterations to the Declarations of Exported or Public Entities

**File: `InputIcon.tsx`**

- **Before:**
  - No changes to exported entities.

- **After:**
  - Updated `InputIcon` component to use a multi-line JSX syntax for improved readability.

**File: `KeyValueIcon.tsx`**

- **Before:**
  - `export const KeyValueIcon = () => <svg ...>;`

- **After:**
  - Updated `KeyValueIcon` component to include additional formatting for the SVG element.

**File: `ModalIcon.tsx`**

- **Before:**
  - No changes to exported entities.

- **After:**
  - Modified `ModalIcon` component to wrap the SVG content within a JSX block for better readability.

**File: `ParagraphIcon.tsx`**

- **Before:**
  - No changes to exported entities.

- **After:**
  - Updated `ParagraphIcon` component to wrap the SVG content within a JSX block for better readability.

**File: `RadioGroupIcon.tsx`**

- **Before:**
  - No changes to exported entities.

- **After:**
  - Updated `RadioGroupIcon` component with proper indentation for better readability.

**File: `SwitchGroupIcon.tsx`**

- **Before:**
  - No changes to exported entities.

- **After:**
  - Updated `SwitchGroupIcon` component by splitting the SVG content into multiple lines for readability.

**File: `TableIcon.tsx`**

- **Before:**
  - No changes to exported entities.

- **After:**
  - Updated `TableIcon` component to wrap the SVG content within a JSX block for better readability.

**File: `ZoneIcon.tsx`**

- **Before:**
  - `export const ZoneIcon = () => <svg ...>;`

- **After:**
  - Updated `ZoneIcon` component to include structured JSX format for improved readability.

-->
<!-- end of auto-generated comment: shorter summary by coderabbit.ai -->

---

<details>
<summary>Recent Review Details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**

<details>
<summary>Commits</summary>
Files that changed from the base of the PR and between 0a0e0308f907ced069f93e2dd01506c0711537ef and 8a60319f60733869507e8f306076315a7b891871.
</details>
<details>
<summary>Files ignored due to path filters (14)</summary>

* `app/client/package.json` is excluded by `!**/*.json`
* `app/client/public/page.min.js` is excluded by `!**/*.min.js`, `!**/*.min.js`
* `app/client/public/static/maps/AFRICA.json` is excluded by `!**/*.json`
* `app/client/public/static/maps/ASIA.json` is excluded by `!**/*.json`
* `app/client/public/static/maps/EUROPE.json` is excluded by `!**/*.json`
* `app/client/public/static/maps/NORTH_AMERICA.json` is excluded by `!**/*.json`
* `app/client/public/static/maps/OCEANIA.json` is excluded by `!**/*.json`
* `app/client/public/static/maps/SOURTH_AMERICA.json` is excluded by `!**/*.json`
* `app/client/public/static/maps/USA.json` is excluded by `!**/*.json`
* `app/client/public/static/maps/WORLD.json` is excluded by `!**/*.json`
* `app/client/public/static/maps/WORLD_WITH_ANTARCTICA.json` is excluded by `!**/*.json`
* `app/client/public/tinymce/tinymce.min.js` is excluded by `!**/*.min.js`, `!**/*.min.js`
* `app/client/vercel.json` is excluded by `!**/*.json`
* `app/client/yarn.lock` is excluded by `!**/*.lock`, `!**/*.lock`

</details>

<details>
<summary>Files selected for processing (57)</summary>

* app/client/.babelrc (1 hunks)
* app/client/.prettierrc (1 hunks)
* app/client/.yarn/plugins/plugin-dedupe-on-install.cjs (1 hunks)
* app/client/README.md (1 hunks)
* app/client/README.old.md (2 hunks)
* app/client/cypress/support/Pages/GitSync.ts (2 hunks)
* app/client/generators/widget/templates/component/index.js.hbs (1 hunks)
* app/client/generators/widget/templates/constants.js.hbs (1 hunks)
* app/client/generators/widget/templates/icon.svg.hbs (1 hunks)
* app/client/generators/widget/templates/index.js.hbs (1 hunks)
* app/client/jest.config.js (1 hunks)
* app/client/packages/icons/src/components/Icons/ButtonIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/CheckboxGroupIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/CheckboxIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/CurrencyInputIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/HeadingIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/IconButtonIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/InlineButtonsIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/InputIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/KeyValueIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/MenuButtonIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/ModalIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/ParagraphIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/PhoneInputIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/RadioGroupIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/SectionIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/StatsBoxIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/SwitchGroupIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/SwitchIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/TableIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/ToolbarButtonsIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Icons/ZoneIcon.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/ButtonThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/CheckboxGroupThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/CheckboxThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/CurrencyInputThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/HeadingThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/IconButtonThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/InlineButtonsThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/InputThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/KeyValueThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/MenuButtonThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/ModalThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/ParagraphThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/PhoneInputThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/RadioGroupThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/SectionThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/StatsBoxThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/SwitchGroupThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/SwitchThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/TableThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/ToolbarButtonsThumbnail.tsx (1 hunks)
* app/client/packages/icons/src/components/Thumbnails/ZoneThumbnail.tsx (1 hunks)
* app/client/packages/storybook/.storybook/manager-head.html (1 hunks)
* app/client/packages/storybook/.storybook/preview-head.html (1 hunks)
* app/client/public/404.html (1 hunks)
* app/client/public/index.html (6 hunks)

</details>
<details>
<summary>Files not processed due to max files limit (5)</summary>

* app/client/public/libraries/[email protected]
* app/client/public/libraries/[email protected]
* app/client/public/privacy-policy.html
* app/client/public/static/js/skins/content/default/content.css
* app/client/public/terms-and-conditions.html

</details>





<details>
<summary>Files skipped from review due to trivial changes (47)</summary>

* app/client/.prettierrc
* app/client/.yarn/plugins/plugin-dedupe-on-install.cjs
* app/client/generators/widget/templates/constants.js.hbs
* app/client/generators/widget/templates/icon.svg.hbs
* app/client/generators/widget/templates/index.js.hbs
* app/client/packages/icons/src/components/Icons/ButtonIcon.tsx
* app/client/packages/icons/src/components/Icons/CheckboxGroupIcon.tsx
* app/client/packages/icons/src/components/Icons/CheckboxIcon.tsx
* app/client/packages/icons/src/components/Icons/CurrencyInputIcon.tsx
* app/client/packages/icons/src/components/Icons/HeadingIcon.tsx
* app/client/packages/icons/src/components/Icons/IconButtonIcon.tsx
* app/client/packages/icons/src/components/Icons/InlineButtonsIcon.tsx
* app/client/packages/icons/src/components/Icons/InputIcon.tsx
* app/client/packages/icons/src/components/Icons/MenuButtonIcon.tsx
* app/client/packages/icons/src/components/Icons/ModalIcon.tsx
* app/client/packages/icons/src/components/Icons/ParagraphIcon.tsx
* app/client/packages/icons/src/components/Icons/PhoneInputIcon.tsx
* app/client/packages/icons/src/components/Icons/RadioGroupIcon.tsx
* app/client/packages/icons/src/components/Icons/SectionIcon.tsx
* app/client/packages/icons/src/components/Icons/StatsBoxIcon.tsx
* app/client/packages/icons/src/components/Icons/SwitchGroupIcon.tsx
* app/client/packages/icons/src/components/Icons/SwitchIcon.tsx
* app/client/packages/icons/src/components/Icons/TableIcon.tsx
* app/client/packages/icons/src/components/Icons/ZoneIcon.tsx
* app/client/packages/icons/src/components/Thumbnails/ButtonThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/CheckboxGroupThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/CheckboxThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/CurrencyInputThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/HeadingThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/IconButtonThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/InlineButtonsThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/InputThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/KeyValueThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/MenuButtonThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/ModalThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/ParagraphThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/PhoneInputThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/RadioGroupThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/SectionThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/StatsBoxThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/SwitchGroupThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/SwitchThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/TableThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/ToolbarButtonsThumbnail.tsx
* app/client/packages/icons/src/components/Thumbnails/ZoneThumbnail.tsx
* app/client/packages/storybook/.storybook/manager-head.html
* app/client/packages/storybook/.storybook/preview-head.html

</details>

<details>
<summary>Files skipped from review as they are similar to previous changes (1)</summary>

* app/client/cypress/support/Pages/GitSync.ts

</details>

<details>
<summary>Additional Context Used</summary>

<details><summary>LanguageTool (3)</summary><blockquote>

<details><summary>app/client/README.md (1)</summary><blockquote>

Near line 4: Possible missing preposition found.
Context: ...com/facebook/create-react-app). <br><br> For details on setting up your developme...

</blockquote></details>
<details><summary>app/client/README.old.md (2)</summary><blockquote>

Near line 15: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ADME.md link from the list of files. 3. Click the **Edit** button. 4. Delete the foll...

---

Near line 17: Use a comma before β€˜and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...in the dialog. The commit page will open and you’ll see the change you just made. 6....

</blockquote></details>

</blockquote></details>

</details>
<details><summary>Additional comments not posted (9)</summary><blockquote>
<details><summary>app/client/generators/widget/templates/component/index.js.hbs (1)</summary><blockquote>

`1-5`: The template structure for generating React components looks correct and serves as a good starting point for dynamic component generation.

</blockquote></details>
<details><summary>app/client/packages/icons/src/components/Icons/ToolbarButtonsIcon.tsx (1)</summary><blockquote>

`1-17`: The SVG icon component is defined correctly and follows best practices for React functional components.

</blockquote></details>
<details><summary>app/client/packages/icons/src/components/Icons/KeyValueIcon.tsx (1)</summary><blockquote>

`1-19`: The SVG icon component for the key-value pair is defined correctly and follows best practices for React functional components.

</blockquote></details>
<details><summary>app/client/.babelrc (1)</summary><blockquote>

`1-23`: The Babel configuration is set up correctly, providing necessary aliases and plugins for the project's needs.

</blockquote></details>
<details><summary>app/client/jest.config.js (1)</summary><blockquote>

Line range hint `1-92`: The Jest configuration is comprehensive and correctly sets up the testing environment, including necessary mocks and module mappings for the project.

</blockquote></details>
<details><summary>app/client/public/404.html (1)</summary><blockquote>

`1-131`: The custom 404 error page is well-structured with appropriate meta tags, styles, and scripts for error tracking and user behavior analysis.

</blockquote></details>
<details><summary>app/client/public/index.html (3)</summary><blockquote>

`44-44`: This approach for dynamically preloading chunks based on the application mode is efficient and well-implemented.

---

`44-44`: Proper implementation of conditional loading for the Zipy SDK based on environment configurations.

---

`44-44`: The local storage utility functions are well-implemented with appropriate error handling and feature detection.

</blockquote></details></blockquote></details>


</details><!-- commit_ids_reviewed_start -->

<!-- 0a0e0308f907ced069f93e2dd01506c0711537ef -->
<!-- 8a60319f60733869507e8f306076315a7b891871 -->

<!-- commit_ids_reviewed_end --><!-- tips_start -->

---

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?

<details>
<summary>Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):

- 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.`

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 a review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai help` to get help.


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

### CodeRabbit Configration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

coderabbitai[bot] avatar May 10 '24 15:05 coderabbitai[bot]