소스 검색

I've updated both files to version 1.6:

  ui-layout-views.xsd changes:                                                                                                                                                                                                                                                                                                                         - Updated schema version from 1.5 to 1.6
  - Updated default schema-version attributes to 1.6
  README.md changes:
  - Updated version header from 1.5 to 1.6
  - Added "What's New in v1.6" section documenting:
    - Supported View Modes - new element with grid, gallery, tree mode types
    - Enhanced View Descriptions - new description attributes for DataPropertyType, ViewBehaviorType, and PublishedEventType
  - Added "Supported View Modes" example in Advanced Features section
  - Added migration guide section "From Version 1.5 to 1.6"
  - Updated compatibility matrix to include v1.6 column
  - Updated all version references in code examples to 1.6
  - Updated footer to reference v1.6
Dalibor Votruba 5 달 전
부모
커밋
c980ad4ffb
2개의 변경된 파일127개의 추가작업 그리고 30개의 파일을 삭제
  1. 98 27
      UILayoutDefinitionFormat/readme.md
  2. 29 3
      UILayoutDefinitionFormat/ui-layout-views.xsd

+ 98 - 27
UILayoutDefinitionFormat/readme.md

@@ -1,8 +1,8 @@
 # UI Layout Definition Format
 
-**Version:** 1.5  
-**Documentation Version:** 1.5  
-**Author:** Dalibor Votruba  
+**Version:** 1.6
+**Documentation Version:** 1.6
+**Author:** Dalibor Votruba
 **URL:** [quadarax.com/ui-layout-def](https://quadarax.com/ui-layout-def)
 
 A comprehensive XML-based format for describing user interface layouts with inheritance, pattern definitions, view organization, external includes, platform-specific extensions, and advanced validation. This format enables cross-platform UI generation with strict validation, modular component libraries, and modern development practices.
@@ -10,7 +10,7 @@ A comprehensive XML-based format for describing user interface layouts with inhe
 ## Table of Contents
 
 - [Overview](#overview)
-- [What's New in v1.5](#whats-new-in-v14)
+- [What's New in v1.6](#whats-new-in-v16)
 - [Core Concepts](#core-concepts)
 - [Document Structure](#document-structure)
 - [View Definitions](#view-definitions)
@@ -38,9 +38,22 @@ The UI Layout Definition Format provides a standardized way to define user inter
 - **Cross-Platform**: Platform-specific control libraries with unified abstractions
 - **Modern Features**: State management, accessibility, performance optimization, testing support
 
-## What's New in v1.5
+## What's New in v1.6
 
-### Major Enhancements
+### New in v1.6
+
+1. **Supported View Modes**
+   - New `supported-view-modes` element for views
+   - Define multiple display modes: grid, gallery, tree
+   - Set default mode and enable/disable modes per view
+   - Mode descriptions for documentation
+
+2. **Enhanced View Descriptions**
+   - Added `description` attribute to `DataPropertyType` for documenting data context properties
+   - Added `description` attribute to `ViewBehaviorType` for documenting behaviors
+   - Added `description` attribute to `PublishedEventType` for documenting events
+
+### Major Enhancements (from v1.5)
 
 1. **Advanced State Management**
    - Redux and MobX pattern support
@@ -98,8 +111,9 @@ The UI Layout Definition Format provides a standardized way to define user inter
    - Performance-optimized validation
    - Integration testing for rules
 
-### Breaking Changes from v1.5
+### Breaking Changes from v1.6
 
+- No breaking changes from v1.5 to v1.6
 - Enhanced schema validation requires updates to custom validators
 - Some deprecated attributes removed (see migration guide)
 - New required accessibility attributes for certain control types
@@ -146,8 +160,8 @@ Comprehensive security framework with vulnerability protection, data encryption,
 <?xml version="1.0" encoding="UTF-8"?>
 <ui-layout-def xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="ui-layout-definition ui-layout-def.xsd"
-               version="1.5"
-               schema-version="1.5"
+               version="1.6"
+               schema-version="1.6"
                target-platform="avalonia"
                accessibility-compliance="wcag-aa">
   
@@ -188,7 +202,7 @@ Comprehensive security framework with vulnerability protection, data encryption,
   
   <!-- Enhanced window definitions -->
   <window name="ModernWindow" title="Enhanced Application" 
-          target-platform="avalonia" schema-version="1.5">
+          target-platform="avalonia" schema-version="1.6">
     <data-binding>
       <data-context source="ModernViewModel" mode="TwoWay" />
     </data-binding>
@@ -204,6 +218,18 @@ Comprehensive security framework with vulnerability protection, data encryption,
 
 ## Advanced Features
 
+### Supported View Modes
+
+```xml
+<view name="ProductView" type="business-entity" category="core">
+  <supported-view-modes>
+    <mode name="grid" enabled="true" default="true" description="Tabular data view with sorting and filtering"/>
+    <mode name="gallery" enabled="true" default="false" description="Card-based gallery view for visual browsing"/>
+    <mode name="tree" enabled="false" default="false" description="Hierarchical tree view"/>
+  </supported-view-modes>
+</view>
+```
+
 ### State Management
 
 ```xml
@@ -307,10 +333,53 @@ Comprehensive security framework with vulnerability protection, data encryption,
 
 ## Migration Guide
 
+### From Version 1.5 to 1.6
+
+#### No Breaking Changes
+Version 1.6 is backward compatible with v1.5. Simply update the version attributes:
+
+```xml
+<!-- Old -->
+<ui-layout-def version="1.5" schema-version="1.5">
+
+<!-- New -->
+<ui-layout-def version="1.6" schema-version="1.6">
+```
+
+#### New Features Available
+
+1. **Supported View Modes**
+   ```xml
+   <view name="ProductView" type="business-entity" category="core">
+     <supported-view-modes>
+       <mode name="grid" enabled="true" default="true" description="Tabular data view"/>
+       <mode name="gallery" enabled="true" default="false" description="Card-based gallery view"/>
+       <mode name="tree" enabled="false" default="false" description="Hierarchical tree view"/>
+     </supported-view-modes>
+   </view>
+   ```
+
+2. **Enhanced Descriptions**
+   ```xml
+   <data-context>
+     <property name="Products" type="IEnumerable<Product>" description="Collection of products to display"/>
+   </data-context>
+
+   <behaviors>
+     <behavior name="auto-refresh" description="Automatically refreshes data every 30 seconds"/>
+   </behaviors>
+
+   <communication>
+     <publishes>
+       <event name="ProductSelected" description="Fired when user selects a product"/>
+     </publishes>
+   </communication>
+   ```
+
 ### From Version 1.4 to 1.5
 
 #### Automatic Migration Support
-Version 1.5 includes an automatic migration tool that can upgrade most 1.3 documents:
+Version 1.5 includes an automatic migration tool that can upgrade most 1.4 documents:
 
 ```bash
 ui-layout-migrate --from 1.4 --to 1.5 --input myapp.xml --output myapp-v15.xml
@@ -322,7 +391,7 @@ ui-layout-migrate --from 1.4 --to 1.5 --input myapp.xml --output myapp-v15.xml
    ```xml
    <!-- Old -->
    <ui-layout-def version="1.4">
-   
+
    <!-- New -->
    <ui-layout-def version="1.5" schema-version="1.5">
    ```
@@ -333,7 +402,7 @@ ui-layout-migrate --from 1.4 --to 1.5 --input myapp.xml --output myapp-v15.xml
    ```
 
 3. **Update Control Declarations**
-   - Add `schema-version="1.5"` to custom controls
+   - Add `schema-version="1.6"` to custom controls
    - Update deprecated attribute names
    - Add accessibility attributes where required
 
@@ -366,17 +435,19 @@ ui-layout-migrate --from 1.4 --to 1.5 --input myapp.xml --output myapp-v15.xml
 
 #### Compatibility Matrix
 
-| Feature | v1.3 | v1.5 | Migration Required |
-|---------|------|------|-------------------|
-| Basic Controls | ✓ | ✓ | No |
-| Window Includes | ✓ | ✓ | No |
-| View Definitions | ✓ | ✓ | Optional |
-| State Management | ✗ | ✓ | New Feature |
-| Accessibility | Basic | Enhanced | Recommended |
-| Performance | ✗ | ✓ | New Feature |
-| Security | Basic | Enhanced | Recommended |
-| Testing | ✗ | ✓ | New Feature |
-| Localization | Basic | Enhanced | Optional |
+| Feature | v1.4 | v1.5 | v1.6 | Migration Required |
+|---------|------|------|------|-------------------|
+| Basic Controls | ✓ | ✓ | ✓ | No |
+| Window Includes | ✓ | ✓ | ✓ | No |
+| View Definitions | ✓ | ✓ | ✓ | Optional |
+| State Management | ✗ | ✓ | ✓ | New Feature (v1.5) |
+| Accessibility | Basic | Enhanced | Enhanced | Recommended |
+| Performance | ✗ | ✓ | ✓ | New Feature (v1.5) |
+| Security | Basic | Enhanced | Enhanced | Recommended |
+| Testing | ✗ | ✓ | ✓ | New Feature (v1.5) |
+| Localization | Basic | Enhanced | Enhanced | Optional |
+| Supported View Modes | ✗ | ✗ | ✓ | New Feature (v1.6) |
+| Description Attributes | Basic | Basic | Enhanced | Optional |
 
 ### Breaking Changes
 
@@ -565,7 +636,7 @@ Version 1.5 introduces comprehensive support for Web Awesome (formerly Shoelace)
 
 ```xml
 <patterns>
-  <control name="EnhancedTextBox" type="input" category="basic" schema-version="1.5">
+  <control name="EnhancedTextBox" type="input" category="basic" schema-version="1.6">
     <description>Enhanced text input with validation and accessibility</description>
     <constraints>
       <allowed-parents>Panel,FormField</allowed-parents>
@@ -647,7 +718,7 @@ Version 1.5 introduces comprehensive support for Web Awesome (formerly Shoelace)
 ```xml
 <views>
   <view name="ModernProductView" type="ai-assisted" category="ai-enhanced" 
-        schema-version="1.5" platform="avalonia" singleton="false" lazy-loading="true">
+        schema-version="1.6" platform="avalonia" singleton="false" lazy-loading="true">
     <description>AI-enhanced product management with real-time collaboration</description>
     
     <metadata>
@@ -735,4 +806,4 @@ Version 1.5 introduces comprehensive support for Web Awesome (formerly Shoelace)
 
 ---
 
-*This format specification v1.5 enables modern, accessible, performant, and secure cross-platform UI definitions with advanced development practices, comprehensive validation, and state-of-the-art tooling support.*
+*This format specification v1.6 enables modern, accessible, performant, and secure cross-platform UI definitions with advanced development practices, comprehensive validation, and state-of-the-art tooling support.*

+ 29 - 3
UILayoutDefinitionFormat/ui-layout-views.xsd

@@ -3,7 +3,7 @@
            targetNamespace="http://quadarax.com/ui-layout-views"
            xmlns:tns="http://quadarax.com/ui-layout-views"
            elementFormDefault="qualified"
-           version="1.5">
+           version="1.6">
 
   <!-- Root element for view include files -->
   <xs:element name="views" type="tns:ViewsIncludeFileType"/>
@@ -14,7 +14,7 @@
       <xs:element name="view" type="tns:ViewType" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <!-- ENHANCEMENT: Version tracking for view files -->
-    <xs:attribute name="schema-version" type="xs:string" default="1.5"/>
+    <xs:attribute name="schema-version" type="xs:string" default="1.6"/>
     <xs:attribute name="namespace" type="xs:string"/>
     <xs:attribute name="assembly" type="xs:string"/>
   </xs:complexType>
@@ -24,6 +24,7 @@
     <xs:sequence>
       <xs:element name="description" type="xs:string" minOccurs="0"/>
       <xs:element name="metadata" type="tns:ViewMetadataType" minOccurs="0"/>
+      <xs:element name="supported-view-modes" type="tns:SupportedViewModesType" minOccurs="0"/>
       <xs:element name="dependencies" type="tns:ViewDependenciesType" minOccurs="0"/>
       <xs:element name="data-context" type="tns:DataContextType" minOccurs="0"/>
       <xs:element name="windows" type="tns:ViewWindowsType" minOccurs="0"/>
@@ -50,7 +51,7 @@
     <xs:attribute name="category" type="tns:ViewCategoryEnum" use="required"/>
     <xs:attribute name="inherits" type="xs:string"/>
     <!-- ENHANCEMENT: v1.3 view attributes -->
-    <xs:attribute name="schema-version" type="xs:string" default="1.5"/>
+    <xs:attribute name="schema-version" type="xs:string" default="1.6"/>
     <xs:attribute name="platform" type="tns:PlatformEnum" default="basic"/>
     <xs:attribute name="singleton" type="xs:boolean" default="false"/>
     <xs:attribute name="lazy-loading" type="xs:boolean" default="false"/>
@@ -460,6 +461,28 @@
     </xs:restriction>
   </xs:simpleType>
 
+  <!-- Supported View Modes -->
+  <xs:complexType name="SupportedViewModesType">
+    <xs:sequence>
+      <xs:element name="mode" type="tns:ViewModeType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="ViewModeType">
+    <xs:attribute name="name" type="tns:ViewModeNameEnum" use="required"/>
+    <xs:attribute name="enabled" type="xs:boolean" use="required"/>
+    <xs:attribute name="default" type="xs:boolean" default="false"/>
+    <xs:attribute name="description" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:simpleType name="ViewModeNameEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="grid"/>
+      <xs:enumeration value="gallery"/>
+      <xs:enumeration value="tree"/>
+    </xs:restriction>
+  </xs:simpleType>
+
   <!-- View Metadata -->
   <xs:complexType name="ViewMetadataType">
     <xs:sequence>
@@ -590,6 +613,7 @@
     <xs:attribute name="default-value" type="xs:string"/>
     <xs:attribute name="validation" type="xs:string"/>
     <xs:attribute name="observable" type="xs:boolean" default="true"/>
+    <xs:attribute name="description" type="xs:string"/>
   </xs:complexType>
 
   <xs:simpleType name="DataScopeEnum">
@@ -672,6 +696,7 @@
     <xs:attribute name="debounce" type="xs:int"/>
     <xs:attribute name="throttle" type="xs:int"/>
     <xs:attribute name="cancellable" type="xs:boolean" default="false"/>
+    <xs:attribute name="description" type="xs:string"/>
   </xs:complexType>
 
   <xs:simpleType name="BehaviorScopeEnum">
@@ -755,6 +780,7 @@
     <xs:attribute name="async" type="xs:boolean" default="false"/>
     <xs:attribute name="broadcast" type="xs:boolean" default="false"/>
     <xs:attribute name="persistent" type="xs:boolean" default="false"/>
+    <xs:attribute name="description" type="xs:string"/>
   </xs:complexType>
 
   <xs:complexType name="SubscribedEventType">