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

chore: Extend the list of widgets that cannot be used inside the List… #10928

Merged
merged 5 commits into from
Feb 9, 2022

Conversation

sbalaji1192
Copy link
Contributor

@sbalaji1192 sbalaji1192 commented Feb 7, 2022

… widget

Description

Only widgets that don't have derived or meta properties work well inside the current version of the List widget. Widgets like Input, Select maintain the state on meta properties which won't be available in List.selectedItem object. Hence we're restricting them from being placed inside the List widget.

Related #10683

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 decreased
// Code coverage diff between base branch:release and head branch: task/list-widget-allowed-children 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 54.99 (0) 36.31 (-0.01) 34.68 (0) 55.37 (0)
🔴 app/client/src/utils/autocomplete/TernServer.ts 52.71 (-0.23) 40.83 (-0.84) 36.21 (0) 56.74 (-0.25)

@vercel
Copy link

vercel bot commented Feb 7, 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/DgpqrLY34K4ijTx3qgbzUi73m31Z
✅ Preview: https://appsmith-git-task-list-widget-allowed-children-get-appsmith.vercel.app

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Feb 7, 2022
@github-actions
Copy link

github-actions bot commented Feb 7, 2022

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

@sbalaji1192
Copy link
Contributor Author

/ok-to-test sha=488382d

@github-actions
Copy link

github-actions bot commented Feb 7, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1806265670.
Workflow: Appsmith External Integration Test Workflow.
Commit: 488382d.
PR: 10928.

@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/1806265670.
Commit: 488382d.
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 2863.36 2642.56 2613.96 2628.15 2752.02 2642.56 2700.01 3.94 3.52
painting 23.77 19.96 19.7 17.94 16.12 19.7 19.5 14.56 13.03
rendering 294.61 281.7 297.89 316.48 304.13 297.89 298.96 4.27 3.82
Edit input
scripting 402.41 1714.92 431.84 338.37 409.35 409.35 659.38 89.64 80.18
painting 11.27 35 25.2 31.52 10.69 25.2 22.74 49.65 44.42
rendering 19.35 18.52 17.29 14.35 22.92 18.52 18.49 16.87 15.09
Clear input
scripting 897.86 931.9 918.46 888.94 930.71 918.46 913.57 2.12 1.90
painting 18.32 6.09 6.24 19.54 6.72 6.72 11.38 60.72 54.31
rendering 230.53 218.94 215.33 219.65 219.46 219.46 220.78 2.60 2.32
Edit input again
scripting 380.49 713.54 425.12 393.21 355.71 393.21 453.61 32.50 29.07
painting 7.91 22.72 7.69 5.49 5.25 7.69 9.81 74.62 66.77
rendering 24.02 18.52 23.51 22.91 18.45 22.91 21.48 12.85 11.50

@sbalaji1192
Copy link
Contributor Author

/ok-to-test sha=488382d

@github-actions
Copy link

github-actions bot commented Feb 7, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1808086200.
Workflow: Appsmith External Integration Test Workflow.
Commit: 488382d.
PR: 10928.

@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/1808086200.
Commit: 488382d.
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 2056.02 2101.32 2222.7 2191.01 2090.22 2101.32 2132.25 3.33 2.98
painting 32.76 9.34 11.18 13.87 11.75 11.75 15.78 61.03 54.56
rendering 243.05 264.79 311.28 281.33 229.79 264.79 266.05 12.07 10.79
Edit input
scripting 283.58 237.4 346.48 271.01 298.08 283.58 287.31 13.91 12.44
painting 5.7 4.05 9.48 8.61 9.99 8.61 7.57 33.95 30.38
rendering 15.06 11.07 19.57 13.82 14.02 14.02 14.71 21.01 18.83
Clear input
scripting 631.21 629.55 694.51 689.57 871.5 689.57 703.27 14.08 12.59
painting 7.65 11.35 4.89 4.76 8.87 7.65 7.5 37.20 33.20
rendering 163.52 173.99 158.68 163.41 166.74 163.52 165.27 3.42 3.06
Edit input again
scripting 254.91 266 292.93 561.84 270.67 270.67 329.27 39.71 35.51
painting 8.33 8.48 4.76 7.97 5.16 7.97 6.94 26.22 23.49
rendering 15.13 17.11 17.32 16.41 16.17 16.41 16.43 5.30 4.75

