-
Notifications
You must be signed in to change notification settings - Fork 10
Update template.ts to include Layout schema #15
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
Open
abhinavrastogi-harness
wants to merge
5
commits into
bradrydzewski:master
Choose a base branch
from
abhinavrastogi-harness:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fd76fc4
Update template.ts to include Layout schema
abhinavrastogi-harness 6193a8c
add UI config for inputs
abhinavrastogi-harness 225b076
add template logo props
abhinavrastogi-harness 26598c7
add basic info for templates
abhinavrastogi-harness 26b3a7c
fix: options only at input not ui
shaurya-harness File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,82 +1,73 @@ | ||
| import { UiConfig } from "./ui"; | ||
|
|
||
| /** | ||
| * @x-go-file input.go | ||
| */ | ||
| export interface Input { | ||
| /** | ||
| * Type defines the input type. | ||
| */ | ||
| type: | ||
| | "string" | ||
| | "number" | ||
| | "boolean" | ||
| | "array" | ||
| | "duration" | ||
| | "choice" // GitHub compatibility | ||
| | "environment" // GitHub compatibility | ||
| | "secret"; | ||
|
|
||
| /** | ||
| * Type defines the input type. | ||
| */ | ||
| type: | ||
| "string" | ||
| | "number" | ||
| | "boolean" | ||
| | "array" | ||
| | "duration" | ||
| | "choice" // GitHub compatibility | ||
| | "environment" // GitHub compatibility | ||
| | "secret" | ||
|
|
||
| /** | ||
| * Description defines the input description. | ||
| */ | ||
| description?: string | ||
|
|
||
| /** | ||
| * @go-type: interface{} | ||
| */ | ||
| default?: any | ||
|
|
||
| /** | ||
| * Required indicates the input is required. | ||
| */ | ||
| required?: boolean; | ||
| /** | ||
| * Description defines the input description. | ||
| */ | ||
| description?: string; | ||
|
|
||
| /** | ||
| * Items defines an array type. | ||
| */ | ||
| items?: any[] | ||
| /** | ||
| * @go-type: interface{} | ||
| * Default value populated for this input | ||
| */ | ||
| default?: any; | ||
|
|
||
| /** | ||
| * Enum defines a list of accepted input values. | ||
| */ | ||
| enum?: any[] | ||
| /** | ||
| * Required indicates the input is required. | ||
| */ | ||
| required?: boolean; | ||
|
|
||
| /** | ||
| * Pattern defines a regular expression input constraint. | ||
| */ | ||
| pattern?: string; | ||
| /** | ||
| * Items defines an array type. | ||
| */ | ||
| items?: any[]; | ||
|
|
||
| /** | ||
| * Component defines the form element that should be used to | ||
| * render the input. | ||
| */ | ||
| component?: "dropdown" | "text" | "number" | "date" | "datetime" | string; | ||
| /** | ||
| * Enum defines a list of accepted input values. | ||
| */ | ||
| enum?: any[]; | ||
|
|
||
| /** | ||
| * Autofocus configures the form element autofocus attribute. | ||
| */ | ||
| autofocus?: boolean; | ||
| /** | ||
| * Options defines a list of accepted input values. | ||
| * This is an alias for enum. | ||
| * @github | ||
| */ | ||
| options?: any[]; | ||
|
|
||
| /** | ||
| * Placeholder configures the form element placeholder attribute. | ||
| */ | ||
| placeholder?: string; | ||
| /** | ||
| * Pattern defines a regular expression input constraint. | ||
| */ | ||
| pattern?: string; | ||
|
|
||
| /** | ||
| * Tooltip configures the form element alt attribute. | ||
| */ | ||
| tooltip?: string; | ||
| /** | ||
| * Mask indicates the input should be masked. | ||
| * @deprecated | ||
| */ | ||
| mask?: boolean; | ||
|
|
||
| /** | ||
| * Options defines a list of accepted input values. | ||
| * This is an alias for enum. | ||
| * @github | ||
| */ | ||
| options?: any[] | ||
| /** | ||
| * Label to be displayed in the UI for this input | ||
| */ | ||
| label?: string; | ||
|
|
||
| /** | ||
| * Mask indicates the input should be masked. | ||
| * @deprecated | ||
| */ | ||
| mask?: boolean | ||
| /** | ||
| * Config to override default UI rendering behaviour | ||
| */ | ||
| ui?: UiConfig; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| export interface UiConfig { | ||
| /** | ||
| * CEL expression to add dynamic behaviour. | ||
| * This input will be displayed only when this condition is true. | ||
| * All inputs in this template are available to reference here. | ||
| */ | ||
| visible?: string | ||
|
|
||
| /** | ||
| * Component defines the form element that should be used to | ||
| * override the default renderer for the input. | ||
| */ | ||
| component?: "dropdown" | "text" | "number" | "date" | "datetime" | "select" | string; | ||
|
|
||
| /** | ||
| * Autofocus configures the form element autofocus attribute. | ||
| */ | ||
| autofocus?: boolean; | ||
|
|
||
| /** | ||
| * Placeholder configures the form element placeholder attribute. | ||
| */ | ||
| placeholder?: string; | ||
|
|
||
| /** | ||
| * Tooltip configures the form element alt attribute. | ||
| */ | ||
| tooltip?: string; | ||
|
|
||
| /** | ||
| * Types of values allowed for this input. | ||
| * Fixed: User must enter value when configuring the pipeline | ||
| * Runtime: User must enter value when running the pipeline | ||
| * Expression: Value will be derived by evaluating this CEL / JEXL expression | ||
| */ | ||
| allowedValueTypes?: Array<'fixed' | 'runtime' | 'expression'> | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum and options are duplicated
also shall we standardize enum / list / options - all seem to be doing the same thing