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: checkbox, switch property fields update, migration added #13997

Merged
merged 2 commits into from
May 25, 2022

Conversation

techbhavin
Copy link
Contributor

@techbhavin techbhavin commented May 21, 2022

Description

In switch and checkbox add a property of position,alignment, label color, size, and font style and add migration for the same

Fixes #13586

Type of change

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

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented on 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/issue-13586 
Status File % Stmts % Branch % Funcs % Lines
🟒 total 56.66 (0.04) 38.7 (0.07) 35.99 (0.05) 56.91 (0.04)
🟒 app/client/src/components/editorComponents/ErrorBoundry.tsx 95.45 (18.18) 100 (12.5) 85.71 (42.85) 95 (20)
🟒 app/client/src/utils/DSLMigrations.ts 73.97 (0.14) 69.7 (-0.06) 71.13 (0) 73.87 (0.15)
πŸ”΄ app/client/src/utils/WorkerUtil.ts 88.98 (-0.78) 70.59 (-1.96) 100 (0) 92.38 (-0.95)
✨ πŸ†• app/client/src/utils/migrations/PropertyPaneMigrations.ts 86.67 85.71 100 85.71
🟒 app/client/src/widgets/CheckboxWidget/component/index.tsx 96.36 (0.8) 70.49 (1.26) 93.75 (0.89) 95 (0.71)
🟒 app/client/src/widgets/CheckboxWidget/widget/index.tsx 87.1 (0.89) 44.44 (0) 88.89 (0) 86.21 (1.02)
🟒 app/client/src/widgets/JSONFormWidget/fields/CheckboxField.tsx 42.86 (1.4) 11.11 (0) 0 (0) 46.15 (1.41)
🟒 app/client/src/widgets/JSONFormWidget/fields/SwitchField.tsx 42.11 (1.57) 0 (0) 0 (0) 44.44 (1.58)
🟒 app/client/src/widgets/SwitchWidget/component/index.tsx 97.44 (1.61) 71.88 (1.88) 85.71 (5.71) 96.77 (1.53)
🟒 app/client/src/widgets/SwitchWidget/widget/index.tsx 87.1 (0.89) 44.44 (-1.01) 88.89 (0) 86.21 (1.02)

@techbhavin techbhavin requested a review from jsartisan May 21, 2022 07:23
@vercel
Copy link

vercel bot commented May 21, 2022

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated
appsmith βœ… Ready (Inspect) Visit Preview May 23, 2022 at 3:51PM (UTC)

@github-actions github-actions bot added App Viewers Pod This label assigns issues to the app viewers pod Checkbox Widget Enhancement New feature or request Medium Issues that frustrate users due to poor UX Switch widget The switch widget UI Building Pod labels May 21, 2022
@techbhavin
Copy link
Contributor Author

/ok-to-test sha=7aa94a2

