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

feat: Track recently forked templates #13159

Merged
merged 7 commits into from
May 10, 2022

Conversation

nayan-rafiq
Copy link
Contributor

Description

This PR adds feature to track recently forked templates by the user.

Fixes #12339

Type of change

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

How Has This Been Tested?

  • JUnit tests

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 Apr 20, 2022

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

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview May 10, 2022 at 6:21AM (UTC)

@nayan-rafiq nayan-rafiq self-assigned this Apr 20, 2022
@github-actions github-actions bot added New Developers Pod Issues that new developers face while exploring the IDE Platform Pod labels Apr 20, 2022
Copy link
Member

@AnaghHegde AnaghHegde left a comment

Choose a reason for hiding this comment

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

One last thing, i noticed that we are adding the template ids to the userData object. Suppose if i use a same template multiples times, will the same id is added to the userData object multiple time? If yes, then can we keep the count or reorder the list of ids so that last used is always present at the top ?

@nayan-rafiq nayan-rafiq changed the title Feature/track recently forked templates feat: Track recently forked templates Apr 25, 2022
@nayan-rafiq
Copy link
Contributor Author

One last thing, i noticed that we are adding the template ids to the userData object. Suppose if i use a same template multiples times, will the same id is added to the userData object multiple time? If yes, then can we keep the count or reorder the list of ids so that last used is always present at the top ?

Good point. It actually does this. The algorithm to add a new template id to the list is:

  • Prepend template id to the list
  • Remove duplicates from the list
  • Truncate the list to 5 if number of records are more than 5

The function that does this already exists and we use the same method to track recently used applications and organizations.

@nayan-rafiq
Copy link
Contributor Author

/ok-to-test sha=cab1e5f

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2220085654.
Workflow: Appsmith External Integration Test Workflow.
Commit: cab1e5f.
PR: 13159.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2220085654.
Commit: cab1e5f.
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 2528.23 1266.69 1198.41 1448.25 1209.85 1266.69 1530.29 37.04 33.13
painting 7.39 8.78 9.79 27.13 6.75 8.78 11.97 71.51 63.91
rendering 593.54 589.68 592.65 544.56 601.89 592.65 584.46 3.89 3.48
BIND_TABLE_DATA
scripting 2209.68 2360.34 2238.67 2216.72 2139.06 2216.72 2232.89 3.60 3.22
painting 44.48 34.64 52.82 39.31 65.26 44.48 47.3 25.56 22.88
rendering 1136.17 726.21 937.74 857.35 1303.27 937.74 992.15 23.06 20.63
CLICK_ON_TABLE_ROW
scripting 5588.38 4623.28 4924.53 4426.2 4559.37 4623.28 4824.35 9.63 8.61
painting 44.21 62.42 78.48 59.84 56.87 59.84 60.36 20.39 18.24
rendering 1432.67 1258.9 1582.62 1267.85 1434.14 1432.67 1395.24 9.67 8.65
UPDATE_POST_TITLE
scripting 7024.6 5680.39 5427.93 5886.75 5877.33 5877.33 5979.4 10.26 9.18
painting 39.73 37.15 36.94 35.55 31.24 36.94 36.12 8.64 7.72
rendering 743.04 687.69 745.57 690.33 777.71 743.04 728.87 5.33 4.77
OPEN_MODAL
scripting 4785.33 4598.61 2314 4176.52 2179.44 4176.52 3610.78 35.05 31.35
painting 34.41 34.85 28.36 19.8 42.71 34.41 32.03 26.63 23.82
rendering 844.05 877.89 833.49 820.01 789.93 833.49 833.07 3.87 3.46
CLOSE_MODAL
scripting 1789.27 1517.88 2062.22 1406.71 1369.59 1517.88 1629.13 17.96 16.06
painting 16.29 14.23 44.86 20.15 23.08 20.15 23.72 51.85 46.37
rendering 569.53 592.78 662.43 620.37 578.84 592.78 604.79 6.20 5.55

