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

In line editability #8057

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
47208c0
inline editability spec assets
baton17 Aug 22, 2022
feeba13
open questions
baton17 Sep 2, 2022
d6b2b2d
open questions fixes
baton17 Sep 2, 2022
16ec5e3
adding spec with all use cases
baton17 Oct 11, 2022
491af75
fixing image links
baton17 Oct 12, 2022
3d2e5a5
Update inlineEditability.md
baton17 Oct 12, 2022
9c3eb39
updating doc
baton17 Oct 12, 2022
787000b
Update inlineEditability.md
baton17 Oct 12, 2022
63bfea3
Update inlineEditability.md
baton17 Oct 12, 2022
8b6ca2d
Update inlineEditability.md
baton17 Oct 12, 2022
6a3a621
updating schema
baton17 Oct 17, 2022
80c3c71
updating schema 2
baton17 Oct 17, 2022
586ab21
updating schema 3
baton17 Oct 17, 2022
19492a6
updating schema 4
baton17 Oct 17, 2022
02d33cc
Update inlineEditability.md
baton17 Oct 25, 2022
20f4997
Update inlineEditability.md
baton17 Oct 25, 2022
3e5e4cf
Update inlineEditability.md
baton17 Nov 7, 2022
bc15d5e
Update inlineEditability.md
baton17 Nov 7, 2022
2b5b64c
Update inlineEditability.md
baton17 Nov 7, 2022
09b358f
Update inlineEditability.md
baton17 Nov 7, 2022
95e5f0d
Update inlineEditability.md
baton17 Nov 14, 2022
6c9c175
hover changes on card and label alignment
baton17 Nov 16, 2022
e1fc627
new changes
baton17 Nov 30, 2022
deb31fc
fixing flicker issue with unputs
baton17 Dec 3, 2022
b7e7ebe
Update inlineEditability.md
baton17 Dec 5, 2022
af74e01
Update inlineEditability.md
baton17 Dec 5, 2022
de68339
Update inlineEditability.md
baton17 Dec 5, 2022
7d2b672
Update inlineEditability.md
baton17 Dec 5, 2022
8597500
new changes
baton17 Dec 13, 2022
dc1cfce
Merge branch 'inLineEditability' of https://github.com/baton17/Adapti…
baton17 Dec 13, 2022
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
1 change: 1 addition & 0 deletions git
Submodule git added at 795ea8
5 changes: 5 additions & 0 deletions schemas/1.6.0/adaptive-card.json
Original file line number Diff line number Diff line change
Expand Up @@ -3269,6 +3269,11 @@
"description": "Error message to display when entered input is invalid",
"version": "1.3"
},
"inputStyle": {
"type": "string",
"description": "input Style Hint",
"version": "1.6"
},
"isRequired": {
"type": "boolean",
"description": "Whether or not this input is required",
Expand Down
5 changes: 5 additions & 0 deletions schemas/src/elements/inputs/Input.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"description": "Error message to display when entered input is invalid",
"version": "1.3"
},
"inputStyle": {
"type": "string",
"description": "input Style Hint",
"version": "1.6"
},
"isRequired": {
"type": "boolean",
"description": "Whether or not this input is required",
Expand Down
14 changes: 13 additions & 1 deletion source/nodejs/ac-typed-schema/src/markdown/languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,17 @@
"Style hint for `TableCell`.": "Style hint for `TableCell`.",
"Allows users to filter choices in a choice set.": "Allows users to filter choices in a choice set.",
"URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) ot will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.": "URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) ot will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.",
"Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted.": "Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted."
"Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted.": "Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted.",
"Defines a source for captions": "Defines a source for captions",
"Defines various metadata properties": "Defines various metadata properties",
"Defines various metadata properties typically not used for rendering the card": "Defines various metadata properties typically not used for rendering the card",
"URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) or will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.": "URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) or will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.",
"Array of captions sources for the media element to provide.": "Array of captions sources for the media element to provide.",
"Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, `mimeType` can be omitted.": "Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, `mimeType` can be omitted.",
"Mime type of associated caption file (e.g. `\"vtt\"`). For rendering in JavaScript, only `\"vtt\"` is supported, for rendering in UWP, `\"vtt\"` and `\"srt\"` are supported.": "Mime type of associated caption file (e.g. `\"vtt\"`). For rendering in JavaScript, only `\"vtt\"` is supported, for rendering in UWP, `\"vtt\"` and `\"srt\"` are supported.",
"URL to captions.": "URL to captions.",
"Label of this caption to show to the user.": "Label of this caption to show to the user.",
"A timestamp that informs a Host when the card content has expired, and that it should trigger a refresh as appropriate. The format is ISO-8601 Instant format. E.g., 2022-01-01T12:00:00Z": "A timestamp that informs a Host when the card content has expired, and that it should trigger a refresh as appropriate. The format is ISO-8601 Instant format. E.g., 2022-01-01T12:00:00Z",
"URL that uniquely identifies the card and serves as a browser fallback that can be used by some hosts.": "URL that uniquely identifies the card and serves as a browser fallback that can be used by some hosts.",
"input Style Hint": "input Style Hint"
}
14 changes: 13 additions & 1 deletion source/nodejs/ac-typed-schema/src/markdown/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,17 @@
"Style hint for `TableCell`.": "Style hint for `TableCell`.",
"Allows users to filter choices in a choice set.": "Allows users to filter choices in a choice set.",
"URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) ot will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.": "URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) ot will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.",
"Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted.": "Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted."
"Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted.": "Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted.",
"Defines a source for captions": "Defines a source for captions",
"Defines various metadata properties": "Defines various metadata properties",
"Defines various metadata properties typically not used for rendering the card": "Defines various metadata properties typically not used for rendering the card",
"URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) or will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.": "URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) or will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.",
"Array of captions sources for the media element to provide.": "Array of captions sources for the media element to provide.",
"Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, `mimeType` can be omitted.": "Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, `mimeType` can be omitted.",
"Mime type of associated caption file (e.g. `\"vtt\"`). For rendering in JavaScript, only `\"vtt\"` is supported, for rendering in UWP, `\"vtt\"` and `\"srt\"` are supported.": "Mime type of associated caption file (e.g. `\"vtt\"`). For rendering in JavaScript, only `\"vtt\"` is supported, for rendering in UWP, `\"vtt\"` and `\"srt\"` are supported.",
"URL to captions.": "URL to captions.",
"Label of this caption to show to the user.": "Label of this caption to show to the user.",
"A timestamp that informs a Host when the card content has expired, and that it should trigger a refresh as appropriate. The format is ISO-8601 Instant format. E.g., 2022-01-01T12:00:00Z": "A timestamp that informs a Host when the card content has expired, and that it should trigger a refresh as appropriate. The format is ISO-8601 Instant format. E.g., 2022-01-01T12:00:00Z",
"URL that uniquely identifies the card and serves as a browser fallback that can be used by some hosts.": "URL that uniquely identifies the card and serves as a browser fallback that can be used by some hosts.",
"input Style Hint": "input Style Hint"
}
14 changes: 13 additions & 1 deletion source/nodejs/ac-typed-schema/src/markdown/languages/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,17 @@
"Style hint for `TableCell`.": "Style hint for `TableCell`.",
"Allows users to filter choices in a choice set.": "Allows users to filter choices in a choice set.",
"URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) ot will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.": "URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) ot will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.",
"Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted.": "Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted."
"Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted.": "Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, mimeType can be omitted.",
"Defines a source for captions": "Defines a source for captions",
"Defines various metadata properties": "Defines various metadata properties",
"Defines various metadata properties typically not used for rendering the card": "Defines various metadata properties typically not used for rendering the card",
"URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) or will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.": "URL of an image to display before playing. Supports data URI in version 1.2+. If poster is omitted, the Media element will either use a default poster (controlled by the host application) or will attempt to automatically pull the poster from the target video service when the source URL points to a video from a Web provider such as YouTube.",
"Array of captions sources for the media element to provide.": "Array of captions sources for the media element to provide.",
"Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, `mimeType` can be omitted.": "Mime type of associated media (e.g. `\"video/mp4\"`). For YouTube and other Web video URLs, `mimeType` can be omitted.",
"Mime type of associated caption file (e.g. `\"vtt\"`). For rendering in JavaScript, only `\"vtt\"` is supported, for rendering in UWP, `\"vtt\"` and `\"srt\"` are supported.": "Mime type of associated caption file (e.g. `\"vtt\"`). For rendering in JavaScript, only `\"vtt\"` is supported, for rendering in UWP, `\"vtt\"` and `\"srt\"` are supported.",
"URL to captions.": "URL to captions.",
"Label of this caption to show to the user.": "Label of this caption to show to the user.",
"A timestamp that informs a Host when the card content has expired, and that it should trigger a refresh as appropriate. The format is ISO-8601 Instant format. E.g., 2022-01-01T12:00:00Z": "A timestamp that informs a Host when the card content has expired, and that it should trigger a refresh as appropriate. The format is ISO-8601 Instant format. E.g., 2022-01-01T12:00:00Z",
"URL that uniquely identifies the card and serves as a browser fallback that can be used by some hosts.": "URL that uniquely identifies the card and serves as a browser fallback that can be used by some hosts.",
"input Style Hint": "input Style Hint"
}
15 changes: 13 additions & 2 deletions source/nodejs/adaptivecards-designer/src/adaptive-card-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,10 @@ export const adaptiveCardSchema =
"value": {
"type": "string",
"description": "The initial value for a field"
}
},
"inputStyle" : {
"$ref": "#/definitions/InputStyle"
}
},
"required": [
"id"
Expand Down Expand Up @@ -902,6 +905,14 @@ export const adaptiveCardSchema =
"url",
"email"
]
}
},
"InputStyle": {
"type": "string",
"description": "Style hint for Input Fields.",
"enum": [
"default",
"readWrite"
]
}
}
};
7 changes: 7 additions & 0 deletions source/nodejs/adaptivecards-designer/src/designer-peers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class PropertySheetCategory {
static readonly SelectionAction = "Selection action";
static readonly InlineAction = "Inline action";
static readonly Validation = "Validation";
static readonly InputStyle = "Input Style";
static readonly Refresh = "Refresh"

private _entries: PropertySheetEntry[] = [];
Expand Down Expand Up @@ -2784,6 +2785,8 @@ export abstract class InputPeer<TInput extends Adaptive.Input> extends TypedCard
"errorMessage",
"Error message");

static readonly inputStyleProperty = new StringPropertyEditor(Adaptive.Versions.v1_6, "inputStyle", "Input Style");

protected internalGetTreeItemText(): string {
return this.cardElement.id ? this.cardElement.id : super.internalGetTreeItemText();
}
Expand All @@ -2797,6 +2800,10 @@ export abstract class InputPeer<TInput extends Adaptive.Input> extends TypedCard
InputPeer.isRequiredProperty,
InputPeer.errorMessageProperty);

propertySheet.add(
PropertySheetCategory.InputStyle,
InputPeer.inputStyleProperty);

propertySheet.remove(
CardElementPeer.horizontalAlignmentProperty,
CardElementPeer.heightProperty);
Expand Down
Loading