appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix: Extra Space at the end of the Canvas in Viewmode

Open rahulramesha opened this issue 3 years ago • 7 comments

Description

We had logic to fix MainCanvas height when a Widget is dragged, resized or deleted. Extending that logic to When a widget is added to mainCanvas as well.

Also added logic to trim mainCanvas width in View Mode.

Fixes #12672

Type of change

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

How Has This Been Tested?

Manual UI and Jest test

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

rahulramesha avatar Sep 14 '22 08:09 rahulramesha

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview Sep 29, 2022 at 10:59AM (UTC)

vercel[bot] avatar Sep 14 '22 08:09 vercel[bot]

/ok-to-test sha=27c3c42

rahulramesha avatar Sep 20 '22 19:09 rahulramesha

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3092864776. Workflow: Appsmith External Integration Test Workflow. Commit: 27c3c42. PR: 16747.

github-actions[bot] avatar Sep 20 '22 19:09 github-actions[bot]

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

Click to view performance test results

| | Run 1 (ms)| Run 2 (ms)| Run 3 (ms)| Run 4 (ms)| Run 5 (ms)| Minimum (ms)| Median (ms)| Mean (ms)| Range (%) | SD.Sample (%) | SD.Population (%)| | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | SELECT_CATEGORY| | | | | | | | | | | | scripting | 346.39 | 340.39 | 390.02 | 404.2 | 479.95 | 340.39| 390.02| 392.19 | 35.58| 14.33 | 12.82| | painting | 5.87 | 10.37 | 8.49 | 4.11 | 4.34 | 4.11| 5.87| 6.64 | 94.28| 40.96 | 36.60| | rendering | 113.85 | 106.75 | 122.51 | 112.57 | 128.24 | 106.75| 113.85| 116.78 | 18.40| 7.30 | 6.53| BIND_TABLE_DATA| | | | | | | | | | | | scripting | 1132.27 | 1107.35 | 1145.83 | 1114.06 | 1651.2 | 1107.35| 1132.27| 1230.14 | 44.21| 19.17 | 17.15| | painting | 25.82 | 21.51 | 20.55 | 16 | 26.21 | 16| 21.51| 22.02 | 46.37| 19.07 | 17.08| | rendering | 862.69 | 824.01 | 902.51 | 925.08 | 568.05 | 568.05| 862.69| 816.47 | 43.73| 17.65 | 15.79| CLICK_ON_TABLE_ROW| | | | | | | | | | | | scripting | 876.15 | 1234.07 | 1059.52 | 1489.19 | 1143.19 | 876.15| 1143.19| 1160.42 | 52.83| 19.50 | 17.44| | painting | 9.97 | 9.47 | 10.45 | 17.07 | 13.47 | 9.47| 10.45| 12.09 | 62.86| 26.39 | 23.57| | rendering | 304.4 | 302.48 | 326.53 | 362.87 | 340.24 | 302.48| 326.53| 327.3 | 18.45| 7.75 | 6.93| UPDATE_POST_TITLE| | | | | | | | | | | | scripting | 1435.52 | 1487.86 | 2040.59 | 2060.98 | 1750.75 | 1435.52| 1750.75| 1755.14 | 35.64| 16.82 | 15.04| | painting | 13.93 | 16.78 | 17.66 | 18.76 | 17.87 | 13.93| 17.66| 17 | 28.41| 10.88 | 9.76| | rendering | 461.9 | 473.66 | 499.7 | 551.73 | 555.04 | 461.9| 499.7| 508.41 | 18.32| 8.51 | 7.62| OPEN_MODAL| | | | | | | | | | | | scripting | 892.49 | 454.24 | 477.54 | 566.07 | 560.84 | 454.24| 560.84| 590.24 | 74.25| 29.83 | 26.68| | painting | 10.85 | 12.63 | 16.25 | 12.76 | 15.33 | 10.85| 12.76| 13.56 | 39.82| 16.15 | 14.45| | rendering | 372.64 | 379.1 | 406.85 | 439.02 | 443.91 | 372.64| 406.85| 408.3 | 17.46| 8.07 | 7.22| CLOSE_MODAL| | | | | | | | | | | | scripting | 221.66 | 225.8 | 279.16 | 250.76 | 301.4 | 221.66| 250.76| 255.76 | 31.18| 13.43 | 12.01| | painting | 4.97 | 5.19 | 6.57 | 8.43 | 5.45 | 4.97| 5.45| 6.12 | 56.54| 23.37 | 20.92| | rendering | 343.38 | 334.4 | 371.81 | 395.67 | 386.93 | 334.4| 371.81| 366.44 | 16.72| 7.30 | 6.53| SELECT_WIDGET_MENU_OPEN| | | | | | | | | | | | scripting | 1008.42 | 1030.56 | 1133.81 | 1098.56 | 1010.43 | 1008.42| 1030.56| 1056.36 | 11.87| 5.37 | 4.80| | painting | 10.87 | 13.09 | 8.07 | 8.23 | 18.13 | 8.07| 10.87| 11.68 | 86.13| 35.62 | 31.85| | rendering | 646.68 | 680.06 | 719.37 | 728.86 | 660.09 | 646.68| 680.06| 687.01 | 11.96| 5.25 | 4.69| SELECT_WIDGET_SELECT_OPTION| | | | | | | | | | | | scripting | 164.99 | 185.3 | 231.56 | 210.03 | 179.15 | 164.99| 185.3| 194.21 | 34.28| 13.63 | 12.20| | painting | 3.54 | 2.49 | 18.6 | 7.57 | 4.78 | 2.49| 4.78| 7.4 | 217.70| 88.38 | 79.05| | rendering | 314.39 | 339.26 | 375.55 | 376.84 | 325.57 | 314.39| 339.26| 346.32 | 18.03| 8.28 | 7.40|