1 similar comment
@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2220085654.
Commit: cab1e5f.
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 2528.23 1266.69 1198.41 1448.25 1209.85 1266.69 1530.29 37.04 33.13
painting 7.39 8.78 9.79 27.13 6.75 8.78 11.97 71.51 63.91
rendering 593.54 589.68 592.65 544.56 601.89 592.65 584.46 3.89 3.48
BIND_TABLE_DATA
scripting 2209.68 2360.34 2238.67 2216.72 2139.06 2216.72 2232.89 3.60 3.22
painting 44.48 34.64 52.82 39.31 65.26 44.48 47.3 25.56 22.88
rendering 1136.17 726.21 937.74 857.35 1303.27 937.74 992.15 23.06 20.63
CLICK_ON_TABLE_ROW
scripting 5588.38 4623.28 4924.53 4426.2 4559.37 4623.28 4824.35 9.63 8.61
painting 44.21 62.42 78.48 59.84 56.87 59.84 60.36 20.39 18.24
rendering 1432.67 1258.9 1582.62 1267.85 1434.14 1432.67 1395.24 9.67 8.65
UPDATE_POST_TITLE
scripting 7024.6 5680.39 5427.93 5886.75 5877.33 5877.33 5979.4 10.26 9.18
painting 39.73 37.15 36.94 35.55 31.24 36.94 36.12 8.64 7.72
rendering 743.04 687.69 745.57 690.33 777.71 743.04 728.87 5.33 4.77
OPEN_MODAL
scripting 4785.33 4598.61 2314 4176.52 2179.44 4176.52 3610.78 35.05 31.35
painting 34.41 34.85 28.36 19.8 42.71 34.41 32.03 26.63 23.82
rendering 844.05 877.89 833.49 820.01 789.93 833.49 833.07 3.87 3.46
CLOSE_MODAL
scripting 1789.27 1517.88 2062.22 1406.71 1369.59 1517.88 1629.13 17.96 16.06
painting 16.29 14.23 44.86 20.15 23.08 20.15 23.72 51.85 46.37
rendering 569.53 592.78 662.43 620.37 578.84 592.78 604.79 6.20 5.55

@nayan-rafiq
Copy link
Contributor Author

/ok-to-test sha=cab1e5f

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2245256873.
Workflow: Appsmith External Integration Test Workflow.
Commit: cab1e5f.
PR: 13159.

@github-actions
Copy link

github-actions bot commented May 6, 2022

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label May 6, 2022
@nayan-rafiq
Copy link
Contributor Author

/ok-to-test sha=790276f

@github-actions
Copy link

github-actions bot commented May 9, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2292152969.
Workflow: Appsmith External Integration Test Workflow.
Commit: 790276f.
PR: 13159.

@nayan-rafiq
Copy link
Contributor Author

/ok-to-test sha=e0a2873

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2298759293.
Workflow: Appsmith External Integration Test Workflow.
Commit: e0a2873.
PR: 13159.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2298759293.
Commit: e0a2873.
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 1047.73 746.42 720.41 870.94 982.46 870.94 873.59 16.37 14.64
painting 8.22 5.34 3.99 8.3 8.3 8.22 6.83 29.72 26.65
rendering 470.4 293.2 281.15 410.68 331.03 331.03 357.29 22.67 20.27
BIND_TABLE_DATA
scripting 2740.46 2214.24 2431.18 2099.33 2339.12 2339.12 2364.87 10.34 9.25
painting 17.77 15.79 27.45 14.48 12.76 15.79 17.65 32.75 29.29
rendering 725.92 640.15 701.94 993.45 736.41 725.92 759.57 17.90 16.01
CLICK_ON_TABLE_ROW
scripting 1926.61 1835.81 1959.05 4168.93 2138.23 1959.05 2405.73 41.22 36.87
painting 24.49 12.62 13.07 62.52 28.06 24.49 28.15 72.43 64.80
rendering 283.21 275.03 293.37 980.2 326.73 293.37 431.71 71.17 63.66
UPDATE_POST_TITLE
scripting 2830.59 2945.47 3066.46 4181.34 3482.08 3066.46 3301.19 16.66 14.90
painting 12.68 17.42 16.23 25.52 37.55 17.42 21.88 45.43 40.63
rendering 356.82 358.38 371.85 484.06 413.53 371.85 396.93 13.56 12.13
OPEN_MODAL
scripting 1270.75 1294.22 1521.05 2097.26 1584.71 1521.05 1553.6 21.47 19.20
painting 9.89 17.04 12.23 15.5 15.78 15.5 14.09 20.87 18.67
rendering 443.06 443.02 531.28 685.99 480.91 480.91 516.85 19.59 17.52
CLOSE_MODAL
scripting 873.45 826.4 867.37 1091 802 867.37 892.04 12.90 11.54
painting 4.95 4.69 5.96 9.49 8.79 5.96 6.78 32.74 29.35
rendering 392.87 375.51 361.66 391.14 380.37 380.37 380.31 3.34 2.99
SELECT_WIDGET_MENU_OPEN
scripting 1475.45 1556.13 1522.13 1527.22 1582.81 1527.22 1532.75 2.63 2.35
painting 5.94 20.13 13.32 11.66 20.65 13.32 14.34 43.03 38.49
rendering 516.5 525.65 524.19 572.28 547.63 525.65 537.25 4.23 3.79
SELECT_WIDGET_SELECT_OPTION
scripting 256.37 251.12 249.87 260.26 406.34 256.37 284.79 23.91 21.38
painting 2.82 4.04 2.73 4.22 2.94 2.94 3.35 21.49 19.10
rendering 16.82 16.13 16.2 17.39 17.55 16.82 16.82 3.92 3.51

