Skip to content

fix edra link/embed menus + url card metadata

jedmund requested to merge jedmund/edra-context-menu-fix into main

Created by: jedmund

Summary

  • right-click context menus and the post-paste convert dropdown now use floating-ui (flip + shift) so they stop rendering off the bottom/right of the viewport, plus arrow/Home/End keyboard nav on the embed context menu
  • consolidate link UI: drop the duplicate right-click context menu (and its edit dialog), add a "Convert to card" button to the existing bubble menu, and just preventDefault() the native browser menu on right-click of a link
  • fix url embed cards never auto-fetching og metadata after convert-to-card — refreshMetadata now writes via a position-targeted setNodeMarkup transaction instead of chain().updateAttributes() which silently no-ops when selection isn't on the embed
  • pin dev/preview server to port 5175 with strictPort

Test plan

  • long post that scrolls: right-click an embed near the bottom-right → menu flips/shifts to stay on screen
  • arrow keys / Home / End walk focus across embed context menu items, Enter activates, Escape dismisses
  • paste a URL near the bottom of the viewport → "Convert to card" prompt flips above the link
  • right-click a link → only the icon bubble menu shows (no second large menu, no native browser menu)
  • click "Convert to card" in the bubble menu → embed appears AND fetches title/image/favicon without needing manual Refresh
  • left-click flow on links unchanged
  • pnpm run dev starts on 5175 and errors instead of falling back if 5175 is taken

Merge request reports

Loading