github-actions[bot] avatar Sep 20 '22 20:09 github-actions[bot]

/ok-to-test sha=319e76c

rahulramesha avatar Sep 21 '22 14:09 rahulramesha

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3099076893. Workflow: Appsmith External Integration Test Workflow. Commit: 319e76c. PR: 16747.

github-actions[bot] avatar Sep 21 '22 15:09 github-actions[bot]

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

Click to view performance test results

| | Run 1 (ms)| Run 2 (ms)| Run 3 (ms)| Run 4 (ms)| Run 5 (ms)| Minimum (ms)| Median (ms)| Mean (ms)| Range (%) | SD.Sample (%) | SD.Population (%)| | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | SELECT_CATEGORY| | | | | | | | | | | | scripting | 369.33 | 437.71 | 441.97 | 722.59 | 434.42 | 369.33| 437.71| 481.2 | 73.41| 28.72 | 25.69| | painting | 6.47 | 8.63 | 4.28 | 5.44 | 3.91 | 3.91| 5.44| 5.75 | 82.09| 33.04 | 29.57| | rendering | 109.83 | 114.2 | 117.7 | 192.26 | 116.68 | 109.83| 116.68| 130.13 | 63.34| 26.79 | 23.96| BIND_TABLE_DATA| | | | | | | | | | | | scripting | 1184.67 | 1299.68 | 1253 | 1806.15 | 1236.74 | 1184.67| 1253| 1356.05 | 45.83| 18.80 | 16.82| | painting | 17.84 | 21.23 | 36.65 | 32.64 | 27.65 | 17.84| 27.65| 27.2 | 69.15| 28.60 | 25.59| | rendering | 895.84 | 953.9 | 954.18 | 967.77 | 941.75 | 895.84| 953.9| 942.69 | 7.63| 2.94 | 2.63| CLICK_ON_TABLE_ROW| | | | | | | | | | | | scripting | 933.73 | 1108.06 | 1793.62 | 1854.05 | 1145.79 | 933.73| 1145.79| 1367.05 | 67.32| 31.10 | 27.81| | painting | 9.59 | 20.01 | 16.02 | 18.32 | 12.77 | 9.59| 16.02| 15.34 | 67.93| 27.44 | 24.51| | rendering | 333.4 | 343.21 | 419.5 | 583.38 | 353.93 | 333.4| 353.93| 406.68 | 61.47| 25.66 | 22.95| UPDATE_POST_TITLE| | | | | | | | | | | | scripting | 1591.34 | 1634.46 | 2225.86 | 2450.38 | 1945.28 | 1591.34| 1945.28| 1969.46 | 43.62| 18.88 | 16.88| | painting | 21.37 | 28.31 | 22.65 | 28.54 | 19.45 | 19.45| 22.65| 24.06 | 37.78| 17.21 | 15.38| | rendering | 479.72 | 512.72 | 651.18 | 665.54 | 542.12 | 479.72| 542.12| 570.26 | 32.59| 14.65 | 13.10| OPEN_MODAL| | | | | | | | | | | | scripting | 468.9 | 509.44 | 557.47 | 564.04 | 571.36 | 468.9| 557.47| 534.24 | 19.18| 8.21 | 7.34| | painting | 9.5 | 16.42 | 10.8 | 17.92 | 17.02 | 9.5| 16.42| 14.33 | 58.76| 27.08 | 24.21| | rendering | 407.51 | 423.25 | 427.81 | 422.95 | 426.82 | 407.51| 423.25| 421.67 | 4.81| 1.94 | 1.74| CLOSE_MODAL| | | | | | | | | | | | scripting | 189.73 | 219.17 | 240.2 | 346.12 | 285.22 | 189.73| 240.2| 256.09 | 61.07| 23.89 | 21.37| | painting | 12.11 | 8.52 | 5.35 | 16.46 | 7.15 | 5.35| 8.52| 9.92 | 112.00| 44.56 | 39.82| | rendering | 346.65 | 360.4 | 366.88 | 491.59 | 364.65 | 346.65| 364.65| 386.03 | 37.55| 15.42 | 13.79| SELECT_WIDGET_MENU_OPEN| | | | | | | | | | | | scripting | 1041.39 | 1158.15 | 1095.86 | 1240.47 | 1093.99 | 1041.39| 1095.86| 1125.97 | 17.68| 6.77 | 6.05| | painting | 11.58 | 8.91 | 11.97 | 9.93 | 11.76 | 8.91| 11.58| 10.83 | 28.25| 12.37 | 11.08| | rendering | 698.72 | 722.05 | 688.53 | 839.45 | 672.84 | 672.84| 698.72| 724.32 | 23.00| 9.22 | 8.25| SELECT_WIDGET_SELECT_OPTION| | | | | | | | | | | | scripting | 171.48 | 200.56 | 202.49 | 227.44 | 182.86 | 171.48| 200.56| 196.97 | 28.41| 10.83 | 9.69| | painting | 11.75 | 5.64 | 6.64 | 3.97 | 6.5 | 3.97| 6.5| 6.9 | 112.75| 42.17 | 37.68| | rendering | 320.83 | 348.27 | 347.78 | 359.44 | 319.27 | 319.27| 347.78| 339.12 | 11.85| 5.32 | 4.76|

