appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.63k stars 3.74k forks source link

Task: Remove redundant get template details call as we already have all the info in the get templates call #33437

Open rahulbarwal opened 6 months ago

rahulbarwal commented 6 months ago

<@U04V0N2K0G1> <@U04LTQU5E8K> I noticed that we are calling the API GET /api/v1/app-templates/{templatedId} when any template is opened in a preview mode. But the get All active templates api/v1/app-templates which is used for rendering the templates homepage has the data available already. Can you guys remove this API call and fetch it from the browser cache?

Slack Message

akshayvijayjain commented 6 months ago

@rahulbarwal , are there more details in slack message, as we cannot access it, we are trying to check, if we can pick this up

saiprabhu-dandanayak commented 6 months ago

@rahulbarwal , @Nikhil-Nandagopal , i have noticed an API call to GET /api/v1/app-templates/{templateId} when opening a template in preview mode. This seems redundant since the GET /api/v1/app-templates call already has the necessary data. Could you check if there are more details in the linked Slack message? i am unable to access it and want to see if i can proceed with this task.

rahulbarwal commented 6 months ago

@akshayvijayjain , @saiprabhu-dandanayak Basically when we land on app.appsmith.com we load all templates using /api/v1/app-templates and that list gets stored in redux.

The second request can be removed completely from the UI.

saiprabhu-dandanayak commented 5 months ago

Hi @rahulbarwal , i have raised PR for this issue could you please assign a review for this .

rahulbarwal commented 5 months ago

Hey @saiprabhu-dandanayak Thanks for picking this up 🙏 . Can you share the link to your PR? @jacquesikot please review it and take next steps.

saiprabhu-dandanayak commented 5 months ago

Hi @rahulbarwal ,this is PR for this issue