## Description Grouping the widgets into categories to make it easier for people to find widgets. This will be behind the feature flag `release_widgetdiscovery_enabled` <img src="https://github.com/appsmithorg/appsmith/assets/22471214/4932a091-1831-4d95-b722-3301580fb6be" height="300px" /> Project home [here on Notion](https://www.notion.so/appsmith/Widget-Discoverability-755cf059a1904950888304b90b74106f?d=8bc3059134984787900a69963dd13d90#27967092cfa74505bab55bd163d28c18). #### PR fixes following issue(s) #24865 #24867 #24868 #24869 #### 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 > Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - Chore (housekeeping or task changes that don't impact user perception) - This change requires a documentation update > > > ## 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 - [x] Manual - [ ] Jest - [x] Cypress > > #### Test Plan > (https://github.com/appsmithorg/TestSmith/issues/2440) > > #### 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 - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] 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 - [x] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [x] Test plan has been peer reviewed by project stakeholders and other QA members - [x] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [x] 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
72 lines
2.0 KiB
TypeScript
72 lines
2.0 KiB
TypeScript
import { FILL_WIDGET_MIN_WIDTH } from "constants/minWidthConstants";
|
|
import { ResponsiveBehavior } from "utils/autoLayout/constants";
|
|
import { dataSetForWorld, MapTypes } from "./constants";
|
|
import IconSVG from "./icon.svg";
|
|
import Widget from "./widget";
|
|
import { WIDGET_TAGS } from "constants/WidgetConstants";
|
|
|
|
export const CONFIG = {
|
|
type: Widget.getWidgetType(),
|
|
name: "Map Chart", // The display name which will be made in uppercase and show in the widgets panel ( can have spaces )
|
|
iconSVG: IconSVG,
|
|
tags: [WIDGET_TAGS.DISPLAY],
|
|
needsMeta: true, // Defines if this widget adds any meta properties
|
|
isCanvas: false, // Defines if this widget has a canvas within in which we can drop other widgets
|
|
searchTags: ["graph", "visuals", "visualisations"],
|
|
defaults: {
|
|
rows: 32,
|
|
columns: 24,
|
|
widgetName: "MapChart",
|
|
version: 1,
|
|
mapType: MapTypes.WORLD,
|
|
mapTitle: "Global Population",
|
|
showLabels: true,
|
|
data: dataSetForWorld,
|
|
colorRange: [
|
|
{
|
|
minValue: 0.5,
|
|
maxValue: 1.0,
|
|
code: "#FFD74D",
|
|
},
|
|
{
|
|
minValue: 1.0,
|
|
maxValue: 2.0,
|
|
code: "#FB8C00",
|
|
},
|
|
{
|
|
minValue: 2.0,
|
|
maxValue: 3.0,
|
|
code: "#E65100",
|
|
},
|
|
],
|
|
responsiveBehavior: ResponsiveBehavior.Fill,
|
|
minWidth: FILL_WIDGET_MIN_WIDTH,
|
|
},
|
|
properties: {
|
|
derived: Widget.getDerivedPropertiesMap(),
|
|
default: Widget.getDefaultPropertiesMap(),
|
|
meta: Widget.getMetaPropertiesMap(),
|
|
config: Widget.getPropertyPaneConfig(),
|
|
contentConfig: Widget.getPropertyPaneContentConfig(),
|
|
styleConfig: Widget.getPropertyPaneStyleConfig(),
|
|
stylesheetConfig: Widget.getStylesheetConfig(),
|
|
setterConfig: Widget.getSetterConfig(),
|
|
autocompleteDefinitions: Widget.getAutocompleteDefinitions(),
|
|
},
|
|
autoLayout: {
|
|
widgetSize: [
|
|
{
|
|
viewportMinWidth: 0,
|
|
configuration: () => {
|
|
return {
|
|
minWidth: "280px",
|
|
minHeight: "300px",
|
|
};
|
|
},
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
export default Widget;
|