github-actions[bot] avatar Sep 21 '22 16:09 github-actions[bot]

/ok-to-test sha=a27e1b2

rahulramesha avatar Sep 25 '22 12:09 rahulramesha

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3122229740. Workflow: Appsmith External Integration Test Workflow. Commit: a27e1b2. PR: 16747.

github-actions[bot] avatar Sep 25 '22 12:09 github-actions[bot]

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

Click to view performance test results

Run 1 (ms) Run 2 (ms) Run 3 (ms) Run 4 (ms) Run 5 (ms) Minimum (ms) Median (ms) Mean (ms) Range (%) SD.Sample (%) SD.Population (%)
SELECT_CATEGORY
scripting 330.78 357.21 338.97 343.72 360.77 330.78 343.72 346.29 8.66 3.62 3.24
painting 4.29 3.14 5.23 5.86 4.86 3.14 4.86 4.68 58.12 22.01 19.66
rendering 105.41 104.32 102.27 106.79 108.5 102.27 105.41 105.46 5.91 2.25 2.01
BIND_TABLE_DATA
scripting 1138.25 1033.23 1043.66 1120.21 1086.58 1033.23 1086.58 1084.39 9.68 4.24 3.79
painting 19.99 20.79 16.17 17.22 20.1 16.17 19.99 18.85 24.51 10.77 9.60
rendering 782.46 792.69 775.67 808.61 784.56 775.67 784.56 788.8 4.18 1.60 1.43
CLICK_ON_TABLE_ROW
scripting 772.85 878.37 888.74 923.95 900.44 772.85 888.74 872.87 17.31 6.69 5.99
painting 12.57 12.87 8.8 16.65 12.6 8.8 12.6 12.7 61.81 21.89 19.53
rendering 291.58 296.34 302.51 297.99 304.88 291.58 297.99 298.66 4.45 1.75 1.57
UPDATE_POST_TITLE
scripting 1470.14 1413.39 1372.3 1385.73 1289.97 1289.97 1385.73 1386.31 13.00 4.74 4.24
painting 13.03 18.87 13.52 12.69 16.72 12.69 13.52 14.97 41.28 18.10 16.17
rendering 470.11 453.62 441.47 455.55 442.64 441.47 453.62 452.68 6.33 2.56 2.30
OPEN_MODAL
scripting 419.51 439.16 428.16 466.85 413.37 413.37 428.16 433.41 12.34 4.86 4.34
painting 11.68 12.58 22.27 13.8 11.69 11.68 12.58 14.4 73.54 31.11 27.85
rendering 361.07 378.73 369.15 380.13 364.26 361.07 369.15 370.67 5.14 2.30 2.06
CLOSE_MODAL
scripting 207.22 172.62 223.6 176.57 208.07 172.62 207.22 197.62 25.80 11.16 9.98
painting 10.5 7.87 4.99 9.5 14.27 4.99 9.5 9.43 98.41 36.27 32.45
rendering 318.09 331.31 318.4 339.68 333.31 318.09 331.31 328.16 6.58 2.91 2.61
SELECT_WIDGET_MENU_OPEN
scripting 926.91 920.94 922.53 939.32 910.41 910.41 922.53 924.02 3.13 1.13 1.01
painting 10.95 12.67 11.94 14.9 5.05 5.05 11.94 11.1 88.74 33.15 29.64
rendering 590.64 582.29 590.49 605.61 577.91 577.91 590.49 589.39 4.70 1.80 1.61
SELECT_WIDGET_SELECT_OPTION
scripting 157.18 149.2 159.36 155.87 159.17 149.2 157.18 156.16 6.51 2.66 2.38
painting 3.4 5.99 3.31 7.71 9.72 3.31 5.99 6.03 106.30 45.94 41.13
rendering 306.24 302.28 306.1 301.86 304.25 301.86 304.25 304.15 1.44 0.68 0.60

