feat(concept): ui_layout/v1 -- YAML layout definitions for UI providers #113

Open
opened 2026-06-02 14:04:44 +02:00 by michael · 0 comments
Owner

Goal

Define ui_layout/v1 -- a YAML-based layout schema that tells UI providers
how to group and display fields. Follows the same pattern as fragjan rule
schemas.

Background

Currently adapters/ui passes ui_types/v1 records with raw field values
to providers. Providers have no way to know how fields should be arranged
(table, list, cards, etc.) without domain knowledge.

ui_layout/v1 decouples layout from data -- providers load a layout
definition and render accordingly. Records always carry raw values.

Concept

Example layout definition:

schema: ui_layout/v1
layout_id: table_fragjan_result
fields:
- id: status
- id: file
- id: line
- id: message
display: table

Provider usage:

mod.render(data, cfg)
data.layout -> layout_id -> provider loads layout YAML
data.records -> raw field values

Benefits

  • Providers need zero domain knowledge
  • Same records, different layouts (table vs cards vs list)
  • Layout files are versionable and extensible
  • Consistent with DAW rule schema approach

Next steps

  1. Define ui_layout/v1 schema (required fields, display types)
  2. Define where layout files live (var/layouts/ or per-module)
  3. Extend ui_types/v1 render_payload with optional layout reference
  4. Implement layout loading in berhtjan-core

Note

Until this is implemented, adapters/ui passes a single text field
per record as interim solution (DAW/fragjan#90).

## Goal Define ui_layout/v1 -- a YAML-based layout schema that tells UI providers how to group and display fields. Follows the same pattern as fragjan rule schemas. ## Background Currently adapters/ui passes ui_types/v1 records with raw field values to providers. Providers have no way to know how fields should be arranged (table, list, cards, etc.) without domain knowledge. ui_layout/v1 decouples layout from data -- providers load a layout definition and render accordingly. Records always carry raw values. ## Concept Example layout definition: schema: ui_layout/v1 layout_id: table_fragjan_result fields: - id: status - id: file - id: line - id: message display: table Provider usage: mod.render(data, cfg) data.layout -> layout_id -> provider loads layout YAML data.records -> raw field values ## Benefits - Providers need zero domain knowledge - Same records, different layouts (table vs cards vs list) - Layout files are versionable and extensible - Consistent with DAW rule schema approach ## Next steps 1. Define ui_layout/v1 schema (required fields, display types) 2. Define where layout files live (var/layouts/ or per-module) 3. Extend ui_types/v1 render_payload with optional layout reference 4. Implement layout loading in berhtjan-core ## Note Until this is implemented, adapters/ui passes a single text field per record as interim solution (DAW/fragjan#90).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#113
No description provided.