1 similar comment
@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2298759293.
Commit: e0a2873.
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 1047.73 746.42 720.41 870.94 982.46 870.94 873.59 16.37 14.64
painting 8.22 5.34 3.99 8.3 8.3 8.22 6.83 29.72 26.65
rendering 470.4 293.2 281.15 410.68 331.03 331.03 357.29 22.67 20.27
BIND_TABLE_DATA
scripting 2740.46 2214.24 2431.18 2099.33 2339.12 2339.12 2364.87 10.34 9.25
painting 17.77 15.79 27.45 14.48 12.76 15.79 17.65 32.75 29.29
rendering 725.92 640.15 701.94 993.45 736.41 725.92 759.57 17.90 16.01
CLICK_ON_TABLE_ROW
scripting 1926.61 1835.81 1959.05 4168.93 2138.23 1959.05 2405.73 41.22 36.87
painting 24.49 12.62 13.07 62.52 28.06 24.49 28.15 72.43 64.80
rendering 283.21 275.03 293.37 980.2 326.73 293.37 431.71 71.17 63.66
UPDATE_POST_TITLE
scripting 2830.59 2945.47 3066.46 4181.34 3482.08 3066.46 3301.19 16.66 14.90
painting 12.68 17.42 16.23 25.52 37.55 17.42 21.88 45.43 40.63
rendering 356.82 358.38 371.85 484.06 413.53 371.85 396.93 13.56 12.13
OPEN_MODAL
scripting 1270.75 1294.22 1521.05 2097.26 1584.71 1521.05 1553.6 21.47 19.20
painting 9.89 17.04 12.23 15.5 15.78 15.5 14.09 20.87 18.67
rendering 443.06 443.02 531.28 685.99 480.91 480.91 516.85 19.59 17.52
CLOSE_MODAL
scripting 873.45 826.4 867.37 1091 802 867.37 892.04 12.90 11.54
painting 4.95 4.69 5.96 9.49 8.79 5.96 6.78 32.74 29.35
rendering 392.87 375.51 361.66 391.14 380.37 380.37 380.31 3.34 2.99
SELECT_WIDGET_MENU_OPEN
scripting 1475.45 1556.13 1522.13 1527.22 1582.81 1527.22 1532.75 2.63 2.35
painting 5.94 20.13 13.32 11.66 20.65 13.32 14.34 43.03 38.49
rendering 516.5 525.65 524.19 572.28 547.63 525.65 537.25 4.23 3.79
SELECT_WIDGET_SELECT_OPTION
scripting 256.37 251.12 249.87 260.26 406.34 256.37 284.79 23.91 21.38
painting 2.82 4.04 2.73 4.22 2.94 2.94 3.35 21.49 19.10
rendering 16.82 16.13 16.2 17.39 17.55 16.82 16.82 3.92 3.51

@nayan-rafiq nayan-rafiq merged commit c75e330 into release May 10, 2022
@nayan-rafiq nayan-rafiq deleted the feature/track-recently-forked-templates branch May 10, 2022 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Developers Pod Issues that new developers face while exploring the IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recently used templates | BE
3 participants