github-actions[bot] avatar Sep 25 '22 13:09 github-actions[bot]

/ok-to-test sha=2cb25ba

rahulramesha avatar Sep 27 '22 17:09 rahulramesha

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3137715113. Workflow: Appsmith External Integration Test Workflow. Commit: 2cb25ba. PR: 16747.

github-actions[bot] avatar Sep 27 '22 17:09 github-actions[bot]

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

Click to view performance test results

Run 1 (ms) Run 2 (ms) Run 3 (ms) Run 4 (ms) Run 5 (ms) Minimum (ms) Median (ms) Mean (ms) Range (%) SD.Sample (%) SD.Population (%)
SELECT_WIDGET_MENU_OPEN
scripting 1029.74 1080.44 1045.5 930.15 952.17 930.15 1029.74 1007.6 14.92 6.34 5.67
painting 6.43 13.36 8.41 5.2 5.3 5.2 6.43 7.74 105.43 43.93 39.28
rendering 654.58 726.76 669.94 582.47 595.04 582.47 654.58 645.76 22.34 9.10 8.14
SELECT_WIDGET_SELECT_OPTION
scripting 203.05 226.5 173.12 214.35 159.12 159.12 203.05 195.23 34.51 14.48 12.95
painting 5.04 13.94 7.09 6.35 5.68 5.04 6.35 7.62 116.80 47.38 42.39
rendering 333.17 342.45 317.39 308.13 316.35 308.13 317.39 323.5 10.61 4.31 3.85
SELECT_CATEGORY
scripting 398.25 1225.68 332.9 388.92 337.13 332.9 388.92 536.58 166.38 72.00 64.40
painting 3.61 3.6 6.08 3.27 4.46 3.27 3.61 4.2 66.90 27.14 24.29
rendering 111.27 142.79 105.88 104.98 105.19 104.98 105.88 114.02 33.16 14.29 12.78
BIND_TABLE_DATA
scripting 1147.71 1323.87 1038.1 1067.44 1138.63 1038.1 1138.63 1143.15 25.00 9.73 8.70
painting 28.96 20.7 13.13 25.54 22.56 13.13 22.56 22.18 71.37 26.83 23.99
rendering 931.18 980.85 788.01 817.03 839.34 788.01 839.34 871.28 22.13 9.34 8.35
CLICK_ON_TABLE_ROW
scripting 1367.48 1238.4 837.91 930.99 929.29 837.91 930.99 1060.81 49.92 21.57 19.29
painting 10.85 12.04 9.67 10.05 13.58 9.67 10.85 11.24 34.79 14.15 12.63
rendering 319.55 341.84 296.66 299.62 307.61 296.66 307.61 313.06 14.43 5.87 5.25
UPDATE_POST_TITLE
scripting 1634.56 1893.06 1434.63 1401.45 1313.97 1313.97 1434.63 1535.53 37.71 15.09 13.50
painting 20.62 19.61 14.38 17.07 12.26 12.26 17.07 16.79 49.79 20.85 18.64
rendering 502.39 520.55 453.5 446.85 451.6 446.85 453.5 474.98 15.52 7.16 6.40
OPEN_MODAL
scripting 579.74 526.41 443.97 450.1 477.5 443.97 477.5 495.54 27.40 11.54 10.33
painting 19.34 20.28 19.5 18.41 8.79 8.79 19.34 17.26 66.57 27.69 24.80
rendering 434.61 427.96 357.2 367.07 413.57 357.2 413.57 400.08 19.35 8.91 7.97
CLOSE_MODAL
scripting 252.33 223.12 631.84 157.52 180.39 157.52 223.12 289.04 164.10 67.51 60.38
painting 19.7 22.01 7.42 16.34 10.37 7.42 16.34 15.17 96.18 40.61 36.32
rendering 356.16 379.35 339.65 334.21 347.11 334.21 347.11 351.3 12.85 5.04 4.51

