PromucFlow_constructor/app/client/cypress/fixtures/customWidget.json

144 lines
11 KiB
JSON
Raw Normal View History

chore: custom widget (#28926) ## Description This PR's adds the custom widget. #### PR fixes following issue(s) Fixes #28607 Fixes #28610 Fixes #28615 Fixes #28608 Fixes #28612 > if no issue exists, please create an issue and ask the maintainers about this first > > #### Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video > > #### Type of change - New feature (non-breaking change which adds functionality) > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [x] Jest - [x] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced search functionality with a wildcard option for unmatched widget searches. - Added new routes for custom widget editing. - Implemented additional editor modes for HTML and CSS. - Created new code templates and help components for custom widget builders. - Enhanced property controls with new button controls for custom widget editing. - Updated theming interfaces and constants for better theming support. - Added the CustomWidget component for embedding custom widgets in iframes. - Expanded widgets library to include the CustomWidget. - **Enhancements** - Improved `CodeEditor` with additional modes, props, and resize behavior. - Enhanced `PropertyPaneControlConfig` interface with dynamic dependencies and additional properties. - Refined custom widget scripts with communication channel and event handling. - **Bug Fixes** - Fixed visibility logic for the `ExternalWidget` card. - **Documentation** - Added new messages and documentation links for custom widget features. - **Tests** - Implemented new Cypress tests for custom widget default components and property pane interactions. - Updated workspace commands in Cypress tests. - **Refactor** - Streamlined `PropertyControl` state management and editing functions. - Refactored code editor hint helper logic. - **Style** - Added `borderLess` prop to style components without borders. - **Chores** - Updated constants and messages related to custom widget features. - Adjusted webpack configuration to ignore specific module warnings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2023-12-28 06:46:28 +00:00
{
test: fix cypress tests for custom widgets (#39905) ## Description Updates the specs with new doc structure in custom widget. 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.Widget" ### :mag: 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/14126379520> > Commit: c043c29f610f3f8f5520759ef71a49f772cfdc68 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14126379520&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Widget` > Spec: > <hr>Fri, 28 Mar 2025 11:26:17 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** - Introduced a new text display within the custom widget to showcase the current tip index. - **Refactor** - Enhanced the custom widget’s layout and styling, resulting in a cleaner interface and more consistent appearance for a smoother user experience. - Updated import statements for React and ReactDOM to improve consistency and clarity in the code. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-03-28 12:36:05 +00:00
"dsl": {
chore: custom widget (#28926) ## Description This PR's adds the custom widget. #### PR fixes following issue(s) Fixes #28607 Fixes #28610 Fixes #28615 Fixes #28608 Fixes #28612 > if no issue exists, please create an issue and ask the maintainers about this first > > #### Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video > > #### Type of change - New feature (non-breaking change which adds functionality) > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [x] Jest - [x] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced search functionality with a wildcard option for unmatched widget searches. - Added new routes for custom widget editing. - Implemented additional editor modes for HTML and CSS. - Created new code templates and help components for custom widget builders. - Enhanced property controls with new button controls for custom widget editing. - Updated theming interfaces and constants for better theming support. - Added the CustomWidget component for embedding custom widgets in iframes. - Expanded widgets library to include the CustomWidget. - **Enhancements** - Improved `CodeEditor` with additional modes, props, and resize behavior. - Enhanced `PropertyPaneControlConfig` interface with dynamic dependencies and additional properties. - Refined custom widget scripts with communication channel and event handling. - **Bug Fixes** - Fixed visibility logic for the `ExternalWidget` card. - **Documentation** - Added new messages and documentation links for custom widget features. - **Tests** - Implemented new Cypress tests for custom widget default components and property pane interactions. - Updated workspace commands in Cypress tests. - **Refactor** - Streamlined `PropertyControl` state management and editing functions. - Refactored code editor hint helper logic. - **Style** - Added `borderLess` prop to style components without borders. - **Chores** - Updated constants and messages related to custom widget features. - Adjusted webpack configuration to ignore specific module warnings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2023-12-28 06:46:28 +00:00
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 4896,
"snapColumns": 64,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 400,
"containerStyle": "none",
"snapRows": 124,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 87,
"minHeight": 1292,
"dynamicTriggerPathList": [],
"parentColumnSpace": 1,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
test: fix cypress tests for custom widgets (#39905) ## Description Updates the specs with new doc structure in custom widget. 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.Widget" ### :mag: 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/14126379520> > Commit: c043c29f610f3f8f5520759ef71a49f772cfdc68 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14126379520&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Widget` > Spec: > <hr>Fri, 28 Mar 2025 11:26:17 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** - Introduced a new text display within the custom widget to showcase the current tip index. - **Refactor** - Enhanced the custom widget’s layout and styling, resulting in a cleaner interface and more consistent appearance for a smoother user experience. - Updated import statements for React and ReactDOM to improve consistency and clarity in the code. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-03-28 12:36:05 +00:00
{
"mobileBottomRow": 33,
"widgetName": "Custom1",
"srcDoc": {
"html": "<!-- no need to write html, head, body tags, it is handled by the widget -->\n<div id=\"root\"></div>\n",
"css": ".app {\n height: calc(var(--appsmith-ui-height) * 1px);\n width: calc(var(--appsmith-ui-width) * 1px);\n justify-content: center;\n border-radius: var(--appsmith-theme-borderRadius);\n box-shadow: var(--appsmith-theme-boxShadow);\n padding: 29px 25px;\n box-sizing: border-box;\n font-family: system-ui;\n background: #fff;\n}\n\n.tip-container {\n margin-bottom: 20px;\n font-size: 14px;\n line-height: 1.571429;\n}\n\n.tip-container h2 {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 700;\n}\n\n.tip-header {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n margin-bottom: 9px;\n}\n\n.tip-header div {\n color: #999;\n}\n\n.content {\n white-space: pre-wrap;\n word-break: break-word;\n font-size: 14px;\n line-height: 1.571429;\n}\n\n.button-container {\n text-align: right;\n padding-top: 4px;\n}\n\n.button-container button {\n margin: 0 10px;\n cursor: pointer;\n border-radius: var(--appsmith-theme-borderRadius);\n padding: 6px 16px;\n background: none;\n height: auto;\n transition: all 0.3s ease;\n}\n\n.button-container button.primary {\n background: var(--appsmith-theme-primaryColor) !important;\n color: #fff;\n border: 1px solid var(--appsmith-theme-primaryColor) !important;\n}\n\n.button-container button.reset {\n border: 1px solid #999;\n color: #999;\n outline: none;\n box-shadow: none;\n}\n\n.button-container button.reset:hover:not(:disabled) {\n color: var(--appsmith-theme-primaryColor);\n border-color: var(--appsmith-theme-primaryColor);\n}\n\n.button-container button.reset:disabled {\n cursor: default;\n}",
"js": "import * as React from 'https://esm.sh/react@18';import * as reactDom from 'https://esm.sh/react-dom@18';\nfunction App() {\n const [currentIndex, setCurrentIndex] = React.useState(0);\n const [key, setKey] = React.useState(0);\n const handleNext = () => {\n const index = (currentIndex + 1) % appsmith.model.tips.length;\n setCurrentIndex(index);\n appsmith.updateModel({\n currentIndex: index\n });\n };\n const handleReset = () => {\n setCurrentIndex(0);\n appsmith.updateModel({\n currentIndex: 0\n });\n appsmith.triggerEvent(\"onResetClick\", {\n oldIndex: currentIndex\n });\n };\n React.useEffect(() => {\n appsmith.onModelChange((model, prevModel) => {\n if (JSON.stringify(prevModel?.tips) !== JSON.stringify(model.tips)) {\n setKey(Math.random());\n }\n });\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"app\",\n key: key\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"tip-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"tip-header\"\n }, /*#__PURE__*/React.createElement(\"h2\", null, \"Custom Widget\"), /*#__PURE__*/React.createElement(\"div\", null, currentIndex + 1, \" / \", appsmith.model.tips.length, \" \")), /*#__PURE__*/React.createElement(\"div\", null, appsmith.model.tips[currentIndex])), /*#__PURE__*/React.createElement(\"div\", {\n className: \"button-container\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"primary\",\n onClick: handleNext,\n type: \"primary\"\n }, \"Next Tip\"), /*#__PURE__*/React.createElement(\"button\", {\n className: \"reset\",\n onClick: handleReset\n }, \"Reset\")));\n}\nappsmith.onReady(() => {\n reactDom.render(/*#__PURE__*/React.createElement(App, null), document.getElementById(\"root\"));\n});"
chore: custom widget (#28926) ## Description This PR's adds the custom widget. #### PR fixes following issue(s) Fixes #28607 Fixes #28610 Fixes #28615 Fixes #28608 Fixes #28612 > if no issue exists, please create an issue and ask the maintainers about this first > > #### Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video > > #### Type of change - New feature (non-breaking change which adds functionality) > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [x] Jest - [x] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced search functionality with a wildcard option for unmatched widget searches. - Added new routes for custom widget editing. - Implemented additional editor modes for HTML and CSS. - Created new code templates and help components for custom widget builders. - Enhanced property controls with new button controls for custom widget editing. - Updated theming interfaces and constants for better theming support. - Added the CustomWidget component for embedding custom widgets in iframes. - Expanded widgets library to include the CustomWidget. - **Enhancements** - Improved `CodeEditor` with additional modes, props, and resize behavior. - Enhanced `PropertyPaneControlConfig` interface with dynamic dependencies and additional properties. - Refined custom widget scripts with communication channel and event handling. - **Bug Fixes** - Fixed visibility logic for the `ExternalWidget` card. - **Documentation** - Added new messages and documentation links for custom widget features. - **Tests** - Implemented new Cypress tests for custom widget default components and property pane interactions. - Updated workspace commands in Cypress tests. - **Refactor** - Streamlined `PropertyControl` state management and editing functions. - Refactored code editor hint helper logic. - **Style** - Added `borderLess` prop to style components without borders. - **Chores** - Updated constants and messages related to custom widget features. - Adjusted webpack configuration to ignore specific module warnings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2023-12-28 06:46:28 +00:00
},
test: fix cypress tests for custom widgets (#39905) ## Description Updates the specs with new doc structure in custom widget. 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.Widget" ### :mag: 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/14126379520> > Commit: c043c29f610f3f8f5520759ef71a49f772cfdc68 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14126379520&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Widget` > Spec: > <hr>Fri, 28 Mar 2025 11:26:17 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** - Introduced a new text display within the custom widget to showcase the current tip index. - **Refactor** - Enhanced the custom widget’s layout and styling, resulting in a cleaner interface and more consistent appearance for a smoother user experience. - Updated import statements for React and ReactDOM to improve consistency and clarity in the code. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-03-28 12:36:05 +00:00
"isCanvas": false,
"displayName": "Custom",
"iconSVG": "/static/media/icon.867bcc8399fa3f897d425d72690b86e4.svg",
"searchTags": ["external"],
"topRow": 3,
"bottomRow": 33,
"parentRowSpace": 10,
"type": "CUSTOM_WIDGET",
"hideCard": false,
"mobileRightColumn": 41,
"parentColumnSpace": 19.296875,
"dynamicTriggerPathList": [
{
"key": "onResetClick"
}
],
"dynamicBindingPathList": [
{
"key": "theme"
}
],
"leftColumn": 21,
"defaultModel": "{\n \"tips\": [\n \"Pass data to this widget in the default model field\",\n \"Access data in the javascript file using the appsmith.model variable\",\n \"Create events in the widget and trigger them in the javascript file using appsmith.triggerEvent('eventName')\",\n \"Access data in CSS as var(--appsmith-model-{property-name})\"\n ]\n}",
"theme": "{{appsmith.theme}}",
"onResetClick": "{{showAlert('Successfully reset from ' + oldIndex, '');}}",
"events": ["onResetClick"],
"key": "nuzm5titx7",
"isDeprecated": false,
"rightColumn": 41,
"isSearchWildcard": true,
"widgetId": "giszumqrjp",
"isVisible": true,
"version": 1,
"uncompiledSrcDoc": {
"html": "<!-- no need to write html, head, body tags, it is handled by the widget -->\n<div id=\"root\"></div>\n",
"css": ".app {\n\theight: calc(var(--appsmith-ui-height) * 1px);\n\twidth: calc(var(--appsmith-ui-width) * 1px);\n\tjustify-content: center;\n\tborder-radius: var(--appsmith-theme-borderRadius);\n\tbox-shadow: var(--appsmith-theme-boxShadow);\n\tpadding: 29px 25px;\n\tbox-sizing: border-box;\n\tfont-family: system-ui;\n\tbackground: #fff;\n}\n\n.tip-container {\n\tmargin-bottom: 20px;\n\tfont-size: 14px;\n\tline-height: 1.571429;\n}\n\n.tip-container h2 {\n\tmargin-bottom: 20px;\n\tfont-size: 16px;\n\tfont-weight: 700;\n}\n\n.tip-header {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: baseline;\n\tmargin-bottom: 9px;\n}\n\n.tip-header div {\n\tcolor: #999;\n}\n\n.content {\n\twhite-space: pre-wrap;\n\tword-break: break-word;\n\tfont-size: 14px;\n\tline-height: 1.571429;\n}\n\n.button-container {\n\ttext-align: right;\n\tpadding-top: 4px;\n}\n\n.button-container button {\n\tmargin: 0 10px;\n\tcursor: pointer;\n\tborder-radius: var(--appsmith-theme-borderRadius);\n\tpadding: 6px 16px;\n\tbackground: none;\n\theight: auto;\n\ttransition: all 0.3s ease;\n}\n\n.button-container button.primary {\n\tbackground: var(--appsmith-theme-primaryColor) !important;\n\tcolor: #fff;\n\tborder: 1px solid var(--appsmith-theme-primaryColor) !important;\n}\n\n.button-container button.reset {\n\tborder: 1px solid #999;\n\tcolor: #999;\n\toutline: none;\n\tbox-shadow: none;\n}\n\n.button-container button.reset:hover:not(:disabled) {\n\tcolor: var(--appsmith-theme-primaryColor);\n\tborder-color: var(--appsmith-theme-primaryColor);\n}\n\n.button-container button.reset:disabled {\n\tcursor: default;\n}",
"js": "import * as React from 'https://esm.sh/react@18';import * as reactDom from 'https://esm.sh/react-dom@18';\nfunction App() {\n const [currentIndex, setCurrentIndex] = React.useState(0);\n \n const [key, setKey] = React.useState(0);\n\n const handleNext = () => {\n const index = (currentIndex + 1) % appsmith.model.tips.length\n setCurrentIndex(index);\n appsmith.updateModel({\n currentIndex: index\n });\n };\n\n const handleReset = () => {\n setCurrentIndex(0);\n appsmith.updateModel({\n currentIndex: 0\n });\n appsmith.triggerEvent(\"onResetClick\", {\n oldIndex: currentIndex\n });\n };\n \n React.useEffect(() => { \n appsmith.onModelChange((model, prevModel) => {\n if (JSON.stringify(prevModel?.tips) !== JSON.stringify(model.tips)) {\n setKey(Math.random());\n }\n });\n }, []);\n \n\n return (\n <div className=\"app\" key={key}>\n <div className=\"tip-container\">\n <div className=\"tip-header\">\n <h2>Custom Widget</h2>\n <div>{currentIndex + 1} / {appsmith.model.tips.length} </div>\n </div>\n <div>{appsmith.model.tips[currentIndex]}</div>\n </div>\n <div className=\"button-container\">\n <button className=\"primary\" onClick={handleNext} type=\"primary\">Next Tip</button>\n <button className=\"reset\" onClick={handleReset}>Reset</button>\n </div>\n </div>\n);\n}\n\nappsmith.onReady(() => {\n reactDom.render(<App />, document.getElementById(\"root\"));\n});"
},
"parentId": "0",
"tags": ["Display"],
"renderMode": "CANVAS",
"isLoading": false,
"mobileTopRow": 3,
"mobileLeftColumn": 21,
"dynamicPropertyPathList": [
{
"key": "onResetClick"
}
]
},
{
"isVisible": true,
"type": "TEXT_WIDGET",
"text": "{{Custom1.model.currentIndex}}",
"fontSize": "1rem",
"fontStyle": "BOLD",
"textAlign": "LEFT",
"textColor": "#231F20",
"widgetName": "Text1",
"shouldTruncate": false,
"overflow": "NONE",
"version": 1,
"animateLoading": true,
"responsiveBehavior": "fill",
"minWidth": 450,
"minDynamicHeight": 4,
"maxDynamicHeight": 9000,
"dynamicHeight": "AUTO_HEIGHT",
"searchTags": ["typography", "paragraph", "label"],
"tags": ["Suggested", "Content"],
"hideCard": false,
"isDeprecated": false,
"displayName": "Text",
"key": "my0l36gkcf",
"iconSVG": "/static/media/icon.a47d6d5dbbb718c4dc4b2eb4f218c1b7.svg",
"widgetId": "144bnot1xa",
"renderMode": "CANVAS",
"truncateButtonColor": "{{appsmith.theme.colors.primaryColor}}",
"fontFamily": "{{appsmith.theme.fontFamily.appFont}}",
"borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
"isLoading": false,
"parentColumnSpace": 19.296875,
"parentRowSpace": 10,
"leftColumn": 23,
"rightColumn": 40,
"topRow": 36,
"bottomRow": 40,
"mobileLeftColumn": 23,
"mobileRightColumn": 39,
"mobileTopRow": 38,
"mobileBottomRow": 42,
"parentId": "0",
"dynamicBindingPathList": [
{
"key": "truncateButtonColor"
},
{
"key": "fontFamily"
},
{
"key": "borderRadius"
},
{
"key": "text"
}
],
"dynamicTriggerPathList": [],
"originalTopRow": 38,
"originalBottomRow": 42
}
chore: custom widget (#28926) ## Description This PR's adds the custom widget. #### PR fixes following issue(s) Fixes #28607 Fixes #28610 Fixes #28615 Fixes #28608 Fixes #28612 > if no issue exists, please create an issue and ask the maintainers about this first > > #### Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video > > #### Type of change - New feature (non-breaking change which adds functionality) > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [x] Jest - [x] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced search functionality with a wildcard option for unmatched widget searches. - Added new routes for custom widget editing. - Implemented additional editor modes for HTML and CSS. - Created new code templates and help components for custom widget builders. - Enhanced property controls with new button controls for custom widget editing. - Updated theming interfaces and constants for better theming support. - Added the CustomWidget component for embedding custom widgets in iframes. - Expanded widgets library to include the CustomWidget. - **Enhancements** - Improved `CodeEditor` with additional modes, props, and resize behavior. - Enhanced `PropertyPaneControlConfig` interface with dynamic dependencies and additional properties. - Refined custom widget scripts with communication channel and event handling. - **Bug Fixes** - Fixed visibility logic for the `ExternalWidget` card. - **Documentation** - Added new messages and documentation links for custom widget features. - **Tests** - Implemented new Cypress tests for custom widget default components and property pane interactions. - Updated workspace commands in Cypress tests. - **Refactor** - Streamlined `PropertyControl` state management and editing functions. - Refactored code editor hint helper logic. - **Style** - Added `borderLess` prop to style components without borders. - **Chores** - Updated constants and messages related to custom widget features. - Adjusted webpack configuration to ignore specific module warnings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2023-12-28 06:46:28 +00:00
]
test: fix cypress tests for custom widgets (#39905) ## Description Updates the specs with new doc structure in custom widget. 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.Widget" ### :mag: 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/14126379520> > Commit: c043c29f610f3f8f5520759ef71a49f772cfdc68 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14126379520&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Widget` > Spec: > <hr>Fri, 28 Mar 2025 11:26:17 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** - Introduced a new text display within the custom widget to showcase the current tip index. - **Refactor** - Enhanced the custom widget’s layout and styling, resulting in a cleaner interface and more consistent appearance for a smoother user experience. - Updated import statements for React and ReactDOM to improve consistency and clarity in the code. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-03-28 12:36:05 +00:00
}
chore: custom widget (#28926) ## Description This PR's adds the custom widget. #### PR fixes following issue(s) Fixes #28607 Fixes #28610 Fixes #28615 Fixes #28608 Fixes #28612 > if no issue exists, please create an issue and ask the maintainers about this first > > #### Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video > > #### Type of change - New feature (non-breaking change which adds functionality) > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [x] Jest - [x] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced search functionality with a wildcard option for unmatched widget searches. - Added new routes for custom widget editing. - Implemented additional editor modes for HTML and CSS. - Created new code templates and help components for custom widget builders. - Enhanced property controls with new button controls for custom widget editing. - Updated theming interfaces and constants for better theming support. - Added the CustomWidget component for embedding custom widgets in iframes. - Expanded widgets library to include the CustomWidget. - **Enhancements** - Improved `CodeEditor` with additional modes, props, and resize behavior. - Enhanced `PropertyPaneControlConfig` interface with dynamic dependencies and additional properties. - Refined custom widget scripts with communication channel and event handling. - **Bug Fixes** - Fixed visibility logic for the `ExternalWidget` card. - **Documentation** - Added new messages and documentation links for custom widget features. - **Tests** - Implemented new Cypress tests for custom widget default components and property pane interactions. - Updated workspace commands in Cypress tests. - **Refactor** - Streamlined `PropertyControl` state management and editing functions. - Refactored code editor hint helper logic. - **Style** - Added `borderLess` prop to style components without borders. - **Chores** - Updated constants and messages related to custom widget features. - Adjusted webpack configuration to ignore specific module warnings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2023-12-28 06:46:28 +00:00
}