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: currentItem showing error in debugger for list widgets #10338

Merged

Conversation

ohansFavour
Copy link
Contributor

@ohansFavour ohansFavour commented Jan 12, 2022

This PR introduces the concept of private widgets. To prevent wasted evaluations, these widgets do not get evaluated.
For example, for widget Button1 in a List widget List1, List1.template.Button1.text gets evaluated, so there is no need to evaluate Button1.text.

Description

Fixes #8677

Type of change

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

How Has This Been Tested?

  • Manual

  • Jest

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: fix/currentItem-showing-error-in-debugger-for-list-widget 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 55.06 (0.05) 36.79 (0.19) 34.88 (0.06) 55.55 (0.05)
🟢 app/client/src/sagas/WidgetOperationSagas.tsx 51.54 (0.22) 39.02 (0.48) 52.08 (0) 52.79 (0)
🟢 app/client/src/utils/DSLMigrations.ts 73.18 (0.49) 69.62 (6.18) 71.13 (0.92) 72.99 (0.52)
🟢 app/client/src/utils/DynamicBindingUtils.ts 84.07 (0.55) 71.43 (1.79) 75.86 (0) 83.44 (0.62)
🟢 app/client/src/widgets/BaseWidget.tsx 78.86 (4.88) 44.44 (8.88) 75 (6.25) 77.97 (5.09)
🟢 app/client/src/widgets/ListWidget/widget/index.tsx 63.43 (1.48) 27.14 (1.25) 58.49 (1.63) 62.41 (1.62)
🟢 app/client/src/workers/DataTreeEvaluator.ts 77.9 (0.07) 61.27 (0.12) 76.4 (0.54) 77.66 (0.07)
🟢 app/client/src/workers/evaluationUtils.ts 58.15 (0.69) 54.49 (0.55) 62.96 (0.7) 55.91 (0.72)

@vercel
Copy link

vercel bot commented Jan 12, 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/2V72ZALGsTccLFBqFeRLkM6nQSaP
✅ Preview: https://appsmith-git-fix-currentitem-showing-error-8c970c-get-appsmith.vercel.app

@ohansFavour ohansFavour marked this pull request as draft January 12, 2022 08:42
@github-actions github-actions bot added the Bug Something isn't working label Jan 12, 2022
@github-actions
Copy link

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

@ohansFavour
Copy link
Contributor Author

/ok-to-test sha=df47ea2

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1686866872.
Workflow: Appsmith External Integration Test Workflow.
Commit: df47ea2.
PR: 10338.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/1686866872.
Commit: df47ea2.
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 2713.63 2144.67 2130.08 2207.86 2190.85 2277.42 10.80 9.66
painting 34.36 18.05 27.33 37.27 28.55 29.11 25.49 22.78
rendering 502.96 336.67 338.91 320.39 329.85 365.76 21.06 18.84
Edit input
scripting 333.87 270.62 262.99 316.23 309.89 298.72 10.23 9.15
painting 15.87 4.19 16.4 10.15 18.21 12.96 44.44 39.74
rendering 19.68 14.86 20.17 17.81 17.37 17.98 11.74 10.51
Clear input
scripting 759.32 787.67 744.98 760.31 787.19 767.89 2.45 2.19
painting 6.64 12.44 21.25 19.92 14.86 15.02 39.35 35.22
rendering 217.75 214.61 216.28 233.4 228.51 222.11 3.75 3.35
Edit input again
scripting 272.03 292.09 317.32 337.39 327.22 309.21 8.65 7.74
painting 5.05 5.31 17.64 8.59 16.07 10.53 56.60 50.62
rendering 22.24 20.31 22.31 28.48 18.62 22.39 16.66 14.92

@ohansFavour ohansFavour marked this pull request as ready for review January 12, 2022 20:58
@ohansFavour
Copy link
Contributor Author

/ok-to-test sha=4256da5

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1691534830.
Workflow: Appsmith External Integration Test Workflow.
Commit: 4256da5.
PR: 10338.

Copy link
Contributor

@rishabhrathod01 rishabhrathod01 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.
Few nitpicks.

app/client/src/utils/DSLMigrations.ts Outdated Show resolved Hide resolved
app/client/src/workers/DataTreeEvaluator.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@rishabhrathod01 rishabhrathod01 left a comment