github-actions[bot] avatar Sep 27 '22 18:09 github-actions[bot]

/ok-to-test sha=f829617

rahulramesha avatar Sep 29 '22 10:09 rahulramesha

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3150695462. Workflow: Appsmith External Integration Test Workflow. Commit: f829617. PR: 16747.

github-actions[bot] avatar Sep 29 '22 10:09 github-actions[bot]

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

Click to view performance test results

Run 1 (ms) Run 2 (ms) Run 3 (ms) Run 4 (ms) Run 5 (ms) Minimum (ms) Median (ms) Mean (ms) Range (%) SD.Sample (%) SD.Population (%)
SELECT_CATEGORY
scripting 423.34 415.43 387.46 406.08 372.39 372.39 406.08 400.94 12.71 5.20 4.65
painting 5.89 3.59 4.06 4.24 5.41 3.59 4.24 4.64 49.57 20.91 18.75
rendering 112.64 112.77 107.87 119.17 107.86 107.86 112.64 112.06 10.09 4.15 3.71
BIND_TABLE_DATA
scripting 1204.31 1085.77 1074.46 1182.74 1114.11 1074.46 1114.11 1132.28 11.47 5.14 4.60
painting 30.35 24.85 16.7 20.24 15.66 15.66 20.24 21.56 68.14 28.25 25.28
rendering 957.88 891.21 866.44 919.5 838.2 838.2 891.21 894.65 13.38 5.19 4.64
CLICK_ON_TABLE_ROW
scripting 1033.31 1002.84 941.27 1052.94 864.12 864.12 1002.84 978.9 19.29 7.85 7.02
painting 15.74 10.11 8.87 18.76 9.96 8.87 10.11 12.69 77.94 34.12 30.50
rendering 331.18 351.6 322.45 371.74 298.5 298.5 331.18 335.09 21.86 8.35 7.47
UPDATE_POST_TITLE
scripting 1815.27 1610.41 1527.27 1666.42 1435.61 1435.61 1610.41 1611 23.57 8.92 7.98
painting 19.25 19.38 19.51 16.86 21.1 16.86 19.38 19.22 22.06 7.91 7.08
rendering 662.43 673.56 652.14 658.26 624.24 624.24 658.26 654.13 7.54 2.82 2.52
OPEN_MODAL
scripting 1029.73 486.55 524.43 529.36 461.13 461.13 524.43 606.24 93.79 39.32 35.17
painting 12.52 17.89 10.83 11.12 15.08 10.83 12.52 13.49 52.34 22.09 19.79
rendering 1378.6 1251.58 1343.71 1278.39 1221.57 1221.57 1278.39 1294.77 12.13 5.02 4.49
CLOSE_MODAL
scripting 306.9 217.27 227.53 215.76 224.03 215.76 224.03 238.3 38.25 16.22 14.51
painting 5.87 6.03 4.36 10.78 4.38 4.36 5.87 6.28 102.23 42.04 37.58
rendering 1028.78 955.22 941.3 972.46 906.38 906.38 955.22 960.83 12.74 4.69 4.20
SELECT_WIDGET_MENU_OPEN
scripting 1017.54 1097.5 1027.52 1035.47 980.46 980.46 1027.52 1031.7 11.34 4.11 3.67
painting 10.81 7.37 7.83 14.23 5.98 5.98 7.83 9.24 89.29 35.71 31.93
rendering 695.37 726.18 727.81 736.76 668.99 668.99 726.18 711.02 9.53 3.97 3.55
SELECT_WIDGET_SELECT_OPTION
scripting 214.28 169.36 181.59 176.53 239.13 169.36 181.59 196.18 35.56 15.06 13.47
painting 3.19 3.36 9.46 9.15 4.33 3.19 4.33 5.9 106.27 53.22 47.63
rendering 319.32 321.22 328.18 326.43 483.04 319.32 326.43 355.64 46.04 20.05 17.93

github-actions[bot] avatar Sep 29 '22 11:09 github-actions[bot]