@github-actions github-actions bot added Bug Something isn't working and removed Enhancement New feature or request labels May 21, 2022
@github-actions
Copy link

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

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2362319055.
Workflow: Appsmith External Integration Test Workflow.
Commit: 7aa94a2.
PR: 13997.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2362319055.
Commit: 7aa94a2.
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 678.29 690.16 682.1 683.01 639.86 682.1 674.68 2.95 2.64
painting 6.87 4.13 5.9 4.6 5.01 5.01 5.3 20.57 18.49
rendering 282.47 290.32 315.05 299.58 308.62 299.58 299.21 4.42 3.95
BIND_TABLE_DATA
scripting 2216.92 2218.82 2303.07 2266.18 2260.36 2260.36 2253.07 1.60 1.43
painting 19.81 17.76 19.09 22.24 11.25 19.09 18.03 22.85 20.47
rendering 632 582.14 601.97 609.82 587.75 601.97 602.74 3.27 2.93
CLICK_ON_TABLE_ROW
scripting 1862.96 1762.37 1578.76 1620.18 1692.05 1692.05 1703.26 6.66 5.96
painting 16.96 25.86 16.72 15.03 15.17 16.72 17.95 25.13 22.45
rendering 311.68 309.91 289.94 292.57 292.17 292.57 299.25 3.54 3.17
UPDATE_POST_TITLE
scripting 2442.77 2539.35 2517.34 2560.95 2630.03 2539.35 2538.09 2.68 2.40
painting 14.23 15.89 15.21 18.32 15.63 15.63 15.86 9.58 8.58
rendering 375.43 364.18 367.64 380.79 370.72 370.72 371.75 1.76 1.57
OPEN_MODAL
scripting 1251.58 1121.2 1048.72 3684.21 1067.24 1121.2 1634.59 70.26 62.85
painting 11.96 11.27 11.04 16.98 13.41 11.96 12.93 18.87 16.94
rendering 427.94 445.31 421.96 434.06 418.64 427.94 429.58 2.46 2.20
CLOSE_MODAL
scripting 549.06 703.58 758.8 567.03 2136.61 703.58 943.02 71.38 63.85
painting 5.17 5.51 5.29 5.55 4.84 5.29 5.27 5.50 4.93
rendering 339.73 365.55 374.57 346.51 362.26 362.26 357.72 3.99 3.57
SELECT_WIDGET_MENU_OPEN
scripting 1505.96 1501.57 1556.63 1609.72 1654.85 1556.63 1565.75 4.24 3.79
painting 5.2 11.76 5.37 6.14 17.45 6.14 9.18 58.28 52.18
rendering 490.04 493.22 482.9 535.64 517.75 493.22 503.91 4.38 3.92
SELECT_WIDGET_SELECT_OPTION
scripting 290.08 255.27 250.97 261.19 342.43 261.19 279.99 13.61 12.17
painting 4.05 7.45 4.59 3.21 3.48 4.05 4.56 37.28 33.33
rendering 14.46 16.56 17.62 18.09 17.16 17.16 16.78 8.40 7.51

@techbhavin
Copy link
Contributor Author

