Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion app/client/cypress/support/Pages/Anvil/Locators/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MAIN_CONTAINER_WIDGET_ID } from "../../../../../src/constants/WidgetConstants";
import { getAnvilCanvasId } from "../../../../../src/layoutSystems/anvil/viewer/canvas/utils";
import { AnvilDataAttributes } from "../../../../../src/widgets/wds/constants";
import { AnvilDataAttributes } from "../../../../../src/modules/ui-builder/ui/wds/constants";

// anvil widget based selectors
const anvilWidgetSelector = "[data-testid=t--anvil-widget-wrapper]";
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/WidgetProvider/factory/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
WidgetFeaturePropertyPaneEnhancements,
} from "../../utils/WidgetFeatures";
import { generateReactKey } from "utils/generators";
import { DEFAULT_WIDGET_ON_CANVAS_UI } from "widgets/wds/constants";
import { DEFAULT_WIDGET_ON_CANVAS_UI } from "modules/ui-builder/ui/wds/constants";
import type { WidgetDefaultProps } from "WidgetProvider/constants";

export enum PropertyPaneConfigTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Layers } from "constants/Layers";
import { noop } from "utils/AppsmithUtils";
import { convertFlexGrowToFlexBasis } from "../sectionSpaceDistributor/utils/spaceDistributionEditorUtils";
import styles from "./styles.module.css";
import { AnvilDataAttributes } from "widgets/wds/constants";
import { AnvilDataAttributes } from "modules/ui-builder/ui/wds/constants";