Choose a reason for hiding this comment

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

Also, can we add a test for privateWidgets specifically?

  1. addPrivateWidgetsToAllListWidgets
  2. isPrivateEntityPath

@ohansFavour ohansFavour marked this pull request as draft January 14, 2022 01:10
@ohansFavour ohansFavour force-pushed the fix/currentItem-showing-error-in-debugger-for-list-widget branch from 4256da5 to b035aa9 Compare January 14, 2022 11:31
@ohansFavour
Copy link
Contributor Author

Also, can we add a test for privateWidgets specifically?

  1. addPrivateWidgetsToAllListWidgets
  2. isPrivateEntityPath

Done

@ohansFavour
Copy link
Contributor Author

/ok-to-test sha=0d10484

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1712938598.
Workflow: Appsmith External Integration Test Workflow.
Commit: 0d10484.
PR: 10338.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/1712938598.
Commit: 0d10484.
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 2374.74 1929.45 1931.41 1942.43 2037.15 2043.04 9.34 8.35
painting 32.7 33.53 11.54 22.43 16.26 23.29 41.95 37.53
rendering 386.71 275.03 293.62 284.56 346.61 317.31 15.03 13.44
Edit input
scripting 364.51 347.28 324.7 347.61 308.35 338.49 6.50 5.81
painting 15.32 8.77 9.32 34.16 19.58 17.43 59.50 53.18
rendering 16 15.73 27.22 13.82 12.52 17.06 34.35 30.72
Clear input
scripting 707.51 711.67 757.8 766.41 695.72 727.82 4.39 3.93
painting 15.1 11.31 9.36 9.73 17.45 12.59 28.12 25.18
rendering 204.44 198.6 209.04 216.49 198.29 205.37 3.72 3.33
Edit input again
scripting 299.8 264.79 247.98 268.89 237.29 263.75 9.04 8.09
painting 18.11 6.73 12.16 7.63 9.61 10.85 42.03 37.60
rendering 17.73 16.27 17.14 20.79 38.13 22.01 41.66 37.26

@ohansFavour ohansFavour marked this pull request as draft January 19, 2022 15:59
@ohansFavour ohansFavour marked this pull request as ready for review January 19, 2022 16:39
@ohansFavour
Copy link
Contributor Author

/ok-to-test sha=ed36a5c

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1719133778.
Workflow: Appsmith External Integration Test Workflow.
Commit: ed36a5c.
PR: 10338.

@github-actions
Copy link

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

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Mean SD.Sample SD.Population
Edit input
scripting 347.16 327.36 342.93 326.65 338.91 336.6 2.75 2.45
painting 21.44 22.36 5.25 6.53 24.5 16.02 58.18 52.06
rendering 16.22 15 13.42 14.83 27.89 17.47 33.83 30.22
Clear input
scripting 792.22 804.53 790.69 783.43 782.38 790.65 1.12 1.01
painting 10.05 23.43 10.78 20.04 10.27 14.91 42.59 38.10
rendering 224.88 239.03 221.97 224.57 213.76 224.84 4.06 3.62
Edit input again
scripting 339.3 301.28 287.42 274.38 709.78 382.43 48.27 43.17
painting 31.16 5.59 8.14 4.86 6.91 11.33 98.50 88.08
rendering 29.86 22.53 20.82 19 22.06 22.85 18.16 16.24
Click on table row
scripting 2221.78 2206.9 2202.64 2256.92 2236.99 2225.05 1.00 0.90
painting 47.91 23.07 25.14 41.06 27 32.84 33.47 29.93
rendering 360.43 314.94 313.35 373.32 328.53 338.11 8.07 7.22

@ohansFavour
Copy link
Contributor Author

/ok-to-test sha=1a499b2

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1719560530.
Workflow: Appsmith External Integration Test Workflow.
Commit: 1a499b2.
PR: 10338.

Copy link
Contributor

@rishabhrathod01 rishabhrathod01 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

@ohansFavour ohansFavour merged commit f7ce277 into release Jan 20, 2022
@ohansFavour ohansFavour deleted the fix/currentItem-showing-error-in-debugger-for-list-widget branch January 20, 2022 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] currentItem showing error in List widget
2 participants