Copy link
Contributor

@riodeuno riodeuno left a comment

Choose a reason for hiding this comment

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

Looks good to me!
@YogeshJayaseelan Needs a regression test for existing widget which is now disallowed. Can we play around with that state, moving the widget outside and then inside the List Widget, and check the experience.

@YogeshJayaseelan
Copy link
Contributor

YogeshJayaseelan commented Feb 8, 2022

@sbalaji1192 Tested this PR and now the below widgets are allowed inside list widget

"AUDIO_WIDGET",
"BUTTON_GROUP_WIDGET",
"BUTTON_WIDGET",
"CHART_WIDGET",
"CHECKBOX_WIDGET",
"CHECKBOX_GROUP_WIDGET",
"CIRCULAR_PROGRESS_WIDGET",
"DIVIDER_WIDGET",
"ICON_BUTTON_WIDGET",
"IFRAME_WIDGET",
"IMAGE_WIDGET",
"INPUT_WIDGET_V2",
"MAP_CHART_WIDGET",
"MAP_WIDGET",
"MENU_BUTTON_WIDGET",
"PROGRESSBAR_WIDGET",
"STATBOX_WIDGET",
"SWITCH_WIDGET",
"SWITCH_GROUP_WIDGET",
"TEXT_WIDGET",
"VIDEO_WIDGET",

Also, when trying to place non allowed widgets - A valid toast message appears and the list widget doesn't break.

Issue 1 : Placing a List widget within list widget - the app crashes

LOOM DEMO

Step to Reproduce:
1.Add a list widget
2. Expand the size both top and right
3. Add another list widget to the canvas and resize it to smaller in size
4. Place the newly resized widget to the first list widget and obseve

@sbalaji1192
Copy link
Contributor Author

/ok-to-test sha=5c465e9

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1816246593.
Workflow: Appsmith External Integration Test Workflow.
Commit: 5c465e9.
PR: 10928.

@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/1816246593.
Commit: 5c465e9.
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 2668.46 2179.22 2203.12 2105.16 2244.93 2203.12 2280.18 9.78 8.74
painting 54.59 32.12 15.59 13.96 22.8 22.8 27.81 59.69 53.40
rendering 403.5 239.11 268.29 247.44 292.81 268.29 290.23 22.96 20.54
Edit input
scripting 308.56 342.53 312.09 279.54 248.19 308.56 298.18 11.99 10.73
painting 7.6 4.55 17.72 3.86 5.24 5.24 7.79 73.43 65.73
rendering 14.21 16.4 12.95 11.15 11.84 12.95 13.31 15.63 13.97
Clear input
scripting 759.81 728.98 710.71 931.26 753.34 753.34 776.82 11.40 10.19
painting 6.5 5.12 6.14 6.35 7.43 6.35 6.31 13.15 11.73
rendering 171.58 168.72 180.97 184.39 178.97 178.97 176.93 3.71 3.32
Edit input again
scripting 273.03 276.29 292.71 271.8 561.19 276.29 335 37.83 33.83
painting 5.99 5.71 4.91 4.3 17.13 5.71 7.61 70.43 63.07
rendering 17.41 19.3 18.47 19.39 18.4 18.47 18.59 4.30 3.87

@sbalaji1192
Copy link
Contributor Author

@YogeshJayaseelan The above callout is not related to the list widget. It's a know issue and being tracked here - #10659

@YogeshJayaseelan
Copy link
Contributor

@sbalaji1192 Apart from the list widget inside another list widget issue rest of everything works fine

@sbalaji1192 sbalaji1192 merged commit fab552c into release Feb 9, 2022
@sbalaji1192 sbalaji1192 deleted the task/list-widget-allowed-children branch February 9, 2022 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants