Skip to content

Commit

Permalink
[JS] Action overflow, TextBlock heading and Action.tooltip (#5661)
Browse files Browse the repository at this point in the history
* [JS] Overflow actions (flyout menu) #4715 (Pre-Release) (#5446)

* [JS] Overflow actions #4715

* use global setting to control exceeding actions

* address PR comments

* fix PR build

* fix PR build

* fix PR build

* fix pr build

* address PR comments

* address PR comments

Co-authored-by: David Claux <[email protected]>

Ignoring unrelated Android check failures

* [JS] Action.mode designer support + promote secondary action to primary on execute (#5449)

* Action.mode designer support
Promote secondary action to primary on execute

* Slight change in behavior for action promotion

* Slight refactor

* Js/tooltips headings (#5608)

* Schema 1.4 (#5317)

* Schema update for Action.Execute and refresh

* Generate 1.4 schema file

* Updated specs

* Update toc.yml

* Updated specs

* Add authentication

* Updated specs

* Fix typos

* Add missing Action.Execute.verb

* Update verbiage

* Add Action.Execute sample

* Table of contents updates and labels on the sample inputs

Co-authored-by: Adaptive Cards Specs CI <[email protected]>
Co-authored-by: Paul Campbell <[email protected]>
Co-authored-by: Rebecca Muraira <[email protected]>

* [JS] Add support for Universal Actions (#5533)

* Work in progress

* strictNullChecks, noImplicitAny
noImplicitReturns, noImplicitThis, noUnusedLocals
noFallthroughCasesInSwitch
More refactoring
Work in progress

* var --> let

* Array<type> --> type[]
for (let i = 0 ...) --> for (let item of ...)
Additional cleanup
Work in progress

* null --> undefined where appropriate

* Code organizing plus some cleanup

* CardObject, CardElement, TextBlock now use schema

* Image, FactSet now use schema

* FactSet fully uses schema

* Library size reduction

* Looking at decorators...

* Fully move to decorators

* Some cleanup

* selectAction/inlineAction --> schema

* ChoiceSet/ToggleInput --> schema

* Media -> schema

* All inputs --> schema

* Fix IE11 compat (don't use obj.constructor.name)

* OpenUrl/ToggleVis./Submit -> schema

* Action.Http --> schema

* Everything now uses schema

* Merge changes from master

* Fix designer build break

* Add version info in type registries
Plus some cleanup

* Forgot to add v1.2 to ToggleVisibility

* API simplification

* Library size reduction (~2 KB minified)

* Reduce library size

* Small simplification

* Update README wih notable changes so far

* More simplifications

* More simplification + 1KB size reduction

* More simplification + bug fix

* Parse logic refactor (WIP)

* Refactor parse logic (WIP)

* Move designer off global registry

* Small cLeanup

* Refactor toJSON

* Parse/serialize to/from specific schema version
Full version picker support
Still WIP, but almost there

* Code complete - full version picker support

* Fix test case + minor tweak

* Designer bug fixes and minor enhancements

* Review feedback so far + designer improvements

* Designer bug fixes

* Add support for cancelling d&d with ESC

* Review feedback + fix value type for number input

* Address review feedback

* More review feedback

* Fix Image.Width/Height serialization regression

* Fix Action.Submit not incl. empty inputs anymore
Add onExecuteAction handler in Preview Mode

* Small designer tweak

* Small popup control refactor

* [Designer] Enhanced data binding support

* [Designer] Small tweak/fix

* [Designer] Improved sample data support

* Use correct sample data in Preview Mode

* Integrate changes from master

* Add support for "preview" param on designer URL
Hide data structure toolbox

* [Designer] Enhanced sample picker dialog

* Fix integration mistake

* [Designer] Combine open sample and new card buttons
Also fully remove "full screen" button

* Remove references to removed buttons

* Sample picker tweaks

* Fix nasty regression introduced by fix in master

* [Designer] Add CHANGELOG.md

* Publishing preview designer + AC JS packages

* [Designer] HostContainer controls target version

* [Designer] Adding getCard and setCard back

* bump package versions for beta release

* Update README.md

* Improve experience for modern browsers

* [Designer] Add modulus, round, ceil, floor func.
[Renderer] Serialization bug fixes

* Update README

* Small cleanup

* Work in progress

* Work in progress

* [Templating] Fix $when not working within loops
[Renderer] Dynamically convert values to string for string properties

* [Templating] Add toString, parseInt, parseFloat
Refactor function storage to avoid name conflicts
[Renderer] Revert automatic conversion to string

* CLeanup

* Work in progress

* Work in progress

* Work in progress

* Small fixes

* [Designer] Styling update

* [Designer] Styling update

* Work in progress

* Work in progress

* Work in progress

* Disable lockDataStructure

* Work in progress

* Work in progress

* Package-lock updates

* Work in progress

* Move to Adaptive Expression

* Cleanup

* Templating tweaks + initial doc generation

* [Templating] Bug fixes

* Add null check for this.renderedElement

* updated website pacakge versions. removed const from exported enums

* [Templating] Fix regr introduced with last commit
Update README.ms

* [Templating] Fix broken {{Date}} and {{TIME}}

* fix website templating script based on API changes

* Changes to accommodate Schema changes (#3967)

* Changes to accommodate Schema changes:
* appId property - removed
* autoRefresh property - renamed
* userIds and displayCardWhenRefresh properties inside refresh - removed

* Renamed ActivityInvocationContext.Refresh to ActivityInvocationContext.Automatic

* Renamed ActivityInvocationContext as ActivityInvocationTrigger

* Moving ActivityInvocationTrigger inside InvokeActivity as per design

* Update to use AEL

* Better auto refresh handling

* update template samples location and where website loads them from

* Updated the Scenarios

* Fix website - load Monaco before designer init

* Update designer README

* ported samples updates from .net branch

* [Site] Fix data sample not loading

* variable misnamed

* Add built-in refresh button

* Fix data structure gen from null

* update site script

* Fix duplicated refresh button

* Small doc fix

* Update to AEL 4.9.0-rc4

* Revert "Update to AEL 4.9.0-rc4"

This reverts commit e3a0d77.

* Upgrade to AEL 4.9.0-rc5

* Updated samples and added Elements cards

* Revert "Merge branch 'ts/renderer-refactor' of github.com:Microsoft/AdaptiveCards into ts/renderer-refactor"

This reverts commit 858c7c0, reversing
changes made to 7cd9ef6.

* Revert "Updated samples and added Elements cards"

This reverts commit 7cd9ef6.

* Updated Samples

* Revert "Updated Samples"

This reverts commit 94d5e35.

* one git automatic merge led to build errors and had to revert several commits

* updated samples and added Elements payload after fixing bungled merge

* [Designer] Bump Teams to 1.2

* site new card dialog loads template versions now

* update stock template

* Update dependencies

* Npm audit fix

* Incorporate changes from main

* Merge AAF code into renderer package

* removing failing test for now to test AAF publishing

* update AC package version to 3.x for AAF testing

* Make AdaptiveApplet registries public

* Fix new syntax error

* New AdaptiveApplet.onExecuteAction event

* Add AdaptiveApplet.hostConfig

* Allow blocking manual refreshes

* Add support for per-action progress indicator

* Refactor to make UB model part of main SDK
Add support for providing custom SerializationContext to AdaptiveApplet

* Some refactoring to support auth model

* Package cleanup

* More refactoring for auth support

* Web Chat support schema 1.3 (#5514)

Co-authored-by: Paul Campbell <[email protected]>

* Some renaming

* Fix weird discrepancy with main

* Auth support complete

* Add anchor right click support
Cleanup

* Tweaks

Co-authored-by: shalinijoshi19 <[email protected]>
Co-authored-by: Matt Hidinger <[email protected]>
Co-authored-by: Paul Campbell <[email protected]>
Co-authored-by: Muthurathinam <[email protected]>
Co-authored-by: nesalang <[email protected]>
Co-authored-by: William Wong <[email protected]>

* Update Action.Execute.json

Update doc URL for Action.Execute

* [Shared] 1.4 - Action.Execute (#5539)

* UAM

* moar tests

* PR feedback

* Add new files to UWP to unbreak build

* Fix ShouldSerialize

Co-authored-by: Rebecca Muraira <[email protected]>

* [.NET] Add support for parsing schema 1.4 features (#5531)

* [.NET] Add support for parsing schema 1.4 features

* PR feedback

* PR feedback

* [Android] Action.Execute support (#5551)

* Fix SWIG ordering

* Action.Execute support

* Revert ParseUtil::GetValueAsString; not a duplicate

* Bump version

* [iOS] Action.Execute Changes (#5549)

* UAM

* moar tests

* PR feedback

* Add new files to UWP to unbreak build

* [iOS] Action.Execute ios change

* [iOS] exposed auth card to the root card

* [iOS] fixed typo

* added unit tests

* [iOS] Added Action.Execute Renderer

* [iOS] CR Comments

Co-authored-by: Risheek Rajolu <[email protected]>
Co-authored-by: Rebecca Muraira <[email protected]>

* [UWP] Add parsing of schema 1.4 changes and Action.Excute support (#5554)

* [UWP] Add parsing of schema 1.4 changes and Action.Excute support

* Fix SAL

Co-authored-by: Joseph Woo <[email protected]>

* Add validation + Action.Execute test card

* [iOS] updated text view to update its intrinsic content size dynamically (#5560)

* [JS] Universal Action designer support + some bug fixes (#5565)

* Universal Actions designer support
Plus some bug fixes

* Cleanup

* [JS] Action.description and TextBlock.style

* version update for Android

* description --> tooltip

* Bump custom.props version

* [JS] Updated package deps

* [JS] Updated package versions

* Metrics for layout structure comparison (#5576)

* Added bleu score metric collection for layout structure comparions

* latest changes based on review comments

* removed OrderedDict for sorting

* latest changes

* command usage changes

* [shared] Parser support for TextBlock headings changes (#5577)

* [Shared] Text Heading Support

* Added Samples

* changed spaces to tabs in .json

* [iOS] Text heading changes (#5584)

* [Shared] Text Heading Support

* Added Samples

* [iOS] Text heading changes

* [Android][Accessibility] TextBlock style: heading (#5587)

* [Android] Accessible Headings

* Bump to 1.5

* Missed SWIG enum

* [UWP][Shared] Implement Text Heading Object model for UWP and fix shared model serialization (#5601)

* Remove tooltip implementation

* Remove tooltip from schema

* Remove tooltip (description) from designer

Co-authored-by: Adaptive Cards Specs CI <[email protected]>
Co-authored-by: Paul Campbell <[email protected]>
Co-authored-by: Rebecca Muraira <[email protected]>
Co-authored-by: shalinijoshi19 <[email protected]>
Co-authored-by: Matt Hidinger <[email protected]>
Co-authored-by: Muthurathinam <[email protected]>
Co-authored-by: nesalang <[email protected]>
Co-authored-by: William Wong <[email protected]>
Co-authored-by: Risheek Rajolu <[email protected]>
Co-authored-by: Joseph Woo <[email protected]>
Co-authored-by: Keerthana Manoharan <[email protected]>

* [JS] TextBlock.style (#5607)

* Schema 1.4 (#5317)

* Schema update for Action.Execute and refresh

* Generate 1.4 schema file

* Updated specs

* Update toc.yml

* Updated specs

* Add authentication

* Updated specs

* Fix typos

* Add missing Action.Execute.verb

* Update verbiage

* Add Action.Execute sample

* Table of contents updates and labels on the sample inputs

Co-authored-by: Adaptive Cards Specs CI <[email protected]>
Co-authored-by: Paul Campbell <[email protected]>
Co-authored-by: Rebecca Muraira <[email protected]>

* [JS] Add support for Universal Actions (#5533)

* Work in progress

* strictNullChecks, noImplicitAny
noImplicitReturns, noImplicitThis, noUnusedLocals
noFallthroughCasesInSwitch
More refactoring
Work in progress

* var --> let

* Array<type> --> type[]
for (let i = 0 ...) --> for (let item of ...)
Additional cleanup
Work in progress

* null --> undefined where appropriate

* Code organizing plus some cleanup

* CardObject, CardElement, TextBlock now use schema

* Image, FactSet now use schema

* FactSet fully uses schema

* Library size reduction

* Looking at decorators...

* Fully move to decorators

* Some cleanup

* selectAction/inlineAction --> schema

* ChoiceSet/ToggleInput --> schema

* Media -> schema

* All inputs --> schema

* Fix IE11 compat (don't use obj.constructor.name)

* OpenUrl/ToggleVis./Submit -> schema

* Action.Http --> schema

* Everything now uses schema

* Merge changes from master

* Fix designer build break

* Add version info in type registries
Plus some cleanup

* Forgot to add v1.2 to ToggleVisibility

* API simplification

* Library size reduction (~2 KB minified)

* Reduce library size

* Small simplification

* Update README wih notable changes so far

* More simplifications

* More simplification + 1KB size reduction

* More simplification + bug fix

* Parse logic refactor (WIP)

* Refactor parse logic (WIP)

* Move designer off global registry

* Small cLeanup

* Refactor toJSON

* Parse/serialize to/from specific schema version
Full version picker support
Still WIP, but almost there

* Code complete - full version picker support

* Fix test case + minor tweak

* Designer bug fixes and minor enhancements

* Review feedback so far + designer improvements

* Designer bug fixes

* Add support for cancelling d&d with ESC

* Review feedback + fix value type for number input

* Address review feedback

* More review feedback

* Fix Image.Width/Height serialization regression

* Fix Action.Submit not incl. empty inputs anymore
Add onExecuteAction handler in Preview Mode

* Small designer tweak

* Small popup control refactor

* [Designer] Enhanced data binding support

* [Designer] Small tweak/fix

* [Designer] Improved sample data support

* Use correct sample data in Preview Mode

* Integrate changes from master

* Add support for "preview" param on designer URL
Hide data structure toolbox

* [Designer] Enhanced sample picker dialog

* Fix integration mistake

* [Designer] Combine open sample and new card buttons
Also fully remove "full screen" button

* Remove references to removed buttons

* Sample picker tweaks

* Fix nasty regression introduced by fix in master

* [Designer] Add CHANGELOG.md

* Publishing preview designer + AC JS packages

* [Designer] HostContainer controls target version

* [Designer] Adding getCard and setCard back

* bump package versions for beta release

* Update README.md

* Improve experience for modern browsers

* [Designer] Add modulus, round, ceil, floor func.
[Renderer] Serialization bug fixes

* Update README

* Small cleanup

* Work in progress

* Work in progress

* [Templating] Fix $when not working within loops
[Renderer] Dynamically convert values to string for string properties

* [Templating] Add toString, parseInt, parseFloat
Refactor function storage to avoid name conflicts
[Renderer] Revert automatic conversion to string

* CLeanup

* Work in progress

* Work in progress

* Work in progress

* Small fixes

* [Designer] Styling update

* [Designer] Styling update

* Work in progress

* Work in progress

* Work in progress

* Disable lockDataStructure

* Work in progress

* Work in progress

* Package-lock updates

* Work in progress

* Move to Adaptive Expression

* Cleanup

* Templating tweaks + initial doc generation

* [Templating] Bug fixes

* Add null check for this.renderedElement

* updated website pacakge versions. removed const from exported enums

* [Templating] Fix regr introduced with last commit
Update README.ms

* [Templating] Fix broken {{Date}} and {{TIME}}

* fix website templating script based on API changes

* Changes to accommodate Schema changes (#3967)

* Changes to accommodate Schema changes:
* appId property - removed
* autoRefresh property - renamed
* userIds and displayCardWhenRefresh properties inside refresh - removed

* Renamed ActivityInvocationContext.Refresh to ActivityInvocationContext.Automatic

* Renamed ActivityInvocationContext as ActivityInvocationTrigger

* Moving ActivityInvocationTrigger inside InvokeActivity as per design

* Update to use AEL

* Better auto refresh handling

* update template samples location and where website loads them from

* Updated the Scenarios

* Fix website - load Monaco before designer init

* Update designer README

* ported samples updates from .net branch

* [Site] Fix data sample not loading

* variable misnamed

* Add built-in refresh button

* Fix data structure gen from null

* update site script

* Fix duplicated refresh button

* Small doc fix

* Update to AEL 4.9.0-rc4

* Revert "Update to AEL 4.9.0-rc4"

This reverts commit e3a0d77.

* Upgrade to AEL 4.9.0-rc5

* Updated samples and added Elements cards

* Revert "Merge branch 'ts/renderer-refactor' of github.com:Microsoft/AdaptiveCards into ts/renderer-refactor"

This reverts commit 858c7c0, reversing
changes made to 7cd9ef6.

* Revert "Updated samples and added Elements cards"

This reverts commit 7cd9ef6.

* Updated Samples

* Revert "Updated Samples"

This reverts commit 94d5e35.

* one git automatic merge led to build errors and had to revert several commits

* updated samples and added Elements payload after fixing bungled merge

* [Designer] Bump Teams to 1.2

* site new card dialog loads template versions now

* update stock template

* Update dependencies

* Npm audit fix

* Incorporate changes from main

* Merge AAF code into renderer package

* removing failing test for now to test AAF publishing

* update AC package version to 3.x for AAF testing

* Make AdaptiveApplet registries public

* Fix new syntax error

* New AdaptiveApplet.onExecuteAction event

* Add AdaptiveApplet.hostConfig

* Allow blocking manual refreshes

* Add support for per-action progress indicator

* Refactor to make UB model part of main SDK
Add support for providing custom SerializationContext to AdaptiveApplet

* Some refactoring to support auth model

* Package cleanup

* More refactoring for auth support

* Web Chat support schema 1.3 (#5514)

Co-authored-by: Paul Campbell <[email protected]>

* Some renaming

* Fix weird discrepancy with main

* Auth support complete

* Add anchor right click support
Cleanup

* Tweaks

Co-authored-by: shalinijoshi19 <[email protected]>
Co-authored-by: Matt Hidinger <[email protected]>
Co-authored-by: Paul Campbell <[email protected]>
Co-authored-by: Muthurathinam <[email protected]>
Co-authored-by: nesalang <[email protected]>
Co-authored-by: William Wong <[email protected]>

* Update Action.Execute.json

Update doc URL for Action.Execute

* [Shared] 1.4 - Action.Execute (#5539)

* UAM

* moar tests

* PR feedback

* Add new files to UWP to unbreak build

* Fix ShouldSerialize

Co-authored-by: Rebecca Muraira <[email protected]>

* [.NET] Add support for parsing schema 1.4 features (#5531)

* [.NET] Add support for parsing schema 1.4 features

* PR feedback

* PR feedback

* [Android] Action.Execute support (#5551)

* Fix SWIG ordering

* Action.Execute support

* Revert ParseUtil::GetValueAsString; not a duplicate

* Bump version

* [iOS] Action.Execute Changes (#5549)

* UAM

* moar tests

* PR feedback

* Add new files to UWP to unbreak build

* [iOS] Action.Execute ios change

* [iOS] exposed auth card to the root card

* [iOS] fixed typo

* added unit tests

* [iOS] Added Action.Execute Renderer

* [iOS] CR Comments

Co-authored-by: Risheek Rajolu <[email protected]>
Co-authored-by: Rebecca Muraira <[email protected]>

* [UWP] Add parsing of schema 1.4 changes and Action.Excute support (#5554)

* [UWP] Add parsing of schema 1.4 changes and Action.Excute support

* Fix SAL

Co-authored-by: Joseph Woo <[email protected]>

* Add validation + Action.Execute test card

* [iOS] updated text view to update its intrinsic content size dynamically (#5560)

* [JS] Universal Action designer support + some bug fixes (#5565)

* Universal Actions designer support
Plus some bug fixes

* Cleanup

* [JS] Action.description and TextBlock.style

* version update for Android

* description --> tooltip

* Bump custom.props version

* [JS] Updated package deps

* [JS] Updated package versions

* Metrics for layout structure comparison (#5576)

* Added bleu score metric collection for layout structure comparions

* latest changes based on review comments

* removed OrderedDict for sorting

* latest changes

* command usage changes

* [shared] Parser support for TextBlock headings changes (#5577)

* [Shared] Text Heading Support

* Added Samples

* changed spaces to tabs in .json

* [iOS] Text heading changes (#5584)

* [Shared] Text Heading Support

* Added Samples

* [iOS] Text heading changes

* [Android][Accessibility] TextBlock style: heading (#5587)

* [Android] Accessible Headings

* Bump to 1.5

* Missed SWIG enum

* [UWP][Shared] Implement Text Heading Object model for UWP and fix shared model serialization (#5601)

* Remove tooltip implementation

* Remove tooltip from schema

* Remove tooltip (description) from designer

* Restore Action.accessibleTitle

* Add TextBlock.headingLevel to HostConfig

* HostConfig.textBlock -> HostConfig.headings

* Designer fix after rebasing to js-1.5-preview

Co-authored-by: Adaptive Cards Specs CI <[email protected]>
Co-authored-by: Paul Campbell <[email protected]>
Co-authored-by: Rebecca Muraira <[email protected]>
Co-authored-by: shalinijoshi19 <[email protected]>
Co-authored-by: Matt Hidinger <[email protected]>
Co-authored-by: Muthurathinam <[email protected]>
Co-authored-by: nesalang <[email protected]>
Co-authored-by: William Wong <[email protected]>
Co-authored-by: Risheek Rajolu <[email protected]>
Co-authored-by: Joseph Woo <[email protected]>
Co-authored-by: Keerthana Manoharan <[email protected]>

* Add Action.tooltip

* Promote tooltip to aria-label when appropriate

Co-authored-by: Robin Liao <[email protected]>
Co-authored-by: Adaptive Cards Specs CI <[email protected]>
Co-authored-by: Paul Campbell <[email protected]>
Co-authored-by: Rebecca Muraira <[email protected]>
Co-authored-by: shalinijoshi19 <[email protected]>
Co-authored-by: Matt Hidinger <[email protected]>
Co-authored-by: Muthurathinam <[email protected]>
Co-authored-by: nesalang <[email protected]>
Co-authored-by: William Wong <[email protected]>
Co-authored-by: Risheek Rajolu <[email protected]>
Co-authored-by: Joseph Woo <[email protected]>
Co-authored-by: Keerthana Manoharan <[email protected]>
  • Loading branch information
13 people authored Apr 14, 2021
1 parent a644c14 commit a3bc68a
Show file tree
Hide file tree
Showing 44 changed files with 3,125 additions and 286 deletions.
24 changes: 17 additions & 7 deletions schemas/1.5.0/adaptive-card.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"iconUrl": {},
"style": {},
"fallback": {},
"tooltip": {},
"requires": {}
},
"type": "object",
Expand Down Expand Up @@ -64,6 +65,7 @@
"iconUrl": {},
"style": {},
"fallback": {},
"tooltip": {},
"requires": {}
},
"type": "object",
Expand Down Expand Up @@ -94,6 +96,7 @@
"iconUrl": {},
"style": {},
"fallback": {},
"tooltip": {},
"requires": {}
},
"type": "object",
Expand Down Expand Up @@ -134,6 +137,7 @@
"iconUrl": {},
"style": {},
"fallback": {},
"tooltip": {},
"requires": {}
},
"type": "object",
Expand Down Expand Up @@ -165,6 +169,7 @@
"iconUrl": {},
"style": {},
"fallback": {},
"tooltip": {},
"requires": {}
},
"type": "object",
Expand Down Expand Up @@ -1425,12 +1430,6 @@
"$ref": "#/definitions/FontSize",
"description": "Controls size of text."
},
"style": {
"$ref": "#/definitions/TextBlockStyle",
"description": "Determines the style of this text block",
"default": "paragraph",
"version": "vNext"
},
"weight": {
"$ref": "#/definitions/FontWeight",
"description": "Controls the weight of `TextBlock` elements."
Expand All @@ -1440,6 +1439,11 @@
"description": "If `true`, allow text to wrap. Otherwise, text is clipped.",
"default": false
},
"style": {
"$ref": "#/definitions/TextBlockStyle",
"description": "The style of this TextBlock for accessibility purposes.",
"default": "paragraph"
},
"fallback": {},
"height": {},
"separator": {},
Expand Down Expand Up @@ -1689,7 +1693,8 @@
]
},
"TextBlockStyle": {
"description": "Controls the style of a Text Block",
"description": "Controls how a TextBlock behaves.",
"version": "1.5",
"anyOf": [
{
"enum": [
Expand Down Expand Up @@ -2634,6 +2639,11 @@
"description": "Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.",
"version": "1.2"
},
"tooltip": {
"type": "string",
"description": "Defines text that should be displayed to the end user as they hover the mouse over the action, and read when using narration software.",
"version": "1.5"
},
"requires": {}
},
"type": "object",
Expand Down
5 changes: 5 additions & 0 deletions schemas/src/actions/Action.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"type": "Action|FallbackOption",
"description": "Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.",
"version": "1.2"
},
"tooltip": {
"type": "string",
"description": "Defines text that should be displayed to the end user as they hover the mouse over the action, and read when using narration software.",
"version": "1.5"
}
}
}
101 changes: 50 additions & 51 deletions schemas/src/elements/TextBlock.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/AdaptiveCards/6f39aedce45864ae1067ed44a5551dc973790bb5/source/nodejs/typed-schema/schema/lib/Type.json",
"extends": "Element",
"description": "Displays text, allowing control over font sizes, weight, and color.",
"properties": {
"text": {
"type": "string",
"description": "Text to display. A subset of markdown is supported (https://aka.ms/ACTextFeatures)",
"required": true
},
"color": {
"type": "Colors",
"description": "Controls the color of `TextBlock` elements."
},
"fontType": {
"type": "FontType",
"description": "Type of font to use for rendering",
"version": "1.2"
},
"horizontalAlignment": {
"type": "HorizontalAlignment",
"description": "Controls the horizontal text alignment."
},
"isSubtle": {
"type": "boolean",
"description": "If `true`, displays text slightly toned down to appear less prominent.",
"default": false
},
"maxLines": {
"type": "number",
"description": "Specifies the maximum number of lines to display."
},
"size": {
"type": "FontSize",
"description": "Controls size of text."
},
"style": {
"type": "TextBlockStyle",
"description": "Determines the style of this text block",
"default": "paragraph",
"version": "vNext"
},
"weight": {
"type": "FontWeight",
"description": "Controls the weight of `TextBlock` elements."
},
"wrap": {
"type": "boolean",
"description": "If `true`, allow text to wrap. Otherwise, text is clipped.",
"default": false
}
}
"$schema": "https://raw.githubusercontent.com/microsoft/AdaptiveCards/6f39aedce45864ae1067ed44a5551dc973790bb5/source/nodejs/typed-schema/schema/lib/Type.json",
"extends": "Element",
"description": "Displays text, allowing control over font sizes, weight, and color.",
"properties": {
"text": {
"type": "string",
"description": "Text to display. A subset of markdown is supported (https://aka.ms/ACTextFeatures)",
"required": true
},
"color": {
"type": "Colors",
"description": "Controls the color of `TextBlock` elements."
},
"fontType": {
"type": "FontType",
"description": "Type of font to use for rendering",
"version": "1.2"
},
"horizontalAlignment": {
"type": "HorizontalAlignment",
"description": "Controls the horizontal text alignment."
},
"isSubtle": {
"type": "boolean",
"description": "If `true`, displays text slightly toned down to appear less prominent.",
"default": false
},
"maxLines": {
"type": "number",
"description": "Specifies the maximum number of lines to display."
},
"size": {
"type": "FontSize",
"description": "Controls size of text."
},
"weight": {
"type": "FontWeight",
"description": "Controls the weight of `TextBlock` elements."
},
"wrap": {
"type": "boolean",
"description": "If `true`, allow text to wrap. Otherwise, text is clipped.",
"default": false
},
"style": {
"type": "TextBlockStyle",
"description": "The style of this TextBlock for accessibility purposes.",
"default": "paragraph"
}
}
}
23 changes: 15 additions & 8 deletions schemas/src/enums/TextBlockStyle.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/AdaptiveCards/6f39aedce45864ae1067ed44a5551dc973790bb5/source/nodejs/typed-schema/schema/lib/Type.json",
"classType": "Enum",
"description": "Controls the style of a Text Block",
"values": [
"paragraph",
"heading"
]
}
"$schema": "https://raw.githubusercontent.com/microsoft/AdaptiveCards/6f39aedce45864ae1067ed44a5551dc973790bb5/source/nodejs/typed-schema/schema/lib/Type.json",
"classType": "Enum",
"description": "Controls how a TextBlock behaves.",
"version": "1.5",
"values": [
{
"value": "paragraph",
"description": "This is the default style. The TextBlock behaves as standard content and will be read as such by accessibility software."
},
{
"value": "heading",
"description": "The TextBlock behaves as a heading which impacts how accessibility software handles navigation and narration."
}
]
}
74 changes: 37 additions & 37 deletions source/nodejs/ac-typed-schema/package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
{
"name": "ac-typed-schema",
"version": "0.6.1",
"private": true,
"description": "Generates the element/property tables for our specs based on the schema file.",
"author": "AdaptiveCards",
"license": "MIT",
"main": "lib/typed-schema.js",
"types": "lib/typed-schema.d.ts",
"files": [
"lib",
"src"
],
"scripts": {
"clean": "rimraf build lib dist",
"build": "tsc",
"dts": "dts-generator --prefix ac-typed-schema --project . --out dist/typed-schema.d.ts",
"lint": "eslint -c ../.eslintrc.js src/**/*.ts",
"release": "npm run build && npm run dts && npm run generate-adaptive-schema",
"test": "mocha",
"build-and-test": "npm run build && npm run test",
"generate-schema": "echo 'test' > ./schema/lib/Type.json && node ./lib/command-line.js ./schema/src Class,Enum classType > ./schema/lib/Type.json",
"generate-adaptive-schema": "node ./lib/command-line.js ../../../schemas/src AdaptiveCard > ../../../schemas/adaptive-card.json"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^3.4.0",
"@typescript-eslint/eslint-plugin-tslint": "^3.4.0",
"@typescript-eslint/parser": "^3.4.0",
"eslint": "^7.3.1",
"glob": "^7.1.6",
"js-yaml": "^3.13.1",
"markdown-table": "^1.1.3",
"mocha": "^6.2.3",
"p-iteration": "^1.1.8",
"rimraf": "^3.0.2",
"typescript": "^3.9.5",
"webpack-cli": "^3.3.12"
}
"name": "ac-typed-schema",
"version": "0.6.1",
"private": true,
"description": "Generates the element/property tables for our specs based on the schema file.",
"author": "AdaptiveCards",
"license": "MIT",
"main": "lib/typed-schema.js",
"types": "lib/typed-schema.d.ts",
"files": [
"lib",
"src"
],
"scripts": {
"clean": "rimraf build lib dist",
"build": "tsc",
"dts": "dts-generator --prefix ac-typed-schema --project . --out dist/typed-schema.d.ts",
"lint": "eslint -c ../.eslintrc.js src/**/*.ts",
"release": "npm run build && npm run dts && npm run generate-adaptive-schema",
"test": "mocha",
"build-and-test": "npm run build && npm run test",
"generate-schema": "echo 'test' > ./schema/lib/Type.json && node ./lib/command-line.js ./schema/src Class,Enum classType > ./schema/lib/Type.json",
"generate-adaptive-schema": "node ./lib/command-line.js ../../../schemas/src AdaptiveCard > ../../../schemas/adaptive-card.json"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^3.4.0",
"@typescript-eslint/eslint-plugin-tslint": "^3.4.0",
"@typescript-eslint/parser": "^3.4.0",
"eslint": "^7.3.1",
"glob": "^7.1.6",
"js-yaml": "^3.13.1",
"markdown-table": "^1.1.3",
"mocha": "^6.2.3",
"p-iteration": "^1.1.8",
"rimraf": "^3.0.2",
"typescript": "^3.9.5",
"webpack-cli": "^3.3.12"
}
}
Loading

0 comments on commit a3bc68a

Please sign in to comment.