Skip to content

🚀 Rune v1.6.0: The Adaptive Context Menu & Refined UX Update

Choose a tag to compare

@satadeep3927 satadeep3927 released this 10 Jun 09:09
· 17 commits to master since this release
7548c6f

✨ 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:
    • useAdaptiveMenu hook strictly handles coordinate mathematics, boundary constraints, and offscreen measurements using requestAnimationFrame.
    • useContextMenu hook encapsulates event listeners for clicks outside, Escape keys, and scroll interception.
    • ContextMenu component is now fully presentational, located inside components/ui.
  • Standardized imports: Cleaned up all consumer views and hooks to reference the modularized @/components/ui/ContextMenu components.