Skip to content
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

fix: Phone Input and Input widget not getting reset on submit issue #10860

Merged
merged 3 commits into from
Feb 9, 2022

Conversation

sbalaji1192
Copy link
Contributor

@sbalaji1192 sbalaji1192 commented Feb 3, 2022

Fixes #10859

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce.
Please also list any relevant details for your test configuration.

  • Test A
  • Test B

Checklist:

  • 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

Test coverage results 🧪

🟢 Total coverage has increased
// Code coverage diff between base branch:release and head branch: fix/phone-input-widget-reset 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 54.99 (0) 36.33 (0.02) 34.68 (0) 55.37 (0)
🟢 app/client/src/utils/autocomplete/TernServer.ts 52.94 (0.23) 41.67 (0.84) 36.21 (0) 56.99 (0.25)
🔴 app/client/src/widgets/BaseInputWidget/widget/index.tsx 65 (-5.27) 6.25 (-1.44) 66.67 (0) 68.42 (-5.87)
🟢 app/client/src/widgets/CurrencyInputWidget/widget/index.tsx 46.73 (3.25) 20 (3.93) 40 (2.5) 46.67 (2.53)

@vercel
Copy link

vercel bot commented Feb 3, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/get-appsmith/appsmith/6AopY7y3QHRYkZ2PG4RdvEF6QzU6
✅ Preview: https://appsmith-git-fix-phone-input-widget-reset-get-appsmith.vercel.app

@github-actions github-actions bot added the Bug Something isn't working label Feb 3, 2022
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

Unable to find test scripts. Please add necessary tests to the PR.

5 similar comments
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

Unable to find test scripts. Please add necessary tests to the PR.

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

Unable to find test scripts. Please add necessary tests to the PR.

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

Unable to find test scripts. Please add necessary tests to the PR.

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

Unable to find test scripts. Please add necessary tests to the PR.

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

Unable to find test scripts. Please add necessary tests to the PR.

@shwetha-ramesh
Copy link

@sbalaji1192 Tested this PR. DP is working fine.
Moving to Done.

@sbalaji1192
Copy link
Contributor Author

@shwetha-ramesh Could test this again, I have made some changes related to resetting value and isDirty.

@sbalaji1192
Copy link
Contributor Author

/ok-to-test sha=1ff56f1

@github-actions
Copy link

github-actions bot commented Feb 7, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1807898106.
Workflow: Appsmith External Integration Test Workflow.
Commit: 1ff56f1.
PR: 10860.

@github-actions
Copy link

github-actions bot commented Feb 7, 2022

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/1807898106.
Commit: 1ff56f1.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
Click on table row
scripting 2752.14 2202.66 2153.45 2196.29 2159.43 2196.29 2292.79 11.24 10.05
painting 21.4 14.82 12.37 11.13 13.15 13.15 14.57 27.73 24.85
rendering 367.93 319.96 246.21 296.8 248.2 296.8 295.82 17.33 15.50
Edit input
scripting 300.21 300.5 322.46 312.55 391.82 312.55 325.51 11.74 10.50
painting 15.99 6.27 14.89 6.52 14.07 14.07 11.55 41.13 36.80
rendering 11.72 17.96 21.63 17.25 18.23 17.96 17.36 20.62 18.43
Clear input
scripting 745.42 706.63 751.86 738.19 760.76 745.42 740.57 2.80 2.50
painting 5.55 6.54 7.2 5.89 11.09 6.54 7.25 30.90 27.59
rendering 189.69 176.94 171.53 183.58 180.43 180.43 180.43 3.79 3.39
Edit input again
scripting 320.28 271 321.29 304.3 264.94 304.3 296.36 9.07 8.11
painting 5 6 6.48 5.15 4.78 5.15 5.48 13.14 11.86
rendering 19.39 20.63 19.01 18.82 21.96 19.39 19.96 6.61 5.91

@shwetha-ramesh
Copy link

@sbalaji1192 tested this PR, observed this issue on all 3 input widgets.

On initial drag and drop the input widget doesn't clear the input when Reset on submit is ON and OnSubmit is No action. Later you add a Onsubmit action enter the input on the widget and click on enter the input gets cleared. Now clear the OnSubmit action to No action and enter any input and observe the input on the widget gets cleared.

https://loom.com/share/383c13e15b3c4dee87a13aaf378e83cb

@sbalaji1192
Copy link
Contributor Author

@shwetha-ramesh Fixed your callout. please check again

@shwetha-ramesh
Copy link

@sbalaji1192 tested this PR. DP working fine.
Moving to Done.

@sbalaji1192
Copy link
Contributor Author

/ok-to-test sha=6491580

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1816049421.
Workflow: Appsmith External Integration Test Workflow.
Commit: 6491580.
PR: 10860.

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/1816049421.
Commit: 6491580.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
Click on table row
scripting 3120.31 2494.89 2651.84 2471.93 2486.28 2494.89 2645.05 10.42 9.32
painting 61.18 18.95 19.8 13.21 22.96 19.8 27.22 70.94 63.45
rendering 426.19 339.11 301.04 310.1 304.22 310.1 336.13 15.63 13.98
Edit input
scripting 364.63 341.43 329.25 358.35 331.17 341.43 344.97 4.62 4.13
painting 20.26 15.37 24.44 30.54 13.1 20.26 20.74 33.85 30.28
rendering 16.65 22.72 13.98 16.87 14.11 16.65 16.87 20.98 18.79
Clear input
scripting 1178.27 833.43 874.15 861.65 846.54 861.65 918.81 15.87 14.20
painting 11.76 9.7 6.76 9.28 6 9.28 8.7 26.78 24.02
rendering 204.6 218.7 222.09 219.73 216.93 218.7 216.41 3.17 2.84
Edit input again
scripting 357.69 347.21 369.3 291.75 315.64 347.21 336.32 9.49 8.49
painting 10.98 8.59 6.49 6.74 5.09 6.74 7.58 29.95 26.78
rendering 22.27 26.81 22.24 18.45 22.98 22.27 22.55 13.17 11.80

@sbalaji1192 sbalaji1192 merged commit 8f383ca into release Feb 9, 2022
@sbalaji1192 sbalaji1192 deleted the fix/phone-input-widget-reset branch February 9, 2022 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: reset on submit is not working for input and phone input widgets on enter
3 participants