🚀 Rune v1.6.0: The Adaptive Context Menu & Refined UX Update
✨ What's New
- Adaptive Context Menu positioning: Rune's context menus (File Context, Editor Context, Tab Context, etc.) now dynamically adjust their location when clicked close to the window edges. If there isn't enough space at the bottom or right, the menu automatically flips upwards or leftwards and adjusts its height constraint, preventing any layout cutoffs.
- Portal-backed Rendering: Solved deep CSS hierarchy transform issues (especially from CodeMirror container styles) by rendering context menus inside a SolidJS
<Portal>mounted directly to the document body. - Scroll to Dismiss: Just like modern IDEs (such as VS Code), scrolling any container on the page will automatically and smoothly dismiss active context menus.
🛠Under the Hood (Developer Experience)
- Complete UI/Logic Separation: Successfully separated logic and UI components for context menus:
useAdaptiveMenuhook strictly handles coordinate mathematics, boundary constraints, and offscreen measurements using requestAnimationFrame.useContextMenuhook encapsulates event listeners for clicks outside, Escape keys, and scroll interception.ContextMenucomponent is now fully presentational, located insidecomponents/ui.
- Standardized imports: Cleaned up all consumer views and hooks to reference the modularized
@/components/ui/ContextMenucomponents.