Title: Proposal: inline dock mode for persistent side-panel workflows · Issue #287 · devframes/devframe · GitHub
Open Graph Title: Proposal: inline dock mode for persistent side-panel workflows · Issue #287 · devframes/devframe
X Title: Proposal: inline dock mode for persistent side-panel workflows · Issue #287 · devframes/devframe
Description: Context The current embedded dock works well when a developer opens a tool briefly and then returns to the application. Float and edge modes both sit over the page, though, which is less comfortable when the DevTools panel is part of the...
Open Graph Description: Context The current embedded dock works well when a developer opens a tool briefly and then returns to the application. Float and edge modes both sit over the page, though, which is less comfortabl...
X Description: Context The current embedded dock works well when a developer opens a tool briefly and then returns to the application. Float and edge modes both sit over the page, though, which is less comfortabl...
Opengraph URL: https://github.com/devframes/devframe/issues/287
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: inline dock mode for persistent side-panel workflows","articleBody":"## Context\n\nThe current embedded dock works well when a developer opens a tool briefly and then returns to the application. Float and edge modes both sit over the page, though, which is less comfortable when the DevTools panel is part of the workflow rather than an occasional interruption.\n\nOne example is a developer working with a persistent reference or feedback panel:\n\n- Keep API responses, schema documentation, component props, accessibility results, or other reference data open beside the application.\n- Interact with the application while watching that panel update.\n- Edit the source and let HMR update both the application and the DevTools view.\n- Compare the live result against the reference data without repeatedly reopening or moving an overlay.\n\nThis is similar to working with browser DevTools docked to the side. The application gets a smaller layout area, but the panel no longer covers the thing being inspected. Clicking around the page also does not dismiss it.\n\nI would like to explore whether `@devframes/hub-ui` should support this as a third dock mode:\n\n```ts\ntype DockMode = 'float' | 'edge' | 'inline'\n```\n\n## Proposal\n\nThe host would opt in by providing a mount target as part of its own layout:\n\n```html\n\u003cmain id=\"app\">\u003c/main>\n\u003caside id=\"devframes-root\">\u003c/aside>\n```\n\n```ts\ncreateUi({\n dockPreferences: {\n defaultMode: 'inline',\n },\n})\n```\n\n`createUi()` could default the selector to `#devframes-root`, with an optional `inlineTarget` override.\n\nA viewer adapter could provide a more natural default for its own users. For example, Vite DevTools could default to `#devtools-root` and expose the same override through `DevTools()`:\n\n```ts\nDevTools({\n inlineTarget: '#custom-devtools-root',\n dockPreferences: {\n defaultMode: 'inline',\n },\n})\n```\n\nProviding a target would make Inline available. It would not select the mode automatically, and `defaultMode` would remain a first-use seed rather than overriding an existing browser preference.\n\nThe host would own the surrounding grid or flex layout. DevTools would only publish state on the target:\n\n```html\n\u003caside\n data-devframes-state=\"open\"\n data-devframes-position=\"right\"\n/>\n```\n\nThe proposed states are:\n\n- `open`: a panel is selected.\n- `collapsed`: the full dock rail remains visible, with no panel selected.\n- `inactive`: DevTools is floating, edge-mounted, hidden, unauthorized, or open in a popup.\n\nFor resizing, DevTools could reuse its existing persisted width and height and expose them as CSS custom properties:\n\n```css\n--devframes-inline-width: 42vw;\n--devframes-inline-height: 38vh;\n--devframes-inline-rail-size: 40px;\n```\n\nThe host decides how to consume or clamp those values. DevTools would not change body padding, application dimensions, or host layout styles directly.\n\n## Expected behavior\n\nInline would remain user-switchable alongside Float and Edge.\n\nWhen active:\n\n- A fresh tab starts with the complete dock rail and no selected panel.\n- Selecting a dock opens its panel.\n- Selecting the active dock again collapses back to the rail.\n- Escape, Close Panel, and the other existing explicit close actions also collapse it.\n- Clicking elsewhere on the application does not close it.\n- Idle timeout and edge-toolbar auto-collapse do not apply.\n- Mode and geometry keep using the existing local-storage state.\n- Open panel, selected dock, and route keep using the existing per-tab session state.\n- Left, right, top, and bottom positions remain available. DevTools orients its rail and panel, then publishes the position for host CSS to arrange the page.\n\nHide DevTools and popup mode would make the target inactive rather than leaving the rail behind.\n\n## Target resolution and fallback\n\nThe configured selector should resolve to exactly one element.\n\nIt would be useful for the resolver to search the document and reachable open shadow roots, since application shells are often web components. Closed shadow roots and iframe documents would remain outside the selector contract.\n\nFramework rendering and HMR can add or replace the target after the bootstrap starts. A small observer could retry while the target is missing and detect removal of the active target, without continuously rescanning the page once the target is stable.\n\nIf Inline is selected but no unique target can be found:\n\n- Log one browser-side configuration error.\n- Temporarily render Edge mode.\n- Keep the saved preference as Inline.\n- Hide Inline from mode controls while it is unavailable.\n- Restore it if the target appears later.\n\n## Possible implementation direction\n\nI do not think moving the complete existing custom element into the target is safe.\n\nThe embedded element also owns command palettes, confirmations, toasts, menus, and tooltips. A host target may create a containing or stacking context through `transform`, `contain`, `overflow`, or z-index. That could trap global overlays, which is related to the positioning problem previously discussed in [#205](https://github.com/devframes/devframe/issues/205).\n\nA safer shape would use two custom elements backed by one RPC connection and dock context:\n\n```text\ndocument.body\n└── embedded controller\n ├── float/edge shell when applicable\n └── command palette, dialogs, toasts, menus, tooltips\n\ninline target\n└── inline rail and selected panel\n```\n\nThe inline shell could adapt the existing edge shell rather than introduce a second dock implementation. It would reuse the current entries, views, position controls, resizer, geometry, and persistence, with small branches for target-relative layout and manual collapse behavior.\n\nThe Vite adapter would only need to forward `inlineTarget` and supply its `#devtools-root` default. The actual behavior would stay framework-neutral in hub-ui.\n\n## Why I am opening an issue first\n\nThis looks useful, but it is larger than adding another mode branch.\n\nThe main challenges seem to be:\n\n- Keeping one RPC/client context while rendering the shell and global overlays in different roots.\n- Avoiding duplicate or short-lived iframe/view ownership during mode changes.\n- Handling targets inside open shadow roots and targets replaced by framework rendering.\n- Defining a host CSS contract that works for four positions and drag resizing.\n- Adding a public mode union member that downstream exhaustive switches may need to handle.\n\nMy rough estimate is a medium-sized feature: perhaps 350–600 lines of production code across devframe and the Vite forwarding layer, followed by a similar or larger amount of tests, fixture code, and documentation.\n\n## Questions for maintainers\n\nThe main question is whether this workflow feels common and useful enough to justify supporting it in `@devframes/hub-ui`.\n\nDoes Inline belong in the reference UI, or would you prefer hosts with this requirement to build a custom viewer against `@devframes/hub/client`?\n\nIf it belongs here:\n\n- Does the target-selector API seem like the right boundary?\n- Is supporting all four positions and the existing resizer worthwhile in the first version?\n- Is open-shadow-root lookup appropriate, or should the first version require a light-DOM target?\n- Would you prefer a smaller first pass before committing to the complete host layout contract?\n\nI would be happy to work on an implementation if this direction feels worthwhile, but I would rather confirm that it fits the project before adding another supported presentation mode.\n","author":{"url":"https://github.com/dvcolomban","@type":"Person","name":"dvcolomban"},"datePublished":"2026-08-24T15:32:50Z","url":"https://github.com/devframes/devframe/issues/287"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:469a1a20-4e61-45fd-8f1e-5a18f6b13e6c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DE5E:34DD79:6B4756:97DECC:6AFB67AD |
| html-safe-nonce | b4d2e7399c2120eb102ba4ccf817b89fe1f894b582bb95e5eb3abfe796bef160 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTVFOjM0REQ3OTo2QjQ3NTY6OTdERUNDOjZBRkI2N0FEIiwidmlzaXRvcl9pZCI6IjM1MzQyNDMxMzcwMDM5Mzk3NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a281724879a35360895a9cad30aa007fa888d76501d67baa8018e2ac8248c809 |
| hovercard-subject-tag | issue:5236580120 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/devframes/devframe/287/issue_layout |
| twitter:image | https://opengraph.githubassets.com/18d3496bfd79db4c5067890686d7f5a6a4290cd80addcac8e0ae2a928a7c1f00/devframes/devframe/issues/287 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/18d3496bfd79db4c5067890686d7f5a6a4290cd80addcac8e0ae2a928a7c1f00/devframes/devframe/issues/287 |
| og:image:alt | Context The current embedded dock works well when a developer opens a tool briefly and then returns to the application. Float and edge modes both sit over the page, though, which is less comfortabl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dvcolomban |
| hostname | github.com |
| expected-hostname | github.com |
| None | ea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94 |
| turbo-cache-control | no-preview |
| go-import | github.com/devframes/devframe git https://github.com/devframes/devframe.git |
| octolytics-dimension-user_id | 279879373 |
| octolytics-dimension-user_login | devframes |
| octolytics-dimension-repository_id | 1231722386 |
| octolytics-dimension-repository_nwo | devframes/devframe |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1231722386 |
| octolytics-dimension-repository_network_root_nwo | devframes/devframe |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ef97164c52cf59bd10558ddec9c4f482763988 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width