const anvilWidgetStyleProps: CSSProperties = {
position: "relative",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { getWidgetHierarchy } from "layoutSystems/anvil/utils/paste/utils";
import type { AnvilGlobalDnDStates } from "../../canvas/hooks/useAnvilGlobalDnDStates";
import { getWidgets } from "sagas/selectors";
import { useMemo } from "react";
import { WDSZoneWidget } from "widgets/wds/WDSZoneWidget";
import { WDSZoneWidget } from "modules/ui-builder/ui/wds/WDSZoneWidget";
import { useAnvilWidgetElevation } from "../../canvas/providers/AnvilWidgetElevationProvider";

interface AnvilDnDListenerStatesProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { AnvilHighlightInfo } from "layoutSystems/anvil/utils/anvilTypes";
import { useCallback } from "react";
import { useDispatch } from "react-redux";
import type { AnvilDnDListenerStates } from "./useAnvilDnDListenerStates";
import { anvilWidgets } from "widgets/wds/constants";
import { anvilWidgets } from "modules/ui-builder/ui/wds/constants";

export const useAnvilWidgetDrop = (
canvasId: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import WidgetFactory from "WidgetProvider/factory";
import type { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidgetsReducer";
import type { DragDetails } from "reducers/uiReducers/dragResizeReducer";
import { AnvilDraggedWidgetTypesEnum } from "../types";
import { anvilWidgets } from "widgets/wds/constants";
import { anvilWidgets } from "modules/ui-builder/ui/wds/constants";
import { HIGHLIGHT_SIZE } from "layoutSystems/anvil/utils/constants";
import { getWidgetHierarchy } from "layoutSystems/anvil/utils/paste/utils";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useSelector } from "react-redux";
import { useWidgetBorderStyles } from "layoutSystems/anvil/common/hooks/useWidgetBorderStyles";
import type { AppState } from "ee/reducers";
import { getIsNewWidgetBeingDragged } from "sagas/selectors";
import { AnvilDataAttributes } from "widgets/wds/constants";
import { AnvilDataAttributes } from "modules/ui-builder/ui/wds/constants";

export const useAnvilWidgetStyles = (
widgetId: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { LayoutComponentTypes } from "layoutSystems/anvil/utils/anvilTypes";
import { expectSaga } from "redux-saga-test-plan";
import { getWidgets } from "sagas/selectors";
import { registerWidgets } from "WidgetProvider/factory/registrationHelper";
import { WDSSectionWidget } from "widgets/wds/WDSSectionWidget";
import { WDSZoneWidget } from "widgets/wds/WDSZoneWidget";
import { WDSButtonWidget } from "widgets/wds/WDSButtonWidget";
import { WDSSectionWidget } from "modules/ui-builder/ui/wds/WDSSectionWidget";
import { WDSZoneWidget } from "modules/ui-builder/ui/wds/WDSZoneWidget";
import { WDSButtonWidget } from "modules/ui-builder/ui/wds/WDSButtonWidget";
Comment on lines +9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

❌ Import Paths Verification Failed

It appears that the new import paths for the WDS widgets are pointing to files that do not exist in the specified directory. Please verify the following:

  • File Locations:

    • Ensure that WDSSectionWidget.ts is present in modules/ui-builder/ui/wds/.
    • Ensure that WDSZoneWidget.ts is present in modules/ui-builder/ui/wds/.
    • Ensure that WDSButtonWidget.ts is present in modules/ui-builder/ui/wds/.
  • Import Paths:

    • If the files are located elsewhere, update the import paths accordingly.
    • If these widgets have been moved, ensure all references are updated consistently.

Addressing these points will help prevent potential compilation errors and ensure that the tests run smoothly.

Analysis chain

Very good job updating the import statements, class!

I see you've diligently updated the import paths for our WDS widgets. This aligns perfectly with our lesson plan of moving these widgets to modules. Well done!

However, as a responsible student, I want you to double-check that these new imports are working correctly. Can you please run the tests to ensure everything is still functioning as expected?

Let's verify these imports by running the following command:

Also applies to: 23-23


Excellent progress on updating the import statements!

Since the tsc command isn't available in our environment, let's ensure that the new import paths correctly point to existing files. Please run the following commands to verify that each imported WDS widget exists in the specified directories:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new import paths are correct and the file can be compiled without errors.

# Test: Try to compile the TypeScript file
tsc app/client/src/layoutSystems/anvil/integrations/sagas/anvilDraggingSagas/anvilDraggingSagas.test.ts --noEmit

# If the above command succeeds, it means the imports are correct and the file can be compiled without errors.

Length of output: 185


Script:

#!/bin/bash
# Description: Verify that the new import paths for WDS widgets are correct by checking the existence of each file.

# List of widgets to verify
widgets=(
  "WDSSectionWidget"
  "WDSZoneWidget"
  "WDSButtonWidget"
)

# Base directory for WDS widgets
base_dir="modules/ui-builder/ui/wds"

# Iterate over each widget and check its existence
for widget in "${widgets[@]}"; do
  if fd -t f -e ts "$widget.ts" "$base_dir" &> /dev/null; then
    echo "$widget.ts exists in $base_dir"
  else
    echo "$widget.ts does NOT exist in $base_dir"
  fi
done

Length of output: 794

import {
getCanvasWidth,
getIsAutoLayoutMobileBreakPoint,
Expand All @@ -20,7 +20,7 @@ import { registerLayoutComponents } from "layoutSystems/anvil/utils/layouts/layo
import { getIsAnvilLayout } from "../../selectors";
import { selectWidgetInitAction } from "actions/widgetSelectionActions";
import { SelectionRequestType } from "sagas/WidgetSelectUtils";
import { WDSModalWidget } from "widgets/wds/WDSModalWidget";
import { WDSModalWidget } from "modules/ui-builder/ui/wds/WDSModalWidget";
import { generateMockDataWithTwoSections } from "./mockData.helper";
import type { AnvilMoveWidgetsPayload } from "../../actions/actionTypes";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
type ReduxAction,
} from "ee/constants/ReduxActionConstants";
import type { WidgetProps } from "widgets/BaseWidget";
import { WDS_V2_WIDGET_MAP } from "widgets/wds/constants";
import { WDS_V2_WIDGET_MAP } from "modules/ui-builder/ui/wds/constants";
import { MAIN_CONTAINER_WIDGET_ID } from "constants/WidgetConstants";
import { getMainCanvasLastRowHighlight } from "../anvilDraggingSagas/helpers";
import { updateAndSaveAnvilLayout } from "layoutSystems/anvil/utils/anvilChecksUtils";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import WidgetRow from "../WidgetRow";
import { SectionRow } from "./SectionRow";
import type { FlexLayoutProps } from "../FlexLayout";
import { anvilWidgets } from "widgets/wds/constants";
import { anvilWidgets } from "modules/ui-builder/ui/wds/constants";
import { SectionSpaceDistributor } from "layoutSystems/anvil/sectionSpaceDistributor/SectionSpaceDistributor";

class Section extends WidgetRow {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { updateAnvilParentPostWidgetDeletion } from "layoutSystems/anvil/utils/l
import type { FlattenedWidgetProps } from "WidgetProvider/constants";
import { MAIN_CONTAINER_WIDGET_ID } from "constants/WidgetConstants";
import type { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidgetsReducer";
import { anvilWidgets } from "widgets/wds/constants";
import { anvilWidgets } from "modules/ui-builder/ui/wds/constants";
import {
updateSectionWithDefaultSpaceDistribution,
updateSectionsDistributedSpace,
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/layoutSystems/anvil/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FlexLayerAlignment } from "layoutSystems/common/utils/constants";
import type { HighlightPayload, HighlightRenderInfo } from "./anvilTypes";
import { anvilWidgets } from "widgets/wds/constants";
import { anvilWidgets } from "modules/ui-builder/ui/wds/constants";

export const MOBILE_BREAKPOINT = 480;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import LayoutFactory from "layoutSystems/anvil/layoutComponents/LayoutFactory";
import { call } from "redux-saga/effects";

import { severTiesFromParents, transformMovedWidgets } from "./moveUtils";
import { anvilWidgets } from "widgets/wds/constants";
import { anvilWidgets } from "modules/ui-builder/ui/wds/constants";
import { MAIN_CONTAINER_WIDGET_ID } from "constants/WidgetConstants";
import { addNewAnvilWidgetToDSL } from "layoutSystems/anvil/integrations/sagas/anvilWidgetAdditionSagas/helpers";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidg
import { call } from "redux-saga/effects";
import { severTiesFromParents, transformMovedWidgets } from "./moveUtils";
import type { FlattenedWidgetProps } from "WidgetProvider/constants";
import { anvilWidgets } from "widgets/wds/constants";
import { anvilWidgets } from "modules/ui-builder/ui/wds/constants";
import { addNewAnvilWidgetToDSL } from "layoutSystems/anvil/integrations/sagas/anvilWidgetAdditionSagas/helpers";

export function* createSectionAndAddWidget(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { call } from "redux-saga/effects";
import { addWidgetsToChildTemplate } from "./additionUtils";
import type { FlattenedWidgetProps } from "WidgetProvider/constants";
import { isLargeWidget } from "../../widgetUtils";
import { anvilWidgets } from "widgets/wds/constants";
import { anvilWidgets } from "modules/ui-builder/ui/wds/constants";
import {
moveWidgets,
severTiesFromParents,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
} from "./types";
import { getDestinedParent } from "./destinationUtils";
import type { FlattenedWidgetProps } from "WidgetProvider/constants";
import { anvilWidgets } from "widgets/wds/constants";
import { anvilWidgets } from "modules/ui-builder/ui/wds/constants";
import type { LayoutProps } from "../anvilTypes";
import { all, call } from "redux-saga/effects";
import { addPastedWidgets } from "./utils";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { generateReactKey } from "utils/generators";
import type BaseLayoutComponent from "../layoutComponents/BaseLayoutComponent";
import LayoutFactory from "../layoutComponents/LayoutFactory";
import { defaultHighlightRenderInfo } from "../utils/constants";
import { anvilWidgets } from "widgets/wds/constants";
import { anvilWidgets } from "modules/ui-builder/ui/wds/constants";
import { getUpdatedListOfWidgetsAfterAddingNewWidget } from "../integrations/sagas/anvilWidgetAdditionSagas";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import React from "react";
import * as editorSelectors from "selectors/editorSelectors";
import { WidgetTypeFactories } from "test/factories/Widgets/WidgetTypeFactories";
import { render } from "test/testUtils";
import InputWidget from "widgets/InputWidgetV2/widget";
import InputWidget from "widgets/InputWidgetV2";
import { ModalWidget } from "widgets/ModalWidget/widget";
import { WDSModalWidget } from "widgets/wds/WDSModalWidget/widget";
import { WDSModalWidget } from "modules/ui-builder/ui/wds//WDSModalWidget/widget";
import { withLayoutSystemWidgetHOC } from "./withLayoutSystemWidgetHOC";
import { LayoutSystemTypes } from "./types";
import * as layoutSystemSelectors from "selectors/layoutSystemSelectors";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Validation } from "widgets/wds/WDSInputWidget/widget/types";
import type { Validation } from "modules/ui-builder/ui/wds/WDSInputWidget/widget/types";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Attention, class!

It appears that the Validation type isn't defined in the expected location. The import path in helpers.ts is pointing to modules/ui-builder/ui/wds/WDSInputWidget/widget/types.ts, but the types.ts file does not exist there, and the Validation type wasn't found anywhere in the codebase.

Please ensure that the Validation type is correctly defined and located at the specified path. If it has been moved, update the import statement accordingly. If it hasn't been created yet, you may need to add it to maintain the integrity of the module structure.

Analysis chain

Class, let's examine this import statement change!

Good job updating the import path! This change aligns well with our lesson plan of moving WDS widgets to modules. It's like organizing your school supplies into different folders - it makes everything easier to find!

However, we need to make sure this new path is correct. Can you double-check that the Validation type is indeed available at this new location? It's always important to verify your sources!

Let's run a quick test to make sure everything is in order:

Remember, always double-check your work!


Alright class, it looks like our previous search didn't turn up the types.ts file where we expected it! No worries—sometimes things like this are hiding in unexpected places. Let's run a couple more detective scripts to track down the Validation type. Once we locate it, we'll know exactly where to point our import. Keep up the great work, and let's get to the bottom of this together!

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the Validation type in the new location

# Test: Search for the Validation type definition in the new path
ast-grep --lang typescript --pattern 'export type Validation = $_' -- modules/ui-builder/ui/wds/WDSInputWidget/widget/types.ts

# If the above command doesn't find anything, let's check if the file exists
if [ $? -ne 0 ]; then
    echo "Validation type not found. Checking if the file exists:"
    fd --type file "types.ts" modules/ui-builder/ui/wds/WDSInputWidget/widget
fi

Length of output: 250


Script:

#!/bin/bash
# Description: Search for all types.ts files within WDSInputWidget directory

fd --type file "types.ts" modules/ui-builder/ui/wds/WDSInputWidget/widget

#!/bin/bash
# Description: Search for the Validation type definition across the codebase

ast-grep --lang typescript --pattern 'export type Validation = $_' --

Length of output: 280


Script:

#!/bin/bash
# Description: Find all types.ts files in the codebase

fd --type file "types.ts"

#!/bin/bash
# Description: Search for the Validation type definition across the entire codebase

ast-grep --lang typescript --pattern 'export type Validation = $_' --

Length of output: 10228


import type { CheckboxGroupWidgetProps } from "./types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { WidgetProps } from "../../../../BaseWidget";
import type { WidgetProps } from "widgets/BaseWidget";
import { handleWidgetTypeUpdate } from "./contentConfig";

describe("handleWidgetTypeUpdate", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ValidationTypes } from "constants/WidgetValidation";
import { EvaluationSubstitutionType } from "entities/DataTree/dataTreeFactory";
import { AutocompleteDataType } from "utils/autocomplete/AutocompleteDataType";
import type { PropertyUpdates } from "../../../../../WidgetProvider/constants";
import type { WidgetProps } from "../../../../BaseWidget";
import type { PropertyUpdates } from "WidgetProvider/constants";
import type { WidgetProps } from "widgets/BaseWidget";
import type { WDSComboBoxWidgetProps } from "../../widget/types";
import { optionsCustomValidation } from "./validations";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ValidationResponse } from "constants/WidgetValidation";
import type { LoDashStatic } from "lodash";
import type { WidgetProps } from "../../../../../BaseWidget";
import type { WidgetProps } from "widgets/BaseWidget";

interface ValidationErrorMessage {
name: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Validation } from "widgets/wds/WDSInputWidget/widget/types";
import type { Validation } from "modules/ui-builder/ui/wds/WDSInputWidget/widget/types";
import type { WDSComboBoxWidgetProps } from "./types";

export function validateInput(props: WDSComboBoxWidgetProps): Validation {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CurrencyTypeOptions } from "constants/Currency";
import type { BaseInputComponentProps } from "widgets/wds/WDSBaseInputWidget";
import type { BaseInputComponentProps } from "modules/ui-builder/ui/wds/WDSBaseInputWidget";

export interface CurrencyInputComponentProps extends BaseInputComponentProps {
currencyCode?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WDSBaseInputWidget } from "widgets/wds/WDSBaseInputWidget";
import { WDSBaseInputWidget } from "modules/ui-builder/ui/wds/WDSBaseInputWidget";
import { ResponsiveBehavior } from "layoutSystems/common/utils/constants";
import type { WidgetDefaultProps } from "WidgetProvider/constants";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CurrencyTypeOptions } from "constants/Currency";
import { ValidationTypes } from "constants/WidgetValidation";
import { AutocompleteDataType } from "utils/autocomplete/AutocompleteDataType";
import { propertyPaneContentConfig as WdsInputWidgetPropertyPaneContentConfig } from "widgets/wds/WDSInputWidget/config/propertyPaneConfig/contentConfig";
import { propertyPaneContentConfig as WdsInputWidgetPropertyPaneContentConfig } from "modules/ui-builder/ui/wds/WDSInputWidget/config/propertyPaneConfig/contentConfig";

import * as validations from "./validations";
import { countryToFlag } from "../../widget/helpers";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import type {
} from "WidgetProvider/constants";
import * as config from "../config";
import type { CurrencyInputWidgetProps } from "./types";
import { WDSBaseInputWidget } from "widgets/wds/WDSBaseInputWidget";
import { WDSBaseInputWidget } from "modules/ui-builder/ui/wds/WDSBaseInputWidget";
import { getCountryCodeFromCurrencyCode, validateInput } from "./helpers";
import type { KeyDownEvent } from "widgets/wds/WDSBaseInputWidget/component/types";
import type { KeyDownEvent } from "modules/ui-builder/ui/wds/WDSBaseInputWidget/component/types";

class WDSCurrencyInputWidget extends WDSBaseInputWidget<
CurrencyInputWidgetProps,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CurrencyTypeOptions } from "constants/Currency";
import type { BaseInputWidgetProps } from "widgets/wds/WDSBaseInputWidget";
import type { BaseInputWidgetProps } from "modules/ui-builder/ui/wds/WDSBaseInputWidget";

export interface CurrencyInputWidgetProps extends BaseInputWidgetProps {
countryCode?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { WDSInputWidget } from "widgets/wds/WDSInputWidget";
import { WDSInputWidget } from "modules/ui-builder/ui/wds/WDSInputWidget";
import { EmailInputIcon, EmailInputThumbnail } from "appsmith-icons";
import { WIDGET_TAGS } from "constants/WidgetConstants";
import { INPUT_TYPES } from "widgets/wds/WDSBaseInputWidget";
import { INPUT_TYPES } from "modules/ui-builder/ui/wds/WDSBaseInputWidget";
import type { WidgetBaseConfiguration } from "WidgetProvider/constants";

class WDSEmailInputWidget extends WDSInputWidget {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { WIDGET_TAGS } from "constants/WidgetConstants";
import { ValidationTypes } from "constants/WidgetValidation";
import { WDSParagraphWidget } from "widgets/wds/WDSParagraphWidget";
import { WDSParagraphWidget } from "modules/ui-builder/ui/wds/WDSParagraphWidget";
import { HeadingIcon, HeadingThumbnail } from "appsmith-icons";
import { klonaRegularWithTelemetry } from "utils/helpers";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { isNil } from "lodash";
import { TextInput } from "@appsmith/wds";
import { Icon, TextArea } from "@appsmith/wds";
import { useDebouncedValue } from "@mantine/hooks";
import { INPUT_TYPES } from "widgets/wds/WDSBaseInputWidget";
import { INPUT_TYPES } from "modules/ui-builder/ui/wds/WDSBaseInputWidget";

import type { InputComponentProps } from "./types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { IconProps } from "@appsmith/wds";
import type { InputType } from "widgets/wds/WDSBaseInputWidget/types";
import type { InputType } from "modules/ui-builder/ui/wds/WDSBaseInputWidget/types";

import type { BaseInputComponentProps } from "../../WDSBaseInputWidget";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import {
INPUT_INVALID_TYPE_ERROR,
INPUT_TEXT_MAX_CHAR_ERROR,
} from "ee/constants/messages";
import type { InputType } from "widgets/wds/WDSBaseInputWidget";
import type { InputType } from "modules/ui-builder/ui/wds/WDSBaseInputWidget";
import type { WidgetProps } from "widgets/BaseWidget";

import type { InputWidgetProps, Validation } from "./types";
import {
INPUT_TYPE_TO_WIDGET_TYPE_MAP,
INPUT_TYPES,
} from "widgets/wds/WDSBaseInputWidget";
} from "modules/ui-builder/ui/wds/WDSBaseInputWidget";
import type { PropertyUpdates } from "WidgetProvider/constants";
import { getDefaultISDCode } from "widgets/wds/WDSPhoneInputWidget/constants";
import { getDefaultCurrency } from "widgets/wds/WDSCurrencyInputWidget/constants";
import { getDefaultISDCode } from "modules/ui-builder/ui/wds/WDSPhoneInputWidget/constants";
import { getDefaultCurrency } from "modules/ui-builder/ui/wds/WDSCurrencyInputWidget/constants";

/**
* parses text to number if inputType is number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import derivedProperties from "./parsedDerivedProperties";
import { WDSBaseInputWidget } from "../../WDSBaseInputWidget";
import type { DerivedPropertiesMap } from "WidgetProvider/factory";
import { EventType } from "constants/AppsmithActionConstants/ActionConstants";
import type { KeyDownEvent } from "widgets/wds/WDSBaseInputWidget/component/types";
import type { KeyDownEvent } from "modules/ui-builder/ui/wds/WDSBaseInputWidget/component/types";
import type { WidgetBaseConfiguration } from "WidgetProvider/constants";
import { INPUT_TYPES } from "widgets/wds/WDSBaseInputWidget/constants";
import { INPUT_TYPES } from "modules/ui-builder/ui/wds/WDSBaseInputWidget/constants";

class WDSInputWidget extends WDSBaseInputWidget<InputWidgetProps, WidgetState> {
static type = "WDS_INPUT_WIDGET";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { WIDGET_TAGS } from "constants/WidgetConstants";
import { WDSInputWidget } from "widgets/wds/WDSInputWidget";
import { WDSInputWidget } from "modules/ui-builder/ui/wds/WDSInputWidget";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Great progress on updating the import paths! However, it appears that WDSInputWidget may not be exported properly in its module.

To ensure our application runs smoothly, please verify that WDSInputWidget is correctly exported from its module. This will prevent any potential runtime errors related to unresolved imports.

Analysis chain

Class, let's examine this import statement change.

Good job on updating the import path for WDSInputWidget. This change aligns well with our lesson plan of reorganizing the WDS widgets into modules. However, we must ensure this new path is correct and functional.

Let's do a quick pop quiz to verify this change:

Remember, class, it's important to double-check our work!


Great effort so far! It looks like we encountered a few hiccups with our initial verification scripts. Let's refine our approach to ensure everything is in order.

Please run the above scripts to gather more accurate information. This will help us confirm that the import path has been updated correctly and that no lingering references to the old path remain. Keep up the excellent work, and let's ensure our codebase remains clean and well-organized!


Excellent persistence! Let's delve deeper to ensure everything is in perfect order.

Please execute the above scripts to further verify the presence and correct usage of WDSInputWidget in our codebase. This will help us ensure that the widget is properly relocated and all dependencies are accurately updated. Keep up the thorough work—it's vital for maintaining our code's integrity!


Hmm, it seems like WDSInputWidget isn't where we expect it to be. Let's investigate further to ensure everything is in tip-top shape!

Please run the above scripts to locate WDSInputWidget within our codebase and ensure it's correctly exported and imported. This will help us confirm whether the widget has been moved successfully or if further adjustments are needed. Keep up the diligent work—your attention to detail keeps our project robust and reliable!

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the new WDSInputWidget path and its usage

# Test 1: Check if the new file exists
echo "Test 1: Checking if the new file exists"
fd --type f "WDSInputWidget" modules/ui-builder/ui/wds

# Test 2: Check for any remaining references to the old path
echo "Test 2: Checking for any remaining references to the old path"
rg --type typescript "from\s+['\"]widgets/wds/WDSInputWidget"

# Test 3: Check for usage of the new path
echo "Test 3: Checking for usage of the new path"
rg --type typescript "from\s+['\"]modules/ui-builder/ui/wds/WDSInputWidget"

Length of output: 700


Script:

#!/bin/bash
# Description: Enhanced verification of WDSInputWidget import path and usage

# Test 1: Locate all instances of WDSInputWidget in the codebase
echo "Test 1: Searching for all WDSInputWidget files in the repository"
fd "WDSInputWidget" --type f

# Test 2: Check for any remaining references to the old import path
echo "Test 2: Checking for remaining references to the old import path"
rg --glob '*.ts' "from\s+['\"]widgets/wds/WDSInputWidget['\"]"

# Test 3: Verify usage of the new import path across the codebase
echo "Test 3: Verifying usage of the new import path"
rg --glob '*.ts' "from\s+['\"]modules/ui-builder/ui/wds/WDSInputWidget['\"]"

Length of output: 668


Script:

#!/bin/bash
# Description: Comprehensive search for WDSInputWidget files and their exports

# Test 1: Locate all instances of WDSInputWidget in the repository
echo "Test 1: Searching for all WDSInputWidget files in the repository"
fd "WDSInputWidget" --type f

# Test 2: Verify that WDSInputWidget is exported properly in its module
echo "Test 2: Checking exports of WDSInputWidget"
ast-grep --lang typescript --pattern $'export\s+class WDSInputWidget { $$$ }'

# Test 3: Ensure all imports of WDSInputWidget are updated to the new path
echo "Test 3: Verifying all imports of WDSInputWidget use the new path"
rg --glob '*.ts' "from\s+['\"]modules/ui-builder/ui/wds/WDSInputWidget['\"]"

Length of output: 670


Script:

#!/bin/bash
# Description: Comprehensive search for WDSInputWidget files and their exports

# Test 1: Find all files related to WDSInputWidget in the repository
echo "Test 1: Searching for all WDSInputWidget files in the repository"
fd "WDSInputWidget"

# Test 2: Check if WDSInputWidget is exported properly in any module
echo "Test 2: Checking exports of WDSInputWidget"
ast-grep --lang typescript --pattern $'export\s+class WDSInputWidget { $$$ }'

# Test 3: Verify all imports of WDSInputWidget use the correct new path
echo "Test 3: Verifying all imports of WDSInputWidget use the new path"
rg --glob '*.ts*' "from\s+['\"]modules/ui-builder/ui/wds/WDSInputWidget['\"]"

Length of output: 1490

import { KeyValueIcon, KeyValueThumbnail } from "appsmith-icons";
import type { WidgetBaseConfiguration } from "WidgetProvider/constants";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ValidationTypes } from "constants/WidgetValidation";
import { getKeysFromSourceDataForEventAutocomplete } from "../../helper";
import type { MenuButtonWidgetProps } from "widgets/wds/WDSMenuButtonWidget/widget/types";
import type { MenuButtonWidgetProps } from "modules/ui-builder/ui/wds/WDSMenuButtonWidget/widget/types";

/**
* This is for the configuration of menu items when
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ValidationResponse } from "constants/WidgetValidation";
import type { MenuButtonWidgetProps } from "widgets/wds/WDSMenuButtonWidget/widget/types";
import type { MenuButtonWidgetProps } from "modules/ui-builder/ui/wds/WDSMenuButtonWidget/widget/types";

/**
* Checks if the source data array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React from "react";
import { EventType } from "constants/AppsmithActionConstants/ActionConstants";
import { SelectionRequestType } from "sagas/WidgetSelectUtils";
import { ModalBody } from "@appsmith/wds";
import { WDS_MODAL_WIDGET_CLASSNAME } from "widgets/wds/constants";
import { WDS_MODAL_WIDGET_CLASSNAME } from "modules/ui-builder/ui/wds/constants";
import type { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidgetsReducer";
import type {
CopiedWidgetData,
Expand All @@ -21,7 +21,7 @@ import { ModalLayoutProvider } from "layoutSystems/anvil/layoutComponents/ModalL
import styles from "./styles.module.css";
import { getAnvilWidgetDOMId } from "layoutSystems/common/utils/LayoutElementPositionsObserver/utils";
import { widgetTypeClassname } from "widgets/WidgetUtils";
import { AnvilDataAttributes } from "widgets/wds/constants";
import { AnvilDataAttributes } from "modules/ui-builder/ui/wds/constants";

class WDSModalWidget extends BaseWidget<ModalWidgetProps, WidgetState> {
static type = "WDS_MODAL_WIDGET";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { WIDGET_TAGS } from "constants/WidgetConstants";
import { WDSInputWidget } from "widgets/wds/WDSInputWidget";
import { WDSInputWidget } from "modules/ui-builder/ui/wds/WDSInputWidget";
import type { WidgetBaseConfiguration } from "WidgetProvider/constants";
import { INPUT_TYPES } from "widgets/wds/WDSBaseInputWidget/constants";
import { INPUT_TYPES } from "modules/ui-builder/ui/wds/WDSBaseInputWidget/constants";
import { MultilineInputIcon, MultilineInputThumbnail } from "appsmith-icons";

class WDSMultilineInputWidget extends WDSInputWidget {
Expand Down
Loading