Issue #6122✓ SolvedOpened September 4, 2024by mohamedsalem4013 reactions

Fix and refactor Sorter.ts

Quick answerby mohamedsalem4012

This's done.

Read full answer below ↓

Question

  • Fix the Sorter usage in StyleManager (regression with sorting property layers)
  • Refactor Sorter with the usage of Components.canMove
  • Update canMove with the check of dropping main Symbol inside its own instance.

Answers (3)

👍 Most helpfulmohamedsalem401October 11, 2024

This's done.

mohamedsalem401September 5, 2024

The idea is to refactor the sorter for improved maintainability and readability. We can implement the following changes:Make Sorter class depend on an abstract tree structure rather than relying on specific implementations like Component or Layers, make the Sorter class work with a more generic, ab...

GJS HelperMay 17, 2026

This fix and refactoring addresses several key areas within GrapesJS's Sorter.ts and component movement logic, resolving a regression in the Style Manager and enhancing the overall drag-and-drop experience, especially concerning reusable components (Symbols). Fix Sorter usage in StyleManager (regre...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.