-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [APPSMTH-29] make step up/down arrows in input Number and Currency widgets optional #18764
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
): DSLWidget => { | ||
return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { | ||
if ( | ||
widget.showStepArrows === undefined && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's swap the operand positions of and
condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this function to the CurrencyInputWidgetMigrations.test.ts
file?
@@ -6,3 +6,9 @@ export enum InputTypes { | |||
PASSWORD = "PASSWORD", | |||
CURRENCY = "CURRENCY", | |||
} | |||
|
|||
export enum ButtonPosition { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please rename this to NumberInputStepButtonPosition. ButtonPosition seems to be misleading.
@@ -430,6 +431,12 @@ class CurrencyInputWidget extends BaseInputWidget< | |||
conditionalProps.errorMessage = createMessage(FIELD_REQUIRED_ERROR); | |||
} | |||
|
|||
if (Boolean(this.props.showStepArrows)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for boolean call.
|
||
if ( | ||
this.props.inputType === InputTypes.NUMBER && | ||
Boolean(this.props.showStepArrows) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for boolean call.
cy.get(widgetsPage.toggleShowStepArrows).click({ force: true }); | ||
|
||
// Add showStepArrows action and value as false | ||
cy.testJsontext("showsteparrows", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it should be cy.testJsontext("showsteparrows", {{false}});
|
||
it("4. Toggle test case to validate that currency input widget, stepArrows should be visible when toggle value is true", () => { | ||
// Add showStepArrows action and value as true | ||
cy.testJsontext("showsteparrows", true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it should be cy.testJsontext("showsteparrows", {{true}});
cy.get(widgetsPage.toggleShowStepArrows).click({ force: true }); | ||
|
||
// Add showStepArrows action and value as false | ||
cy.testJsontext("showsteparrows", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
|
||
it("4. Toggle test case to validate that dataType - NUMBER, stepArrows should be visible when toggle value is true", () => { | ||
// Add showStepArrows action and add value as true | ||
cy.testJsontext("showsteparrows", true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
Apologies for delay in responding, we wanted to QA the code and avoid regression on our end. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good! Could you rebase the branch as there are some conflicts
Tested and verified this PR for step up/down arrows being optional for input widget (number) and currency input widget:
|
/ok-to-test sha=d1477ef |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3738088942. |
Thanks @laveena-en i will take a look at it |
/ok-to-test sha=3b3f709 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3746941550. |
The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js |
1 similar comment
The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js |
/ok-to-test sha=2de3c10 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3749291777. |
The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/ButtonGroup_binding_spec.js |
Description
This PR makes step up/down arrows optional in
NB: This would require updating the Appsmith Documentation
Fixes #18041
Type of change
How Has This Been Tested?
Checklist: