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: Reflow while resizing does not reflow as expected #17243

Merged
merged 3 commits into from
Oct 6, 2022

Conversation

rahulramesha
Copy link
Contributor

Description

getIsReflowEffectedSelector was not returning for when widget was resized but only on while draging. Added the additional Condition to fix it.

Fixes #17223

Type of change

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

How Has This Been Tested?

Manual UI

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

@vercel
Copy link

vercel bot commented Oct 1, 2022

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

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview Oct 3, 2022 at 10:13AM (UTC)

@github-actions github-actions bot added Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage Reflow & Resize All issues related to reflow and resize experience UI Builders Pod Issues that UI Builders face using appsmith labels Oct 1, 2022
@rahulramesha
Copy link
Contributor Author

/ok-to-test sha=72babc7

@github-actions
Copy link

github-actions bot commented Oct 1, 2022

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

@github-actions
Copy link

github-actions bot commented Oct 1, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3165440446.
Workflow: Appsmith External Integration Test Workflow.
Commit: 72babc7.
PR: 17243.

@github-actions
Copy link

github-actions bot commented Oct 1, 2022

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/3165440446.
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 337.81 350.25 345.12 356.76 338.57 337.81 345.12 345.7 5.48 2.32 2.07
painting 7.69 5.32 5.84 8.43 4.55 4.55 5.84 6.37 60.91 25.59 22.92
rendering 104.23 104.75 109.53 104.52 101.95 101.95 104.52 105 7.22 2.64 2.36
BIND_TABLE_DATA
scripting 1034.36 1033.03 1097.37 988.82 1093.97 988.82 1034.36 1049.51 10.34 4.38 3.92
painting 18.55 13.19 15.72 16.48 12.83 12.83 15.72 15.35 37.26 15.50 13.88
rendering 808.6 793.27 797.3 778.93 777.05 777.05 793.27 791.03 3.99 1.67 1.49
CLICK_ON_TABLE_ROW
scripting 774.69 919.98 845.94 858.55 886.46 774.69 858.55 857.12 16.95 6.32 5.65
painting 12.63 11.99 10.11 8.6 8.72 8.6 10.11 10.41 38.71 17.77 15.85
rendering 301.2 301.05 292.28 294.65 292.42 292.28 294.65 296.32 3.01 1.52 1.35
UPDATE_POST_TITLE
scripting 1394.82 1397.74 1266.62 1409.63 1410.47 1266.62 1397.74 1375.86 10.46 4.47 4.00
painting 12.55 20.56 12.12 13.94 13.61 12.12 13.61 14.56 57.97 23.63 21.15
rendering 588.2 599.78 584.22 595.67 601.98 584.22 595.67 593.97 2.99 1.27 1.14
OPEN_MODAL
scripting 455.22 448.15 434.52 451.32 424.13 424.13 448.15 442.67 7.02 2.93 2.62
painting 7.04 26.82 11.17 7.64 16.02 7.04 11.17 13.74 143.96 59.24 52.98
rendering 1196.13 1165.39 1180.23 1144.79 1144.6 1144.6 1165.39 1166.23 4.42 1.93 1.72
CLOSE_MODAL
scripting 189.16 221.74 182.27 184.41 211.33 182.27 189.16 197.78 19.96 8.94 8.00
painting 4.54 5.29 12.86 4.47 13.14 4.47 5.29 8.06 107.57 56.08 50.12
rendering 873.37 879.72 874.13 882.84 870.22 870.22 874.13 876.06 1.44 0.58 0.52
SELECT_WIDGET_MENU_OPEN
scripting 927.5 921.66 916 932.66 888.38 888.38 921.66 917.24 4.83 1.89 1.69
painting 5.72 7.23 8.33 12.55 4.71 4.71 7.23 7.71 101.69 39.43 35.28
rendering 645.28 622.33 628.6 654.05 630.03 622.33 630.03 636.06 4.99 2.06 1.85
SELECT_WIDGET_SELECT_OPTION
scripting 160.01 156.5 183.36 149.17 160.02 149.17 160.01 161.81 21.13 7.93 7.09
painting 11.8 3.84 4.42 4.6 5.37 3.84 4.6 6.01 132.45 54.58 48.92
rendering 304.69 309.36 317.74 300.72 301.55 300.72 304.69 306.81 5.55 2.28 2.04

@rahulramesha
Copy link
Contributor Author

/ok-to-test sha=c9348c4

@github-actions
Copy link

github-actions bot commented Oct 2, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3169177884.
Workflow: Appsmith External Integration Test Workflow.
Commit: c9348c4.
PR: 17243.

@github-actions
Copy link

github-actions bot commented Oct 2, 2022

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/3169177884.
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 338.76 335.03 355.42 368.24 378.47 335.03 355.42 355.18 12.23 5.25 4.69
painting 5.89 4.88 4.23 5.13 6.37 4.23 5.13 5.3 40.38 15.85 14.15
rendering 101.18 102.09 101.71 106.33 105.41 101.18 102.09 103.34 4.98 2.27 2.03
BIND_TABLE_DATA
scripting 1131.13 1121.53 1132.94 1062.85 1106.3 1062.85 1121.53 1110.95 6.31 2.60 2.33
painting 19.91 17.96 11.72 23.4 21.83 11.72 19.91 18.96 61.60 23.95 21.41
rendering 796.78 803.03 821.25 824.29 811.79 796.78 811.79 811.43 3.39 1.44 1.29
CLICK_ON_TABLE_ROW
scripting 804.37 920.71 877.44 940.44 892.55 804.37 892.55 887.1 15.34 5.90 5.27
painting 10.14 21.73 14.58 9.19 14.21 9.19 14.21 13.97 89.76 35.43 31.71
rendering 286.02 296.17 299.92 315.63 295.21 286.02 296.17 298.59 9.92 3.62 3.24
UPDATE_POST_TITLE
scripting 1515.55 1335.62 1488.36 1446.6 1404.92 1335.62 1446.6 1438.21 12.51 4.94 4.42
painting 20.36 14.16 15.34 15.36 13.9 13.9 15.34 15.82 40.83 16.56 14.85
rendering 601.38 588.83 609.58 627.07 606.78 588.83 606.78 606.73 6.30 2.29 2.05
OPEN_MODAL
scripting 428.93 435.12 458.32 471.26 443.49 428.93 443.49 447.42 9.46 3.86 3.46
painting 7.12 8.45 13.78 9.08 21.38 7.12 9.08 11.96 119.23 48.75 43.65
rendering 1146.84 1146.16 1191.85 1278.31 1153.91 1146.16 1153.91 1183.41 11.17 4.76 4.25
CLOSE_MODAL
scripting 183.85 187.42 208.72 201.41 215.57 183.85 201.41 199.39 15.91 6.81 6.09
painting 4.63 11.64 6.42 8.37 5.67 4.63 6.42 7.35 95.37 37.55 33.61
rendering 879.54 897.58 921.35 876.28 868.4 868.4 879.54 888.63 5.96 2.38 2.13
SELECT_WIDGET_MENU_OPEN
scripting 942.8 929.2 959.82 963.94 983.49 929.2 959.82 955.85 5.68 2.17 1.94
painting 6.3 10.77 5.7 12.62 5.94 5.7 6.3 8.27 83.68 38.69 34.70
rendering 642.42 651.66 654.24 659.85 654.58 642.42 654.24 652.55 2.67 0.98 0.88
SELECT_WIDGET_SELECT_OPTION
scripting 161.12 158.63 148.64 151.68 178.69 148.64 158.63 159.75 18.81 7.34 6.57
painting 8.96 1.95 4.92 4.81 3.87 1.95 4.81 4.9 143.06 52.24 46.73
rendering 300.09 309.78 305.36 305.61 323.91 300.09 305.61 308.95 7.71 2.93 2.62

dragDetails &&
!!dragDetails.draggedOn &&
dragDetails.draggedOn === widgetId) ||
isResizing) &&
Copy link
Member

Choose a reason for hiding this comment

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

is it possible to write a test case for this scenario @rahulramesha ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@marks0351, don't think we can, we will have to trigger reflow by dragging resize handle of the widget on cypress. That is similar to triggering reflow by dragging widget on canvas.

@rahulramesha
Copy link
Contributor Author

/ok-to-test sha=36d281e

@github-actions
Copy link

github-actions bot commented Oct 3, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3173643515.
Workflow: Appsmith External Integration Test Workflow.
Commit: 36d281e.
PR: 17243.

@rahulramesha rahulramesha merged commit 4bae04e into release Oct 6, 2022
@rahulramesha rahulramesha deleted the fixReflowRegression branch October 6, 2022 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage Reflow & Resize All issues related to reflow and resize experience UI Builders Pod Issues that UI Builders face using appsmith
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Reflow not working as expected
2 participants