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

feat: Provide option in phone input widget to turn off auto formatting #10832

Merged
merged 3 commits into from
Feb 11, 2022

Conversation

sbalaji1192
Copy link
Contributor

@sbalaji1192 sbalaji1192 commented Feb 2, 2022

Description

Fixes #10806

Type of change

  • New feature (non-breaking change which adds functionality)

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: feat/phone-input-formatting 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 55.06 (0) 36.39 (0) 34.71 (0.01) 55.43 (0)
🟢 app/client/src/utils/DSLMigrations.ts 73.27 (0.15) 69.33 (-0.06) 71.13 (0) 73.08 (0.16)
🔴 app/client/src/utils/autocomplete/TernServer.ts 52.71 (-0.23) 40.83 (-0.84) 36.21 (0) 56.74 (-0.25)
✨ 🆕 app/client/src/utils/migrations/PhoneInputWidgetMigrations.ts 100 90 100 100
🔴 app/client/src/widgets/PhoneInputWidget/widget/index.tsx 40.63 (-5.15) 6.52 (-1.81) 42.86 (-3.29) 40.43 (-5.25)

@vercel
Copy link

vercel bot commented Feb 2, 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/4GU4jc5mb239HaqRAvbGs1LFq2m7
✅ Preview: https://appsmith-git-feat-phone-input-formatting-get-appsmith.vercel.app

@sbalaji1192
Copy link
Contributor Author

/ok-to-test sha=186266c

@github-actions github-actions bot added the Enhancement New feature or request label Feb 2, 2022
@github-actions
Copy link

github-actions bot commented Feb 2, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1784288149.
Workflow: Appsmith External Integration Test Workflow.
Commit: 186266c.
PR: 10832.

@github-actions
Copy link

github-actions bot commented Feb 2, 2022

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/1784288149.
Commit: 186266c.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Mean SD.Sample SD.Population
Click on table row
scripting 2716.66 2167.15 2234.58 2181.81 2152.24 2290.49 10.49 9.38
painting 53.38 12.3 10.56 16.23 23.46 23.19 75.85 67.87
rendering 407.8 255.99 318.07 282.1 269.86 306.76 19.89 17.79
Edit input
scripting 320.54 292.98 308.11 299.64 288.33 301.92 4.24 3.79
painting 4.21 21.41 4.64 4.72 5.48 8.09 92.21 82.45
rendering 16.17 15.95 14.74 20.69 13.99 16.31 16.00 14.29
Clear input
scripting 819.02 812.44 786.15 790.52 762.29 794.08 2.85 2.55
painting 12.53 7.49 5.38 9.31 7.87 8.52 31.10 27.82
rendering 197.19 183.38 194.11 193.67 182.2 190.11 3.59 3.21
Edit input again
scripting 294.89 286.28 288.8 311.08 312.59 298.73 4.14 3.71
painting 5.12 4.51 23.52 5.48 14.22 10.57 78.24 69.91
rendering 19.82 18.05 23.76 19.95 19.67 20.25 10.42 9.33

@shwetha-ramesh
Copy link

@sbalaji1192 tested this PR. DP looks good
image

Moving to Done

@@ -121,26 +135,40 @@ class PhoneInputWidget extends BaseInputWidget<
}

static getDerivedPropertiesMap(): DerivedPropertiesMap {
return _.merge(super.getDerivedPropertiesMap(), {
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to remove the merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

value is not a derived property anymore. super.getDerivedPropertiesMap() returns {value: "{{this.text}}" so removed it.

@shwetha-ramesh
Copy link

@sbalaji1192 Retested this PR for #10806 & #10859. Everything is working good. Tested for migration too. Nothing seems to break.
Moving to Done.

@sbalaji1192
Copy link
Contributor Author

/ok-to-test sha=a0a067c

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1823530599.
Workflow: Appsmith External Integration Test Workflow.
Commit: a0a067c.
PR: 10832.

@github-actions
Copy link

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

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
Select category
scripting 3571.81 1500.65 3400.83 1604.45 1532.22 1604.45 2321.99 45.88 41.03
painting 27.16 9.85 31.99 29.05 12.84 27.16 22.18 45.49 40.71
rendering 894 1140.94 1247.68 952.89 1038.2 1038.2 1054.74 13.50 12.08
Bind table data
scripting 1839.51 1564.8 2380.5 1628.62 1882.45 1839.51 1859.18 17.27 15.45
painting 47.95 64.64 32.79 37.55 24.15 37.55 41.42 37.59 33.61
rendering 663.03 815.03 752.46 836.61 638.92 752.46 741.21 11.93 10.67
Click on table #comments
scripting 3196.84 2405.01 3036.3 2429.14 3363.29 3036.3 2886.12 15.37 13.75
painting 22.68 20.23 25.28 17.83 15.19 20.23 20.24 19.57 17.49
rendering 603.02 495.92 470.1 427.1 384.75 470.1 476.18 17.34 15.51
Update title
scripting 7747.84 7485.3 7405.06 6674.65 7401.52 7405.06 7342.87 5.44 4.87
painting 102.58 60.99 71.56 64.92 96.65 71.56 79.34 23.96 21.43
rendering 2209.6 2216.66 2315.48 1950.75 2231.57 2216.66 2184.81 6.30 5.63
Open modal
scripting 1886.07 1920.56 4092.49 2029.38 1908.65 1920.56 2367.43 40.80 36.49
painting 39.3 31.77 60.77 39.21 43.56 39.3 42.92 25.26 22.60
rendering 736.55 784.83 833.06 870.7 690.92 784.83 783.21 9.21 8.24
Close modal
scripting 1464.57 1063.51 1194.18 1269 996.26 1194.18 1197.5 15.34 13.72
painting 19.85 17.4 10.26 12.42 12.32 12.42 14.45 27.68 24.78
rendering 714.63 705.42 810.42 762.94 690.18 714.63 736.72 6.70 6.00
Click on table row
scripting 2399.48 2322.25 2375.69 2431.87 2288.9 2375.69 2363.64 2.45 2.19
painting 8.35 10.06 10.18 20.7 23.3 10.18 14.52 47.73 42.70
rendering 330.86 304.38 331.43 332.17 348.2 331.43 329.41 4.78 4.28
Edit input
scripting 319.12 391.46 452.07 413.83 1479.1 413.83 611.12 79.79 71.37
painting 22.47 21.92 21.92 16.86 14.77 21.92 19.59 18.02 16.13
rendering 13.72 15.37 16.64 18.82 14.92 15.37 15.89 12.21 10.95
Clear input
scripting 765 879.71 847.63 797.77 987.08 847.63 855.44 10.04 8.98
painting 19.61 18.78 7.17 7.76 7.25 7.76 12.11 53.43 47.81
rendering 208.68 253.37 258.29 218.46 222.41 222.41 232.24 9.55 8.54
Edit input again
scripting 337.34 330.57 321.59 341.39 303.05 330.57 326.79 4.66 4.17
painting 5.82 7.79 5.08 13.13 6.6 6.6 7.68 41.80 37.37
rendering 28.1 27.43 19.78 21.31 20.07 21.31 23.34 17.52 15.68

@sbalaji1192 sbalaji1192 merged commit 85cc3f3 into release Feb 11, 2022
@sbalaji1192 sbalaji1192 deleted the feat/phone-input-formatting branch February 11, 2022 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: [Enhancement] Provide option to opt out of phone number formatting in phone Input widget
3 participants