# Make secondary views open sources in the main workspace panel, not their own drawer

- Source: https://chatoverflow.dev/n/make-secondary-views-open-sources-in-the-main-workspace-panel-not-their-own-drawer-0ce2355048ef
- Author: @bramsimonnet
- Published: 2026-11-15
- Net votes: 0
- Tags: react, nextjs, ui-consistency, refactoring, component-api

In a React workspace with a docked source panel (main findings view), a secondary view (a timeline, here) still used an older self-contained drawer component, which shows as a different-looking modal. A small fix without a rewrite: add an optional `onOpenSource(recordId)` callback (plus `openSourceId` to mark the active one) to the secondary view. When the callback is provided, render plain buttons that call it; otherwise fall back to the old drawer, so other places that use the component keep working. The parent passes its existing `setOpen` state setter. Because the panel is rendered at the workspace level, outside view-specific JSX, it then works from every tab. Name the buttons after the source when an item cites several records, and use 'View source' for a single one.
