Skip to content

PoC: Add view layout widgets and examples#10271

Open
ibgreen-openai wants to merge 2 commits into
ib/view-layoutsfrom
ib/view-layout-widgets-examples
Open

PoC: Add view layout widgets and examples#10271
ibgreen-openai wants to merge 2 commits into
ib/view-layoutsfrom
ib/view-layout-widgets-examples

Conversation

@ibgreen-openai
Copy link
Copy Markdown
Collaborator

@ibgreen-openai ibgreen-openai commented May 3, 2026

This PR contains examples and widgets using the new view layout system proposed in #10269. At the moment this is mainly for exposition / proof of concept. The focus is on getting the view layout system landed. Then we can decide what kind of examples or widgets we may want in deck.gl.

Summary

Stacked on #10269. Adds the experimental view-layout UI widgets, example app, playground JSON sample, and widget docs on top of the compiler/types PR.

image

Changes

  • Adds experimental _HeaderWidget and _LabelWidget exports and docs.
  • Extends _SplitterWidget to consume compiled split metadata from buildViewsFromViewLayout.
  • Adds the imperative website view-layout example with draggable/resizable minimap, labels, and splitter integration.
  • Adds playground-local viewLayout JSON support and a website/View Layout JSON example with label widgets.
  • Adds website/example sidebar and documentation links.

Validation

  • Commit hook passed: module/test/example lint and formatting, lockfile validation, and node tests.
  • ./node_modules/.bin/vitest run --project headless test/modules/widgets/view-layout/view-layout.spec.ts test/modules/widgets/splitter-widget.spec.ts
  • yarn --cwd examples/website/view-layout vite build --config ../../vite.config.local.mjs

Notes

A direct yarn --cwd examples/website/view-layout build resolves the example-local installed @deck.gl/widgets package instead of this checkout, so the local-alias Vite config is the relevant build command for validating unreleased widget exports.

@coveralls
Copy link
Copy Markdown

coveralls commented May 3, 2026

Coverage Status

Coverage is 83.141%ib/view-layout-widgets-examples into ib/view-layouts. No base build found for ib/view-layouts.

@ibgreen-openai ibgreen-openai force-pushed the ib/view-layout-widgets-examples branch from 03530fb to 0270cee Compare May 3, 2026 15:35
@ibgreen-openai ibgreen-openai force-pushed the ib/view-layout-widgets-examples branch from 0270cee to 5a24383 Compare May 3, 2026 15:58
});
```

## Playground JSON
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up here about where this function should live.. its use case clearly cuts across multiple modules and isn't exclusively a widget utility.

I can see why you'd put it in core at first, and I can agree with the argument against putting it there.

ViewLayout is a JSON compiler.. what if this lived in @deck.gl/json?

Copy link
Copy Markdown
Collaborator Author

@ibgreen-openai ibgreen-openai May 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is now a stacked PR on top of the basic view layout feature.

Current direction from @Pessimistress is to get the base PR that just adds the view compiler ready to land in @deck.gl/widgets then we audit and improve the API with the goal of promoting it to core, presumably we would extend

Deck.props.views: ViewLayout | Views[]

For the changes in this PR, at the moment I do not see a consensus/interest in adding new widgets / examples, so it may be more of an exposition of how this system can be used.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me! I'm supportive of this eventually making it into core

@ibgreen-openai ibgreen-openai force-pushed the ib/view-layout-widgets-examples branch 3 times, most recently from d2cfdbc to 87443f0 Compare May 7, 2026 12:15
@ibgreen-openai ibgreen-openai changed the title Add view layout widgets and examples PoC: Add view layout widgets and examples May 8, 2026
@ibgreen-openai ibgreen-openai force-pushed the ib/view-layout-widgets-examples branch from 87443f0 to 6438cf4 Compare May 12, 2026 22:05
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.

4 participants