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

[TASK]: Save skeleton loader on client side only to boost building blocks drag and drop #33657

Closed
jacquesikot opened this issue May 22, 2024 · 1 comment
Assignees
Labels
Accelerators Product Issues related to app building accelerators Building blocks Building blocks on cavas, on templates listing or drag and drop of building blocks. Task A simple Todo Templates Product Issues related to Templates Widgets & Accelerators Pod Issues related to widgets & Accelerators

Comments

@jacquesikot
Copy link
Contributor

Context
The current process for dropping a building block onto the canvas is experiencing performance issues. Specifically, the time taken post-drop to fully ready the building block is excessive, impacting user experience.

Problem
A key performance bottleneck has been identified in the numerous API calls required to complete the building block drop operation. These calls are proving to be both time-consuming and inefficient.

Solution
To address this bottleneck, this PR implements a significant optimisation by rendering the skeleton loader using local state management only. This change eliminates the need for an additional API call to the backend for adding the skeleton loader, thus streamlining the building block drop process.

This issues is a part of #33312

@jacquesikot jacquesikot added Building blocks Building blocks on cavas, on templates listing or drag and drop of building blocks. Templates Product Issues related to Templates labels May 22, 2024
@jacquesikot jacquesikot self-assigned this May 22, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added the Task A simple Todo label May 22, 2024
@jacquesikot
Copy link
Contributor Author

The current solution is not viable at this moment as it necessitates extensive modifications to implement.

Short-term Solution
This workaround involves introducing a new action and reducer to manage the addition of skeleton widgets to the canvas. It doesn't involve making any API calls to save the layout. However, this approach is suboptimal and temporary; it will alter the canvas state and may introduce edge cases to a solution that is otherwise stable.

Long-term Solution
The proper way to implement this feature is by leveraging meta widgets, a concept already present in the codebase and used by the existing list widget. This approach is more scalable and maintainable but requires significant changes to the canvas widget to accommodate meta widgets. Although it is more complex and time-consuming, this solution ensures better long-term stability and flexibility compared to the short-term fix.

Given the scope and implications of the changes needed for the proper solution, the immediate implementation will not proceed. We will close this issue and revisit it when we have the bandwidth to implement the long-term solution.

@Nikhil-Nandagopal Nikhil-Nandagopal added the Widgets & Accelerators Pod Issues related to widgets & Accelerators label Aug 6, 2024
@github-actions github-actions bot added the Widgets Product This label groups issues related to widgets label Aug 6, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added Accelerators Product Issues related to app building accelerators and removed Widgets Product This label groups issues related to widgets labels Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accelerators Product Issues related to app building accelerators Building blocks Building blocks on cavas, on templates listing or drag and drop of building blocks. Task A simple Todo Templates Product Issues related to Templates Widgets & Accelerators Pod Issues related to widgets & Accelerators
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants