Skip to content

Add embedded docs layout to widen parameter descriptions (closes #26) - #46

Merged
magnesj merged 1 commit into
OPM:mainfrom
magnesj:feature/26-embed-type-units-in-description
Jun 25, 2026
Merged

Add embedded docs layout to widen parameter descriptions (closes #26)#46
magnesj merged 1 commit into
OPM:mainfrom
magnesj:feature/26-embed-type-units-in-description

Conversation

@magnesj

@magnesj magnesj commented Jun 25, 2026

Copy link
Copy Markdown
Member

Closes #26 — implements @pkirkham's suggestion from #26 (comment).

Problem

Keywords with many parameters (e.g. WECON) squeeze the Description column down to a few characters, making the docs hard to read.

Fix

Add an embedded docs layout — now the default — that folds the Type, unit, and Default values into a compact, muted sub-line beneath each parameter description, freeing the full table width for the description text.

A row now reads like:

Description text…
DOUBLE (Pressure) · Field: psia · Metric: barsa · default: 1.0

Details

  • New opm-flow.docs.layout setting ("embedded" | "columns", default "embedded"). The existing Type / unit / Default show-hide settings still control which values appear in either layout, so users who prefer the original grid can set "opm-flow.docs.layout": "columns".
  • Shared metaBits() builder with HTML and markdown renderers, applied to both the docs sidebar and the hover tooltip for consistency.
  • Sidebar adds .meta styling; multi-record tables and cursor-driven row highlighting are unchanged.

Verification

  • Typecheck clean; full jest suite passes (197 tests); package.json validated as JSON.
  • The rendering lives in the vscode-importing extension.ts (not unit-tested, consistent with the existing buildDocsHtml); best checked by hovering a wide keyword like WECON in the running extension.

🤖 Generated with Claude Code

Closes #26. Keywords with many parameters (e.g. WECON) squeezed the
Description column down to a few characters. Add an "embedded" layout —
now the default — that folds the Type, unit, and Default values into a
muted sub-line beneath each description, freeing the full width for the
description text.

- New opm-flow.docs.layout setting ("embedded" | "columns", default
  "embedded"). The existing Type/unit/Default show-hide flags still
  control which values appear in either layout.
- Shared metaBits() builder with HTML and markdown renderers, applied to
  both the docs sidebar and the hover tooltip. The original column layout
  is preserved under "columns".
@magnesj
magnesj merged commit 15b3121 into OPM:main Jun 25, 2026
4 checks passed
@magnesj
magnesj deleted the feature/26-embed-type-units-in-description branch June 28, 2026 13:16
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.

Difficulties to read the keyword descriptions and other parameter entries

1 participant