Skip to content

feat: JSON viewer resizing and fullscreen support#863

Open
datlechin wants to merge 1 commit intomainfrom
feat/json-viewer-window
Open

feat: JSON viewer resizing and fullscreen support#863
datlechin wants to merge 1 commit intomainfrom
feat/json-viewer-window

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

Closes #858

  • Add "Open in Window" button to pop out JSON content into a resizable, fullscreen-capable native macOS window
  • Available from three entry points: popover toolbar, sidebar expanded view, and sidebar mini preview
  • Supports full editing with Save/Cancel, multiple simultaneous windows, and window size persistence across sessions
  • In-progress edits are preserved when popping out from the popover (current text, not original value, is transferred)

Implementation

  • New: JSONViewerWindowController — creates NSWindow instances with fullscreen support, cascading positions, and UserDefaults-based size persistence
  • Modified: JSONViewerView — added optional onPopOut callback that passes current text to the handler
  • Modified: JSONEditorContentView — threads columnName and onPopOut through to the viewer
  • Modified: DataGridView+Popovers — wires pop-out from the cell popover (dismisses popover, opens window)
  • Modified: RightSidebarView — pop-out button in expanded JSON header + mini preview, with safe field-ID-based commit closure
  • Modified: EditableFieldView, JsonEditorView — thread onPopOut callback through the sidebar field editor chain

Test plan

  • Double-click a JSON cell → popover opens → click pop-out button → window opens with current edits, popover closes
  • Resize window → close → pop out another JSON → opens at last saved size
  • Click green traffic light → window enters fullscreen
  • Edit JSON in window → Save → verify cell updates in data grid
  • Select row with JSON → expand in sidebar → click pop-out → window opens, sidebar stays expanded
  • Click pop-out icon on sidebar mini preview → window opens
  • Open two JSON viewer windows simultaneously → both work independently
  • Read-only context (query results) → window opens without Save/Cancel footer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON viewer: support resizing and fullscreen for large fields

1 participant