-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description https://github.com/user-attachments/assets/7516bcd8-7746-485a-a49d-bd19b22833d0 Fixes #35824 > [!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.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10663955895> > Commit: 58d40f7 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10663955895&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Mon, 02 Sep 2024 10:15:26 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Introduced the `WDSSelectWidget`, enhancing widget options within the application. - Added configuration files to support autocomplete, validation, and property management for the new select widget. - Added new icons and thumbnails for input fields, improving UI component availability. - **Improvements** - Streamlined the `Select` component for better usability and clarity. - Enhanced type definitions for better type safety and clarity in widget configuration. - Improved SVG structures for icons and thumbnails, enhancing visual representation. - Adjusted styles for the `Select` component, ensuring consistent sizing and improved icon alignment. - **Documentation** - Added central export for configuration modules, simplifying access to widget settings. - Updated stories to include new icons and thumbnails, enriching documentation resources. - **Bug Fixes** - Improved validation logic for default options and custom options to ensure data integrity. - **Chores** - Reorganized import statements for better readability and maintainability across widget files. - Updated TypeScript configuration for improved module handling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: vadim <[email protected]> Co-authored-by: Pawan Kumar <[email protected]>
- Loading branch information
1 parent
e501413
commit bd8c0de
Showing
26 changed files
with
1,029 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
app/client/packages/design-system/widgets/src/components/Select/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from "./Select"; | ||
export type { SelectProps } from "./types"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
app/client/src/widgets/wds/WDSSelectWidget/config/anvilConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { AnvilConfig } from "WidgetProvider/constants"; | ||
|
||
export const anvilConfig: AnvilConfig = { | ||
isLargeWidget: false, | ||
widgetSize: { | ||
minWidth: { | ||
base: "100%", | ||
"180px": "sizing-30", | ||
}, | ||
}, | ||
}; |
11 changes: 11 additions & 0 deletions
11
app/client/src/widgets/wds/WDSSelectWidget/config/autocompleteConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { DefaultAutocompleteDefinitions } from "widgets/WidgetUtils"; | ||
|
||
export const autocompleteConfig = { | ||
"!doc": | ||
"Select widget lets the user choose one option from a dropdown list. It is similar to a SingleSelect Dropdown in its functionality", | ||
"!url": "https://docs.appsmith.com/widget-reference/radio", | ||
isVisible: DefaultAutocompleteDefinitions.isVisible, | ||
options: "[$__dropdownOption__$]", | ||
selectedOptionValue: "string", | ||
isRequired: "bool", | ||
}; |
20 changes: 20 additions & 0 deletions
20
app/client/src/widgets/wds/WDSSelectWidget/config/defaultsConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { ResponsiveBehavior } from "layoutSystems/common/utils/constants"; | ||
import type { WidgetDefaultProps } from "WidgetProvider/constants"; | ||
|
||
export const defaultsConfig = { | ||
animateLoading: true, | ||
label: "Label", | ||
options: [ | ||
{ label: "Option 1", value: "1" }, | ||
{ label: "Option 2", value: "2" }, | ||
{ label: "Option 3", value: "3" }, | ||
], | ||
defaultOptionValue: "", | ||
isRequired: false, | ||
isDisabled: false, | ||
isVisible: true, | ||
isInline: false, | ||
widgetName: "Select", | ||
version: 1, | ||
responsiveBehavior: ResponsiveBehavior.Fill, | ||
} as unknown as WidgetDefaultProps; |
6 changes: 6 additions & 0 deletions
6
app/client/src/widgets/wds/WDSSelectWidget/config/featuresConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export const featuresConfig = { | ||
dynamicHeight: { | ||
sectionIndex: 3, | ||
active: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export * from "./propertyPaneConfig"; | ||
export { metaConfig } from "./metaConfig"; | ||
export { anvilConfig } from "./anvilConfig"; | ||
export { defaultsConfig } from "./defaultsConfig"; | ||
export { settersConfig } from "./settersConfig"; | ||
export { methodsConfig } from "./methodsConfig"; | ||
export { autocompleteConfig } from "./autocompleteConfig"; |
8 changes: 8 additions & 0 deletions
8
app/client/src/widgets/wds/WDSSelectWidget/config/metaConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { WIDGET_TAGS } from "constants/WidgetConstants"; | ||
|
||
export const metaConfig = { | ||
name: "Select", | ||
tags: [WIDGET_TAGS.SELECT], | ||
needsMeta: true, | ||
searchTags: ["choice", "option", "choose", "pick", "select", "dropdown"], | ||
}; |
21 changes: 21 additions & 0 deletions
21
app/client/src/widgets/wds/WDSSelectWidget/config/methodsConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { | ||
PropertyUpdates, | ||
SnipingModeProperty, | ||
} from "WidgetProvider/constants"; | ||
import { RadioGroupIcon, SelectThumbnail } from "appsmith-icons"; | ||
|
||
export const methodsConfig = { | ||
getSnipingModeUpdates: ( | ||
propValueMap: SnipingModeProperty, | ||
): PropertyUpdates[] => { | ||
return [ | ||
{ | ||
propertyPath: "options", | ||
propertyValue: propValueMap.data, | ||
isDynamicPropertyPath: true, | ||
}, | ||
]; | ||
}, | ||
IconCmp: RadioGroupIcon, | ||
ThumbnailCmp: SelectThumbnail, | ||
}; |
Oops, something went wrong.