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: fork templates inside an existing app #17184

Merged
merged 8 commits into from
Sep 30, 2022
Merged

Conversation

akash-codemonk
Copy link
Contributor

@akash-codemonk akash-codemonk commented Sep 29, 2022

Same as the original PR which has been reviewed.

The only new addition is #17038 which has been reviewed.

Description

Templates phase 2

Previously templates were forkable only to an existing organisation as a new app. With this new feature templates can be forked inside an existing app(or merge to an existing app as in all pages of the template are added to the current app).

test.mov

Epic link: #13005

Fixes #14446
Fixes #15912
Fixes #14449
Fixes #14446
Fixes #14447
Fixes #14450
Fixes #15745
Fixes #15879

Changes:

  • A lot of the code changes involve making the existing templates ui reusable as the layout is almost the same as the one in the templates tab(which is in prod already).
  • We also add a new page context menu when clicked on + icon.
  • Tweaks to UI of existing templates tab.
  • We have removed the templates notification banner which was first added when templates was added.
  • Remove widgets from the templates filter list.
  • There is no /generate-page route but there is a /generate-page/form route as before. /generate-page is used on release to show a blank canvas. With this MR there is no separate route for a blank page, we show the empty canvas along with the two cards at the top.
  • ReconnectDatasourceModal is made available to use inside the app. This is shown when we import/fork an app/template with datasources that need to authorised. This was done outside an application but now since template can be forked inside an app this is required. When performed inside the app we want the navigation to happen to a particular page instead of the default page of the application, so I have added a new action setPageIdForImport to set the page where we want to be navigated to.
  • Small change in widget pasting where I have a check for /generate-page path as it does not exist in this PR. This condition was there as we wanted to paste widgets to the canvas when the user was on that route.
  • Removed GitErrorPopup from ReconnectModal which was causing tests to fail as there were two modal for GitErrorPopup at the same time. The GitErrorPopup is only shown when have conflicts during a pull. It is likely we forgot to remove this from the ReconnectModal

Type of change

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

How Has This Been Tested?

Cypress test which tests forking the template.
QA tested

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 Sep 29, 2022

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

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview Sep 30, 2022 at 4:51AM (UTC)

@akash-codemonk akash-codemonk marked this pull request as draft September 29, 2022 10:13
@github-actions github-actions bot added Bug Something isn't working Deploy Preview Issues found in Deploy Preview Frontend This label marks the issue or pull request to reference client code Needs Triaging Needs attention from maintainers to triage New Developers Pod Issues that new developers face while exploring the IDE Task A simple Todo Templates Pod Issues related to Templates Verified When issue is retested post its fixed Enhancement New feature or request and removed Bug Something isn't working labels Sep 29, 2022
@github-actions github-actions bot added Bug Something isn't working and removed Bug Something isn't working labels Sep 29, 2022
@akash-codemonk akash-codemonk marked this pull request as ready for review September 29, 2022 13:09
@akash-codemonk
Copy link
Contributor Author

/ok-to-test sha=3459b21

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3152175528.
Workflow: Appsmith External Integration Test Workflow.
Commit: 3459b21.
PR: 17184.

@akash-codemonk
Copy link
Contributor Author

/ok-to-test sha=6e89103

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3156409492.
Workflow: Appsmith External Integration Test Workflow.
Commit: 6e89103.
PR: 17184.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/3156409492.
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 1036.53 1311.76 916.21 958.17 1037.85 916.21 1036.53 1052.1 37.60 14.66 13.11
painting 6.12 21 5.33 5.44 6.47 5.33 6.12 8.87 176.66 76.66 68.55
rendering 700.96 908.74 633.21 636.95 717.66 633.21 700.96 719.5 38.29 15.60 13.96
SELECT_WIDGET_SELECT_OPTION
scripting 167.22 264.74 156.71 190.94 173.19 156.71 173.19 190.56 56.69 22.72 20.32
painting 3.56 20.13 7.18 6.2 3.55 3.55 6.2 8.12 204.19 84.98 75.99
rendering 328.47 468.58 315.74 347.26 336.64 315.74 336.64 359.34 42.53 17.30 15.47
SELECT_CATEGORY
scripting 575.09 346.69 361.72 344.59 424.47 344.59 361.72 410.51 56.15 23.77 21.26
painting 10.52 4.74 4.25 3.38 8.18 3.38 4.74 6.21 114.98 48.63 43.48
rendering 198.91 103.73 104.86 105.18 129.21 103.73 105.18 128.38 74.14 31.82 28.46
BIND_TABLE_DATA
scripting 1699.38 1103.72 1097.3 1070.14 1106.25 1070.14 1103.72 1215.36 51.77 22.29 19.94
painting 21.54 14.62 15 16.82 23.1 14.62 16.82 18.22 46.54 21.30 19.05
rendering 619.68 818.1 814.54 811.44 899.13 619.68 814.54 792.58 35.26 13.04 11.66
CLICK_ON_TABLE_ROW
scripting 1077.58 803.38 898.19 897.44 1350.03 803.38 898.19 1005.32 54.38 21.56 19.29
painting 13.93 9.69 10.18 17.69 11.34 9.69 11.34 12.57 63.64 26.25 23.47
rendering 333.75 300.66 308.89 301.05 327.56 300.66 308.89 314.38 10.53 4.89 4.37
UPDATE_POST_TITLE
scripting 1624.37 1321.61 1309.82 1460.66 1632.53 1309.82 1460.66 1469.8 21.96 10.65 9.53
painting 18.02 13.54 13.8 17.74 19.11 13.54 17.74 16.44 33.88 15.69 14.05
rendering 678.62 590.61 595.8 617.28 659.05 590.61 617.28 628.27 14.01 6.20 5.55
OPEN_MODAL
scripting 692.95 449.87 443.89 450.4 508.3 443.89 450.4 509.08 48.92 20.84 18.64
painting 15.3 8.91 8.5 9.34 15.9 8.5 9.34 11.59 63.85 31.75 28.39
rendering 1555.31 1180.34 1178.38 1189.05 1261.53 1178.38 1189.05 1272.92 29.61 12.69 11.35
CLOSE_MODAL
scripting 354.82 220.18 645.77 226.25 264.83 220.18 264.83 342.37 124.31 51.97 46.48
painting 7.81 14.58 7.82 7.75 7.21 7.21 7.81 9.03 81.62 34.44 30.79
rendering 1019.07 891.38 898.74 888.66 936.01 888.66 898.74 926.77 14.07 5.93 5.31

@github-actions github-actions bot added the High This issue blocks a user from building or impacts a lot of users label Sep 30, 2022
@github-actions github-actions bot removed the Bug Something isn't working label Sep 30, 2022
@akash-codemonk akash-codemonk merged commit a560051 into release Sep 30, 2022
@akash-codemonk akash-codemonk deleted the feat/templates-v2 branch September 30, 2022 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deploy Preview Issues found in Deploy Preview Enhancement New feature or request Frontend This label marks the issue or pull request to reference client code High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage New Developers Pod Issues that new developers face while exploring the IDE Task A simple Todo Templates Pod Issues related to Templates Verified When issue is retested post its fixed
Projects
None yet
2 participants