Add expand_depth test buttons to Pivot toolbar

Temporary UI for testing programmatic row expansion control via
plugin_config.expand_depth in Perspective viewer.restore().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul Trowbridge 2026-04-15 07:55:37 -04:00
parent 3723778cbb
commit 0b8c2935d7

View File

@ -286,6 +286,22 @@ export default function Pivot({ source }) {
)} )}
{layoutMsg && <span className="text-xs text-green-600 ml-1">{layoutMsg}</span>} {layoutMsg && <span className="text-xs text-green-600 ml-1">{layoutMsg}</span>}
{/* expand_depth test buttons */}
<div className="ml-auto flex items-center gap-1">
<span className="text-xs text-gray-300">expand test:</span>
{[0, 1, 2, 3].map(d => (
<button key={d} onClick={async () => {
const v = viewerRef.current; if (!v) return
const cfg = await v.save()
const next = { ...cfg, plugin_config: { ...cfg.plugin_config, expand_depth: d } }
console.log('trying plugin_config expand_depth:', d, next)
await v.restore(next)
}} className="text-xs border border-gray-200 rounded px-1.5 py-0.5 text-gray-500 hover:border-gray-400">
{d}
</button>
))}
</div>
</div> </div>
{/* Pivot + inspector */} {/* Pivot + inspector */}