Skip to content

Views

A workspace defines a pool of layers and a list of views. Each view is a tab with its own layout, layer selection, and content. Switching tabs changes the main content area; workspace chrome (sidebar panels, terminal, agent chat) persists across tab switches.

Decided in ADR-0015 D3 and D6.

Terminology

Four terms replace the retired "widget" concept:

TermWhat it isWhere it livesLifetime
View contentMaps, charts, tables, stat-cards arranged in a layoutviews[].content: in folia.yamlChanges with active tab
ComponentsElements floating on a map canvas (legend, scale-bar)components: inside a map content itemLives with its map
InteractionsEvent-driven behaviors per-layer (popup, highlight, cross-filter)interactions: inside a map content itemTriggered by user action
PanelsWorkspace chrome (layers, catalog, terminal)Workbench IDE, mode presetsPersists across view tabs

Panels are not defined in folia.yaml. They are part of the workbench IDE, configured by workspace mode presets. See the workbench layout documentation.

View Definition

Required Fields

FieldTypeRequiredDescription
namestringMUSTUnique name for the view, displayed as the tab label
layoutenumMUSTOne of full-map, split, dashboard, grid

Optional Fields

FieldTypeRequiredDescription
descriptionstringMAYHuman-readable description of the view's purpose
layerslistMAYSubset of workspace layers visible in this view. Defaults to all workspace layers if omitted.
mapobjectMAYCamera state: engine, style, center, zoom, pitch, bearing, bounds
gridobjectMAYGrid configuration for dashboard and grid layouts
splitobjectMAYSplit configuration for split layout
contentlistMAYView content items (maps, charts, tables, stat-cards, forms, info-panels)
paramsobjectMAYNamed parameters that content items and interactions can reference

Default View

If views: is omitted from folia.yaml, the platform MUST auto-generate a default view:

  • Layout: full-map
  • Layers: all workspace layers
  • Content: a single map with a legend component

This ensures every workspace is immediately viewable without explicit view configuration.

Examples

Single View

A minimal workspace with one view showing terrain data:

yaml
layers:
  elevation:
    uri: https://data.folia.sh/@usgs/3dep/wasatch-10m.tif
    type: raster
  slope:
    type: raster
    compute:
      op: terrain_slope
      inputs:
        dem: { layer: elevation }
    style:
      palette: viridis
      rescale: "0,60"

views:
  - name: Terrain
    layout: full-map
    layers: [slope]
    content:
      - type: map
        components:
          - type: legend
            anchor: bottom-right
          - type: scale-bar
            anchor: bottom-left

Multi-View

Two tabs showing different perspectives on the same layer pool. The terrain analyst sees slope maps and statistics; the land manager sees land cover with county boundaries.

yaml
layers:
  terrain/elevation:
    uri: commons/usgs/3dep/10m
    type: raster
  terrain/slope:
    type: raster
    compute:
      op: terrain_slope
      inputs:
        dem: { layer: terrain/elevation }
    style:
      palette: avalanche
  land-cover/nlcd:
    uri: catalog://mrlc/nlcd/2021
    type: raster
  boundaries/counties:
    uri: file://data/counties.gpkg
    type: vector

views:
  - name: Terrain Analysis
    layout: dashboard
    grid: { columns: 3, rows: 2 }
    layers: [terrain/elevation, terrain/slope]
    content:
      - type: map
        position: [0, 0, 2, 2]
        components:
          - type: legend
            anchor: bottom-right
      - type: chart
        position: [2, 0, 1, 1]
        chartType: histogram
        data: terrain/slope
        title: Slope Distribution
      - type: stat-card
        position: [2, 1, 1, 1]
        title: "Mean Slope"
        value: terrain/slope
        field: mean_slope
        format: degrees

  - name: Land Cover
    layout: full-map
    layers: [land-cover/nlcd, boundaries/counties]
    map:
      center: [-111.8, 40.7]
      zoom: 10
    content:
      - type: map
        interactions:
          boundaries/counties:
            click: popup
            hover: highlight
        components:
          - type: legend
            anchor: bottom-right

Key Properties

  • Layers are a workspace-level pool. Views select subsets via layers:. If a view omits layers:, all workspace layers are available.
  • Each view has its own layout (full-map, split, dashboard, grid). See Layouts.
  • Each view has independent map state. Navigating in one tab does not affect another.
  • View-level layer style overrides can change styling without affecting the layer's style: block or other views. Resolution order (most specific wins):
View content item style: { ... }    (most specific)
    falls back to
Layer style: block                  (layer defaults)
    falls back to
Op view hints (ADR-0009)            (from op YAML)
    falls back to
Type-based defaults                 (raster -> viridis, vector -> blue fill)
  • Views are rendered as tabs in the workbench's PanelTabs node (see the workbench layout documentation).
  • Split/comparison is ONE view with multiple map content items and syncMaps: true, not multiple tabs.
  • content: describes the view's layout items. These exist only within their view tab. They are not workspace panels.

Licensed under CC-BY-4.0