Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add layout to V3 schema #723

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Persistence/PaYaml/Models/SchemaV3/ControlInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public ControlInstance(string controlType)

public string? ComponentLibraryUniqueName { get; init; }

public string? Layout { get; init; }

/// <summary>
/// The name of the group of controls that this control should be grouped with.
/// This does not impact the visual layout of the control or behavior, but is used to group controls together for organizational purposes from within the Studio.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Screens:
Children:
- Form1:
Control: Form
Layout: vertical
Properties:
DataSource: =Contacts
LayoutMinHeight: =250
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Screens:
- ctrlB:
Control: Label
Variant: variantB
Layout: layoutB
Group: Group1
Properties:
Prop2: =ctrlBProp2
Expand All @@ -17,6 +18,7 @@ Screens:
- ctrlA:
Control: [email protected]
Variant: variantA
Layout: layoutA
Group: Group1
Properties:
Prop2: =ctrlAProp2
Expand All @@ -27,13 +29,15 @@ Screens:
- ctrlC:
Control: FooWithChildren
Variant: variant2
Layout: layout2
Properties:
Prop2: =ctrlAProp2
Prop1: =ctrlAProp1
Children:
- ctrlC0:
Control: Bar
Variant: variantC0
Layout: layoutC0
Group: Group1
Properties:
Prop2: =ctrlC0Prop2
Expand All @@ -42,9 +46,11 @@ Screens:
- ctrlC00:
Control: Car
Variant: variantC00
Layout: layoutC00
- ctrlC1:
Control: Bar
Variant: variantC1
Layout: layoutC1
Group: Group1
Properties:
Prop2: =ctrlC1Prop2
Expand All @@ -53,3 +59,4 @@ Screens:
- ctrlC10:
Control: Dog
Variant: variantC10
Layout: layoutC10
3 changes: 3 additions & 0 deletions src/schemas/pa-yaml/v3.0/pa.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ definitions:
Variant:
type: string
minLength: 1
Layout:
joem-msft marked this conversation as resolved.
Show resolved Hide resolved
type: string
minLength: 1
Group: true
Properties: true
Children: { $ref: "#/definitions/Children-Control-instance-sequence" }
Expand Down
Loading