- Replaced the legacy ContextMenuItem structure with a new CanvasMenuItem across various files, enhancing consistency in context menu management.
- Introduced CanvasMenuBuilder for fluent menu construction, allowing for easier addition of items and submenus.
- Updated Canvas and related components to utilize the new menu system, improving organization and maintainability of context menus.
Benefits:
- Streamlines context menu item management, making it more intuitive and flexible.
- Enhances code readability and reduces duplication, facilitating future enhancements.
- Introduced a new `PopupRegistry` class to manage persistent popups, improving the organization and lifecycle handling of popups within the canvas.
- Added `canvas_menu.cc` and `canvas_menu.h` to define menu item and section structures, along with rendering functions for a more declarative menu system.
- Updated `canvas.cc` to utilize the new popup registry, ensuring backward compatibility with legacy popup handling during the migration phase.
Benefits:
- Streamlines popup management, enhancing usability and maintainability of the canvas UI.
- Facilitates the addition of complex menu structures and interactions, improving overall user experience.