Skip to content

fix(docs): Vue examples now follow the site light/dark theme#1475

Merged
mathuo merged 1 commit into
v8-branchfrom
claude/vue-light-theme-fix
Jul 16, 2026
Merged

fix(docs): Vue examples now follow the site light/dark theme#1475
mathuo merged 1 commit into
v8-branchfrom
claude/vue-light-theme-fix

Conversation

@mathuo

@mathuo mathuo commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Description

The Vue live examples rendered dark even when the docs site was in light mode (e.g. /docs/core/panels/multiRowTabs?framework=vue).

Root cause

The Vue examples passed the theme as a fallthrough class on <dockview-vue>:

<dockview-vue class="example-dock dockview-theme-light" ... />

dockview-core themes its shell element, defaulting to abyss (dark). The fallthrough class lands on the outer host element, outside the shell, so the shell's darker default won and the dock rendered dark regardless of the site mode. React and Angular pass the theme as the className prop, which dockview-core applies to the inner element inside the shell where it wins (TypeScript uses the theme option directly).

Fix

Route the theme through the className prop in all 34 Vue examples to match React/Angular, keeping example-dock (or the inline height style) on class so the dock still gets its size through attribute fallthrough:

<dockview-vue class="example-dock" className="dockview-theme-light" ... />

className is a DockviewOptions field, so dockview-vue already forwards it into the core option. No library change.

Verification

Loaded all 35 Vue examples in light mode in a real browser: the nearest theme class to the dock is now dockview-theme-light (was dockview-theme-abyss).

Type of change

  • Bug fix
  • Documentation

Affected packages

  • docs

How to test

Open any Vue live example with the site in light mode: the dock renders light. (Or with a local dev server, load /templates/dockview/basic/vue/index.html?colorMode=light.)

Checklist

  • yarn lint:fix / yarn format — n/a, files live under packages/docs, excluded from lint/format and not checked by CI
  • Breaking changes are documented — n/a

Note

The cross-framework smoke suite (#1471) has a matching theme assertion that guards this exact bug; it is scoped there once both land.

🤖 Generated with Claude Code


Generated by Claude Code

The Vue dockview examples passed the theme as a fallthrough `class` on
`<dockview-vue>`. dockview-core themes its shell element (defaulting to abyss),
and the fallthrough class landed on the outer host, outside the shell, so the
shell's darker default won and every Vue example rendered dark even in light
mode. React and Angular pass the theme as the `className` prop, which
dockview-core applies to the inner element (inside the shell) where it wins.

Route the theme through the `className` prop in all 34 Vue examples to match,
keeping `example-dock` (or the inline height style) on `class` so the dock still
gets its size through attribute fallthrough. The nearest theme class to the dock
is now `dockview-theme-light` in light mode across all 35 Vue examples (was
`dockview-theme-abyss`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFPcCn11Au4qu7YUyiCWMF
@sonarqubecloud

Copy link
Copy Markdown

@mathuo
mathuo merged commit aef1c68 into v8-branch Jul 16, 2026
9 checks passed
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.

2 participants