Skip to content

Commit bac692e

Browse files
committed
More stuff
1 parent f569e34 commit bac692e

File tree

6 files changed

+190
-91
lines changed

6 files changed

+190
-91
lines changed

homedocs/TODO.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[ ] Fix search (make whole item clickable)
1+
[x] Fix search (make whole item clickable)
22
[x] Add SEO data
3-
[ ] Add Google Analytics
3+
[x] Add Google Analytics
44
[x] Preserve @jsxImportSource in llms.txt
55
[x] try export default {} instead of export () => {}
66
[x] document controller inline form
@@ -16,4 +16,4 @@
1616
[x] On this page nav
1717
[ ] Tab borders
1818
[ ] LinkButton styling
19-
[ ] Add OG image
19+
[x] Add OG image

homedocs/src/data/navigation.js

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,46 @@ export const navigation = [
177177
title: "Concepts",
178178
slug: "concepts",
179179
groups: [
180+
{
181+
title: "Data Views",
182+
items: [
183+
{
184+
title: "Overview",
185+
slug: "data-views",
186+
llms: "small",
187+
description: "Components that iterate and transform data",
188+
},
189+
{
190+
title: "Repeater",
191+
slug: "repeater",
192+
llms: "small",
193+
description: "Render a template for each item in an array",
194+
},
195+
{
196+
title: "Sandbox",
197+
slug: "sandbox",
198+
llms: "small",
199+
description: "Isolate store changes for cancel/save workflows",
200+
},
201+
{
202+
title: "PrivateStore",
203+
slug: "private-store",
204+
llms: "small",
205+
description: "Create isolated store instances for components",
206+
},
207+
{
208+
title: "DataProxy",
209+
slug: "data-proxy",
210+
llms: "small",
211+
description: "Transform data between parent and child stores",
212+
},
213+
{
214+
title: "Rescope",
215+
slug: "rescope",
216+
description: "Remap store paths for nested components",
217+
},
218+
],
219+
},
180220
{
181221
title: "Selections",
182222
items: [
@@ -238,46 +278,6 @@ export const navigation = [
238278
},
239279
],
240280
},
241-
{
242-
title: "Data Views",
243-
items: [
244-
{
245-
title: "Overview",
246-
slug: "data-views",
247-
llms: "small",
248-
description: "Components that iterate and transform data",
249-
},
250-
{
251-
title: "Repeater",
252-
slug: "repeater",
253-
llms: "small",
254-
description: "Render a template for each item in an array",
255-
},
256-
{
257-
title: "Sandbox",
258-
slug: "sandbox",
259-
llms: "small",
260-
description: "Isolate store changes for cancel/save workflows",
261-
},
262-
{
263-
title: "PrivateStore",
264-
slug: "private-store",
265-
llms: "small",
266-
description: "Create isolated store instances for components",
267-
},
268-
{
269-
title: "DataProxy",
270-
slug: "data-proxy",
271-
llms: "small",
272-
description: "Transform data between parent and child stores",
273-
},
274-
{
275-
title: "Rescope",
276-
slug: "rescope",
277-
description: "Remap store paths for nested components",
278-
},
279-
],
280-
},
281281
{
282282
title: "Drag & Drop",
283283
items: [

homedocs/src/pages/docs/concepts/data-views.mdx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,36 @@ import OnThisPage from "../../../components/OnThisPage.astro";
1010

1111
<OnThisPage />
1212

13-
All application data in CxJS is stored inside a central [Store](/docs/core/store). While convenient for global state, accessing deeply nested paths or working with collections can become cumbersome. Data View components wrap parts of the widget tree and provide a modified view of the Store data, making it easier to work with specific areas of the data model.
13+
All application data in CxJS is stored inside a central [Store](/docs/intro/store). While convenient for global state, accessing deeply nested paths or working with collections can become cumbersome. Data View components wrap parts of the widget tree and provide a modified view of the Store data, making it easier to work with specific areas of the data model.
1414

1515
## Comparison
1616

17-
| Component | Purpose | Use case |
18-
| ---------------------------------------- | ------------------------------------------------- | ------------------------------------- |
19-
| [Repeater](/docs/data/repeater) | Renders children for each record in a collection | Lists, tables, any repeated content |
20-
| [Rescope](/docs/data/rescope) | Selects a common prefix for shorter binding paths | Deeply nested data structures |
21-
| [Sandbox](/docs/data/sandbox) | Multiplexes data based on a dynamic key | Tabs, routes with isolated page data |
22-
| [PrivateStore](/docs/data/private-store) | Creates an isolated store for a subtree | Reusable components with local state |
23-
| [DataProxy](/docs/data/data-proxy) | Creates aliases with custom getter/setter logic | Computed values, data transformations |
24-
| [Route](/docs/core/route) | Renders children when URL matches a pattern | Page routing, exposes `$route` params |
17+
| Component | Purpose | Use case |
18+
| -------------------------------------- | ------------------------------------------------- | ------------------------------------- |
19+
| [Repeater](./repeater) | Renders children for each record in a collection | Lists, tables, any repeated content |
20+
| [Rescope](./rescope) | Selects a common prefix for shorter binding paths | Deeply nested data structures |
21+
| [Sandbox](./sandbox) | Multiplexes data based on a dynamic key | Tabs, routes with isolated page data |
22+
| [PrivateStore](./private-store) | Creates an isolated store for a subtree | Reusable components with local state |
23+
| [DataProxy](./data-proxy) | Creates aliases with custom getter/setter logic | Computed values, data transformations |
24+
| [Route](./route) | Renders children when URL matches a pattern | Page routing, exposes `$route` params |
2525

2626
## How Data Views Work
2727

2828
Each Data View component exposes the same interface as the Store to its children, but can introduce additional properties. For example, Repeater adds `$record` and `$index` for each item in the collection, Route exposes `$route` with matched URL parameters, while Sandbox might expose `$page` for route-specific data. These additional properties are only accessible within the scope of that Data View, allowing child widgets to bind to them just like any other Store data.
2929

3030
## How to Choose
3131

32-
Use [Repeater](/docs/data/repeater) when you need to render a list of items from an array.
32+
Use [Repeater](./repeater) when you need to render a list of items from an array.
3333

34-
Use [Rescope](/docs/data/rescope) when working with deeply nested data and you want shorter binding paths.
34+
Use [Rescope](./rescope) when working with deeply nested data and you want shorter binding paths.
3535

36-
Use [Sandbox](/docs/data/sandbox) when you need to switch between different data contexts based on a key (e.g., tabs, route parameters).
36+
Use [Sandbox](./sandbox) when you need to switch between different data contexts based on a key (e.g., tabs, route parameters).
3737

38-
Use [PrivateStore](/docs/data/private-store) (also known as Restate) when you need completely isolated state that doesn't affect the global store.
38+
Use [PrivateStore](./private-store) (also known as Restate) when you need completely isolated state that doesn't affect the global store.
3939

40-
Use [DataProxy](/docs/data/data-proxy) when you need to transform data or create computed aliases with custom getter/setter logic.
40+
Use [DataProxy](./data-proxy) when you need to transform data or create computed aliases with custom getter/setter logic.
4141

42-
Use [Route](/docs/core/route) when you need to conditionally render content based on URL and access matched route parameters.
42+
Use [Route](./route) when you need to conditionally render content based on URL and access matched route parameters.
4343

4444
## Store Mutation
4545

homedocs/src/pages/docs/concepts/selections.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Selections enable users to select one or more items from widgets like Grid, List
1616

1717
| Model | Storage | Best for |
1818
| ------------------------------------------------------- | ---------------------------------- | ------------------------------- |
19-
| [KeySelection](key-selection) | Key value(s) in separate variable | Selection survives data updates |
20-
| [SimpleSelection](simple-selection) | Entire object in separate variable | Simple single select |
21-
| [PropertySelection](property-selection) | Boolean flag on each record | Checkbox lists, toggles |
19+
| [KeySelection](./key-selection) | Key value(s) in separate variable | Selection survives data updates |
20+
| [SimpleSelection](./simple-selection) | Entire object in separate variable | Simple single select |
21+
| [PropertySelection](./property-selection) | Boolean flag on each record | Checkbox lists, toggles |
2222

2323
## How to Choose
2424

25-
Use [KeySelection](key-selection) when selection needs to survive data refreshes. Keys remain stable while object references change after updates.
25+
Use [KeySelection](./key-selection) when selection needs to survive data refreshes. Keys remain stable while object references change after updates.
2626

27-
Use [SimpleSelection](simple-selection) for simple single-select scenarios where you need immediate access to the selected object.
27+
Use [SimpleSelection](./simple-selection) for simple single-select scenarios where you need immediate access to the selected object.
2828

29-
Use [PropertySelection](property-selection) for checkbox-based UIs where each record tracks its own selection state.
29+
Use [PropertySelection](./property-selection) for checkbox-based UIs where each record tracks its own selection state.

homedocs/src/pages/docs/concepts/simple-selection.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SimpleSelection is the most basic selection model. It stores the entire selected
2424
- When you need immediate access to the full selected object
2525
- Quick prototyping or simple lists
2626

27-
Note that selection is lost if the selected object changes in the data source, since the reference will no longer match. For more robust selection, consider [KeySelection](/core/key-selection).
27+
Note that selection is lost if the selected object changes in the data source, since the reference will no longer match. For more robust selection, consider [KeySelection](./key-selection).
2828

2929
## Example
3030

0 commit comments

Comments
 (0)