/ok-to-test sha=b67bc99

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2375293658.
Workflow: Appsmith External Integration Test Workflow.
Commit: b67bc99.
PR: 13997.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2375293658.
Commit: b67bc99.
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 1412.22 1802.54 1455.76 1621.35 1576.44 1576.44 1573.66 9.77 8.74
painting 16.42 27.23 12.35 15.93 8.92 15.93 16.17 42.55 38.10
rendering 750.85 786.35 720.98 788.91 785.5 785.5 766.52 3.90 3.49
BIND_TABLE_DATA
scripting 3103.12 2623.28 2291.62 2384.19 2725.33 2623.28 2625.51 12.16 10.88
painting 27.43 29.25 35.76 53.37 30.84 30.84 35.33 29.86 26.72
rendering 793.42 949.31 1082.14 1089.3 954.13 954.13 973.66 12.43 11.12
CLICK_ON_TABLE_ROW
scripting 5161.23 5427.47 5556.23 5575.55 5636.26 5556.23 5471.35 3.46 3.09
painting 60.04 64.23 67.27 68.13 89.34 67.27 69.8 16.29 14.57
rendering 1685.5 2167.99 1892.06 1806.91 1898.98 1892.06 1890.29 9.39 8.40
UPDATE_POST_TITLE
scripting 6303.94 6462.83 7234.04 6078.29 7196.61 6462.83 6655.14 7.96 7.12
painting 45.94 34.51 42.11 35.41 44.7 42.11 40.53 13.03 11.65
rendering 961.25 919.49 1098.23 917.69 945.13 945.13 968.36 7.73 6.91
OPEN_MODAL
scripting 2730.61 2758.32 2668 2897.88 3030.42 2758.32 2817.05 5.18 4.63
painting 39.47 39.87 56.53 34.79 21.26 39.47 38.38 32.93 29.44
rendering 1037.98 1065.06 1142.37 1072.58 1090.08 1072.58 1081.61 3.59 3.21
CLOSE_MODAL
scripting 4414.83 1538.45 1552.95 1676.97 4949.31 1676.97 2826.5 60.33 53.96
painting 14.34 34.44 16.57 19.08 17.86 17.86 20.46 39.15 35.04
rendering 1119.23 1263.36 945.79 962.64 1081.91 1081.91 1074.59 12.03 10.76
SELECT_WIDGET_MENU_OPEN
scripting 2794.14 2861.03 2760.62 2584.02 2615.14 2760.62 2722.99 4.36 3.90
painting 24.12 38.82 24.65 20.41 11.17 24.12 23.83 41.84 37.43
rendering 1233.56 1214.57 1264.91 1195.73 1189.05 1214.57 1219.56 2.52 2.25
SELECT_WIDGET_SELECT_OPTION
scripting 402.69 413.34 404.14 498.59 385.77 404.14 420.91 10.58 9.47
painting 6.74 6.32 6.18 11.35 22 6.74 10.52 64.35 57.51
rendering 27 28.07 25.19 30.28 33.1 28.07 28.73 10.65 9.54

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2375293658.
Commit: b67bc99.
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 788.06 839.29 774.98 734.85 744.96 774.98 776.43 5.31 4.75
painting 4.68 8.39 7.55 5.88 4.8 5.88 6.26 26.52 23.64
rendering 417.25 414.26 317.81 309.95 313.67 317.81 354.59 15.77 14.10
BIND_TABLE_DATA
scripting 2236.9 2267.82 2306.84 2278.38 2298.86 2278.38 2277.76 1.21 1.09
painting 22.02 16.21 23.42 26.62 24.53 23.42 22.56 17.42 15.56
rendering 732.72 830.54 642.56 638.14 698.32 698.32 708.46 11.13 9.96
CLICK_ON_TABLE_ROW
scripting 3410.8 3047.39 1865.48 1840.88 1881.61 1881.61 2409.23 31.53 28.20
painting 29.67 44.14 21.43 17.97 14.67 21.43 25.58 46.05 41.20
rendering 956.48 499.03 312.78 327.88 326.71 327.88 484.58 56.69 50.71
UPDATE_POST_TITLE
scripting 3837.12 4054.07 2949.41 2900.33 2972.51 2972.51 3342.69 16.64 14.89
painting 38.69 60.82 21.74 18.71 24.21 24.21 32.83 53.06 47.46
rendering 524.21 602.7 406.67 399.73 402.92 406.67 467.25 19.72 17.64
OPEN_MODAL
scripting 1683.64 1279.7 1209.8 1254.43 1203.43 1254.43 1326.2 15.25 13.64
painting 18.83 13.5 16.58 14.38 14.09 14.38 15.48 14.28 12.73
rendering 590.66 500.86 446.07 454.21 449.87 454.21 488.33 12.56 11.24
CLOSE_MODAL
scripting 843.05 685.77 693.92 679.02 806.54 693.92 741.66 10.40 9.31
painting 8.3 6.79 6.08 5.96 10.85 6.79 7.6 26.84 24.08
rendering 480.79 409.94 361.81 353.33 369.63 369.63 395.1 13.31 11.91
SELECT_WIDGET_MENU_OPEN
scripting 1568.41 1567.65 1517.2 1552.76 1620.89 1567.65 1565.38 2.39 2.13
painting 5.88 11.55 5.84 18.7 9.18 9.18 10.23 51.91 46.43
rendering 520.36 520.21 504.47 534.48 574.54 520.36 530.81 5.02 4.49
SELECT_WIDGET_SELECT_OPTION
scripting 275.12 278.26 266.66 220.16 274.62 274.62 262.96 9.24 8.27
painting 5.63 4.99 9.36 3.89 5.48 5.48 5.87 35.26 31.52
rendering 17.71 19.29 19.05 17.92 17.07 17.92 18.21 5.16 4.61

@chandannkumar
Copy link

  • Added support for labels position, Text color, Text size, Label Font style for Checkbox & Switch widget - Tested
  • Tested for Position and Alignment combination compatibility
  • Tested migration with old and new values as mentioned

Tested this PR with above details and it is working as expected

@techbhavin techbhavin merged commit 1760e81 into release May 25, 2022
@techbhavin techbhavin deleted the fix/issue-13586 branch May 25, 2022 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Viewers Pod This label assigns issues to the app viewers pod Bug Something isn't working Checkbox Widget Enhancement New feature or request Medium Issues that frustrate users due to poor UX Switch widget The switch widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]-[516]:Add label settings and styles to switch, checkbox
3 participants