PoC: Add view layout widgets and examples#10271
Conversation
03530fb to
0270cee
Compare
6aa1503 to
c5c3f5c
Compare
0270cee to
5a24383
Compare
| }); | ||
| ``` | ||
|
|
||
| ## Playground JSON |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Works for me! I'm supportive of this eventually making it into core
d2cfdbc to
87443f0
Compare
87443f0 to
6438cf4
Compare
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.
Changes
_HeaderWidgetand_LabelWidgetexports and docs._SplitterWidgetto consume compiled split metadata frombuildViewsFromViewLayout.viewLayoutJSON support and awebsite/View LayoutJSON example with label widgets.Validation
./node_modules/.bin/vitest run --project headless test/modules/widgets/view-layout/view-layout.spec.ts test/modules/widgets/splitter-widget.spec.tsyarn --cwd examples/website/view-layout vite build --config ../../vite.config.local.mjsNotes
A direct
yarn --cwd examples/website/view-layout buildresolves the example-local installed@deck.gl/widgetspackage instead of this checkout, so the local-alias Vite config is the relevant build command for validating unreleased widget exports.