Skip to content

feat: add Config tab to all node resource detail pages - #582

Open
dtaniwaki wants to merge 1 commit into
dbt-labs:mainfrom
dtaniwaki:feat/config-tab-clean
Open

feat: add Config tab to all node resource detail pages#582
dtaniwaki wants to merge 1 commit into
dbt-labs:mainfrom
dtaniwaki:feat/config-tab-clean

Conversation

@dtaniwaki

@dtaniwaki dtaniwaki commented Apr 9, 2026

Copy link
Copy Markdown

resolves #581

Thanks for maintaining dbt-docs! I'd appreciate any feedback on this change.

Description

Currently there's no way to see a resource's dbt config directly in the docs UI. When working with engines like Athena, knowing partition and format settings (partitioned_by, file_format, etc.) is essential to writing efficient queries, but right now you have to go back to the YAML source to find them.

This PR adds a "Config" tab to all node-type detail pages that shows the full config in a structured, nested format. The tab only appears when config data exists, so macro pages are unaffected. Nested values like contract and docs render hierarchically, and null/empty entries are filtered out.

I extracted the data transformation logic into a testable config_utils.js module with 29 unit tests. All existing tests continue to pass. Tested locally against the jaffle_shop sample data.

Screenshot 2026-04-09 at 22 05 04

Checklist

Signed-off-by: Daisuke Taniwaki <daisuketaniwaki@gmail.com>
@dtaniwaki
dtaniwaki requested a review from a team as a code owner April 9, 2026 13:03
@cla-bot cla-bot Bot added the cla:yes label Apr 9, 2026
fa-assistant pushed a commit to dbt-labs/dbt-core that referenced this pull request Aug 14, 2026
…polish

Three independent, small changes bundled together - no design-system/
token/component conversion here, everything stays on sourdough as-is;
that's a separate dedicated pass.

Config tab: adds a "Config" tab to model/seed/snapshot/source detail
pages (plus the generic analysis/function/operation fallback), showing
the resource's dbt config block in a structured, nested view -
materialization, tags, group, contract, docs, etc. Null/empty entries
are filtered out, and the tab only appears when there's something to
show, matching the community's dbt-labs/dbt-docs#582 gating pattern
(ng-show="model.config" there, filterConfig(...) != null here).
docs.node_color renders as an actual color swatch rather than plain
text. static_analysis is dbt-fusion-only (Core has no static SQL
analyzer) - when absent, we show a muted "Enable Fusion to view" row
instead of silently omitting it.

Also fixes parseJsonColumn (pre-existing helper, shared by meta/config/
type_params/etc): some exporter output stores these VARCHAR columns as
a JSON string literal wrapping the real JSON text, so a single
JSON.parse yields a string instead of an object. Verified against a
live dbt-fusion 2.0.0-preview.205 build - every populated `config`
cell hit this, which silently hid the Config tab on every real
resource. Parse again when the first pass yields a string.

Not covered yet: exposure, metric, semantic_model, saved_query,
test/unit_test - each lives in its own table in our index and needs
the same per-type query wiring model/seed/snapshot/source got here.
Macro is intentionally excluded, matching #582.

Theme toggle: adds a "System" option alongside the existing Dark/Light
toggle in the sidebar footer; resolves against the OS's
prefers-color-scheme and updates live if it changes.

Topbar: moves the environment badge to sit after the project name
instead of between the logo and the title, renames it from "alpha" to
"beta" (label + tooltip), and removes the git-branch pill from the
sidebar footer.
GitOrigin-RevId: 584aa1c0d90c6c00062bf07741dcc9229fbdbb5f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a Config tab to resource detail pages

1 participant