Skip to content

Commit 2646a94

Browse files
committed
Merge branch 'release/23.01' of github.com:Microsoft/AdaptiveCards into release/23.01
2 parents 8387f71 + f4cc429 commit 2646a94

File tree

28 files changed

+528
-77
lines changed

28 files changed

+528
-77
lines changed

samples/v1.0/Elements/Container.SelectAction.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

samples/v1.0/Elements/Column.SelectAction.json renamed to samples/v1.1/Elements/Column.SelectAction.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
33
"type": "AdaptiveCard",
4-
"version": "1.0",
4+
"version": "1.1",
55
"body": [
66
{
77
"type": "TextBlock",

samples/v1.0/Elements/ColumnSet.SelectAction.json renamed to samples/v1.1/Elements/ColumnSet.SelectAction.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"type": "AdaptiveCard",
3-
"version": "1.0",
3+
"version": "1.1",
44
"body": [
55
{
66
"type": "TextBlock",
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
3+
"type": "AdaptiveCard",
4+
"version": "1.1",
5+
"body": [
6+
{
7+
"type": "Container",
8+
"items": [
9+
{
10+
"type": "TextBlock",
11+
"text": "Cool link"
12+
}
13+
],
14+
"selectAction": {
15+
"type": "Action.OpenUrl",
16+
"tooltip": "Go to a url",
17+
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
18+
}
19+
},
20+
{
21+
"type": "Container",
22+
"style": "emphasis",
23+
"items": [
24+
{
25+
"type": "TextBlock",
26+
"text": "Emphasis link"
27+
}
28+
],
29+
"selectAction": {
30+
"type": "Action.OpenUrl",
31+
"tooltip": "Go to a different url",
32+
"url": "https://msn.com"
33+
}
34+
},
35+
{
36+
"type": "Container",
37+
"items": [
38+
{
39+
"type": "TextBlock",
40+
"text": "Submit action"
41+
}
42+
],
43+
"selectAction": {
44+
"type": "Action.Submit",
45+
"tooltip": "Submit action",
46+
"data": {
47+
"info": "My submit action data"
48+
}
49+
}
50+
}
51+
]
52+
}

source/nodejs/adaptivecards-designer/src/containers/widget/widget-container-dark.css

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
:root {
2+
--widget-margin: 16px;
3+
--left-right-arrow-height: 38px;
4+
}
5+
16
.widget-outer-container {
27
border: 1px solid rgba(0, 0, 0, 0.1);
38
background: #2c2c2c;
@@ -15,7 +20,7 @@
1520
z-index: 1;
1621
display: flex;
1722
justify-content: space-around;
18-
margin: 16px;
23+
margin: var(--widget-margin);
1924
border-radius: 8px 8px 0px 0px;
2025
}
2126

@@ -62,15 +67,15 @@
6267

6368
.ac-adaptiveCard {
6469
border: 0px;
65-
padding: 48px 16px 16px 16px !important;
70+
padding: 48px var(--widget-margin) var(--widget-margin) var(--widget-margin) !important;
6671
margin: 0px !important;
6772
border-radius: 8px;
6873
}
6974

7075
.ac-card-elements-wrapper {
7176
height: 100%;
72-
margin: 0px -16px 0px -16px !important;
73-
padding: 0px 16px 0px 16px !important;
77+
margin: 0px calc(0px - var(--widget-margin)) 0px calc(0px - var(--widget-margin)) !important;
78+
padding: 0px var(--widget-margin) 0px var(--widget-margin) !important;
7479
}
7580

7681
.no-overflow {
@@ -331,15 +336,15 @@ a.ac-anchor:hover {
331336
}
332337

333338
.ac-carousel-container {
334-
padding: 0px 16px 16px 16px !important;
339+
padding: 0px var(--widget-margin) var(--widget-margin) var(--widget-margin) !important;
335340
}
336341

337342
.ac-carousel-container-vertical {
338343
display: flex;
339344
}
340345

341346
.ac-carousel-card-level-container {
342-
margin: 0px -16px -16px -16px !important;
347+
margin: 0px calc(0px - var(--widget-margin)) calc(0px - var(--widget-margin)) calc(0px - var(--widget-margin)) !important;
343348
}
344349

345350
.ac-container.ac-adaptiveCard .swiper-button-prev.ac-carousel-left,
@@ -367,8 +372,11 @@ a.ac-anchor:hover {
367372
.swiper-button-prev.ac-carousel-left,
368373
.swiper-button-next.ac-carousel-right {
369374
border-radius:3px;
370-
height:38px;
375+
height: var(--left-right-arrow-height);
371376
width:16px;
377+
/* The arrows already have 'top: 50%' set
378+
We need to subtract half of the bottom margin and half of the arrow height to center the arrows */
379+
margin-top: calc(0px - ((var(--widget-margin) + var(--left-right-arrow-height)) / 2)) !important;
372380
}
373381

374382
.swiper-button-prev.ac-carousel-up,

source/nodejs/adaptivecards-designer/src/containers/widget/widget-container-light.css

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1+
:root {
2+
--widget-margin: 16px;
3+
--left-right-arrow-height: 38px;
4+
}
5+
16
.ac-adaptiveCard {
27
border: 0px;
3-
padding: 48px 16px 16px 16px !important;
8+
padding: 48px var(--widget-margin) var(--widget-margin) var(--widget-margin) !important;
49
margin: 0px !important;
510
border-radius: 8px;
611
}
712

813
.ac-card-elements-wrapper {
914
height: 100%;
10-
margin: 0px -16px 0px -16px !important;
11-
padding: 0px 16px 0px 16px !important;
15+
margin: 0px calc(0px - var(--widget-margin)) 0px calc(0px - var(--widget-margin)) !important;
16+
padding: 0px var(--widget-margin) 0px var(--widget-margin) !important;
1217
}
1318

1419
.no-overflow {
@@ -32,7 +37,7 @@
3237
z-index: 1;
3338
display: flex;
3439
justify-content: space-around;
35-
margin: 16px;
40+
margin: var(--widget-margin);
3641
border-radius: 8px 8px 0px 0px;
3742
}
3843

@@ -332,15 +337,15 @@ a.ac-anchor:hover {
332337
}
333338

334339
.ac-carousel-container {
335-
padding: 0px 16px 16px 16px !important;
340+
padding: 0px var(--widget-margin) var(--widget-margin) var(--widget-margin) !important;
336341
}
337342

338343
.ac-carousel-container-vertical {
339344
display: flex;
340345
}
341346

342347
.ac-carousel-card-level-container {
343-
margin: 0px -16px -16px -16px !important;
348+
margin: 0px calc(0px - var(--widget-margin)) calc(0px - var(--widget-margin)) calc(0px - var(--widget-margin)) !important;
344349
}
345350

346351
.ac-container.ac-adaptiveCard .swiper-button-prev.ac-carousel-left,
@@ -368,8 +373,11 @@ a.ac-anchor:hover {
368373
.swiper-button-prev.ac-carousel-left,
369374
.swiper-button-next.ac-carousel-right {
370375
border-radius:3px;
371-
height:38px;
376+
height: var(--left-right-arrow-height);
372377
width:16px;
378+
/* The arrows already have 'top: 50%' set
379+
We need to subtract half of the bottom margin and half of the arrow height to center the arrows */
380+
margin-top: calc(0px - ((var(--widget-margin) + var(--left-right-arrow-height)) / 2)) !important;
373381
}
374382

375383
.swiper-button-prev.ac-carousel-up,

source/nodejs/adaptivecards-designer/src/designer-peers.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3399,6 +3399,9 @@ export class CarouselPeer extends ContainerPeer {
33993399
// Question: What do we want the default value to be here?
34003400
static readonly timerProperty = new CarouselTimerPropertyEditor(Adaptive.Versions.v1_6, "timer", "Timer", 5000);
34013401
static readonly initialPageProperty = new NumberPropertyEditor(Adaptive.Versions.v1_6, "initialPageIndex", "Initial page", 0);
3402+
static readonly orientationProperty = new EnumPropertyEditor(Adaptive.Versions.v1_6, "carouselOrientation", "Orientation", Adaptive.Orientation);
3403+
static readonly heightInPixelsProperty = new NumberPropertyEditor(Adaptive.Versions.v1_6, "carouselHeight", "Height in pixels");
3404+
static readonly loopProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_6, "carouselLoop", "Loop");
34023405

34033406
protected internalAddCommands(context: DesignContext, commands: Array<PeerCommand>) {
34043407
super.internalAddCommands(context, commands);
@@ -3436,7 +3439,10 @@ export class CarouselPeer extends ContainerPeer {
34363439
propertySheet.add(
34373440
defaultCategory,
34383441
CarouselPeer.timerProperty,
3439-
CarouselPeer.initialPageProperty);
3442+
CarouselPeer.initialPageProperty,
3443+
CarouselPeer.orientationProperty,
3444+
CarouselPeer.heightInPixelsProperty,
3445+
CarouselPeer.loopProperty);
34403446
}
34413447

34423448
canDrop(peer: DesignerPeer) {

source/nodejs/adaptivecards-designer/src/tool-box.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export class Toolbox {
5555
this._collapsedTabContainer.appendChild(this._headerRootElement);
5656
this.restoreState();
5757
}
58+
this._expandCollapseButtonElement.setAttribute("aria-expanded", this._isExpanded.toString());
5859
}
5960
}
6061

@@ -143,21 +144,27 @@ export class Toolbox {
143144

144145
e.preventDefault();
145146
this._expandCollapseButtonElement.focus();
147+
148+
// Add a delay so the focus event has completed
149+
setTimeout(() => { this._expandCollapseButtonElement.setAttribute("aria-expanded", this._isExpanded.toString()); }, 1);
146150
}
147151

148152
if (e.key === Constants.keys.escape) {
149153
this.collapse();
150154

151155
e.preventDefault();
152156
this._expandCollapseButtonElement.focus();
157+
158+
// Add a delay so the focus event has completed
159+
setTimeout(() => { this._expandCollapseButtonElement.setAttribute("aria-expanded", this._isExpanded.toString()); }, 1);
153160
}
154161
}
155162

156163
this._expandCollapseButtonElement.onclick = (e) => {
157164
this.toggle();
165+
this._expandCollapseButtonElement.setAttribute("aria-expanded", this._isExpanded.toString());
158166

159167
e.preventDefault();
160-
161168
return true;
162169
}
163170

@@ -192,8 +199,6 @@ export class Toolbox {
192199
}
193200

194201
this._expandCollapseButtonElement.title = "Show " + this.title;
195-
this._expandCollapseButtonElement.setAttribute("aria-expanded", "false");
196-
197202
this._isExpanded = false;
198203

199204
this.toggled(saveState);
@@ -212,8 +217,6 @@ export class Toolbox {
212217
}
213218

214219
this._expandCollapseButtonElement.title = "Hide " + this.title;
215-
this._expandCollapseButtonElement.setAttribute("aria-expanded", "true");
216-
217220
this._isExpanded = true;
218221

219222
this.toggled();
@@ -268,6 +271,7 @@ export class Toolbox {
268271
else {
269272
this.collapse();
270273
}
274+
this._expandCollapseButtonElement.setAttribute("aria-expanded", this._isExpanded.toString());
271275
}
272276
}
273277
finally {

source/nodejs/adaptivecards-designer/src/toolbar.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export class ToolbarButton extends ToolbarElement {
5959
private _isEnabled: boolean = true;
6060
private _allowToggle: boolean = false;
6161
private _isToggled: boolean = false;
62+
private _isLink: boolean = false;
6263

6364
protected clicked() {
6465
if (this.isEnabled && this.onClick) {
@@ -105,6 +106,10 @@ export class ToolbarButton extends ToolbarElement {
105106
}
106107

107108
this.renderedElement.title = this.toolTip ? this.toolTip : "";
109+
110+
if (this._isLink) {
111+
this.renderedElement.setAttribute("role", "link");
112+
}
108113
}
109114

110115
protected internalRender(): HTMLElement {
@@ -128,12 +133,14 @@ export class ToolbarButton extends ToolbarElement {
128133
id: string,
129134
caption: string,
130135
iconClass: string,
131-
onClick: (sender: ToolbarButton) => void = null) {
136+
onClick: (sender: ToolbarButton) => void = null,
137+
isLink: boolean = false) {
132138
super(id);
133139

134140
this.caption = caption;
135141
this.iconClass = iconClass;
136142
this.onClick = onClick;
143+
this._isLink = isLink;
137144
}
138145

139146
get allowToggle(): boolean {
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: 📣 Community Call - April, 2022
3+
subtitle: Overview on Universal Actions + Messaging Extensions
4+
date: 2022-04-14
5+
featured_image: https://pnp.github.io/blog/adaptive-cards-community-call/adaptive-cards-community-call-april-2022/images/recording-adaptive-cards-april-call_hua50012fa682050558ff5eb743a07f983_295297_700x0_resize_q100_h2_box_3.webp
6+
github_username: JeanRoca
7+
twitter: jpthepm
8+
---
9+
10+
The following topics are covered in this month’s community call. Overview on Universal Actions + Messaging Extensions (elevating user experiences with Universal Actions and Messaging Extensions on Teams and Outlook – walkthrough capabilities and value propositions) - Karan Thapar (Microsoft), Accessibility Updates (Accessibility work and SDK v1.6 release) – [J.P. Roca](http://twitter.com/jpthepm) (Microsoft), and 15 minutes live Q&A primarily focused on Universal Actions + Messaging Extensions. This call was hosted by [J.P. Roca](http://twitter.com/jpthepm) (Microsoft) \| @jpthepm. Recorded on April 14, 2022.
11+
12+
### Watch the call here
13+
14+
<iframe width="680" height="383" src="https://www.youtube.com/embed/6Z8U4bSicgk" title="Community Call April 2022 video" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
15+
16+
### Agenda:
17+
- Universal Actions + Messaging Extensions - Karan Thapar (Microsoft) – [00:37](https://youtu.be/6Z8U4bSicgk?t=37)
18+
- Accessibility Updates - [J.P. Roca](http://twitter.com/jpthepm) (Microsoft) \| @jpthepm[21:02](https://youtu.be/6Z8U4bSicgk?t=1262)
19+
- Q&A - J.P. Roca (Microsoft) \| @jpthepm & [Karan Thapar](https://www.linkedin.com/in/karanthapar91/) (Microsoft) –[22:04](https://youtu.be/6Z8U4bSicgk?t=1324)
20+
21+
### Demo:
22+
**Elevate user experiences with Universal Actions and Messaging Extensions on Teams and Outlook** – Adaptive Cards enable you to take quick actions right from within Teams and Outlook. Hear the latest on Universal Actions, vacation approval scenarios with value propositions, contextual or role-based views on Teams, sequential workflows on Teams, messaging extensions, search (read-only) messaging extensions, action messaging extensions, link unfurling, success stories, and value, how to onboard and build resources and Q&A at the end.
23+
24+
### Referenced in this call:
25+
* Documentation – [Universal Actions for Adaptive Cards](https://docs.microsoft.com/microsoftteams/platform/task-modules-and-cards/cards/universal-actions-for-adaptive-cards/overview?tabs=mobile)
26+
* Documentation – [Messaging extensions](https://docs.microsoft.com/microsoftteams/platform/messaging-extensions/what-are-messaging-extensions)
27+
* Documentation – [Link unfurling](https://docs.microsoft.com/microsoftteams/platform/messaging-extensions/how-to/link-unfurling)
28+
* Tool - [Microsoft Bot Framework](https://dev.botframework.com/) \| <https://dev.botframework.com/>
29+
* Demo – [Adaptive Cards Video Player Bot on Teams](https://youtu.be/-Y7_nNwC20w?t=28) - [Alexis Kinzelin](https://www.linkedin.com/in/alexis-kinzelin-214b6b20/) (Microsoft)
30+
* Tool - [Microsoft Graph Toolkit](https://docs.microsoft.com/graph/toolkit/overview)
31+
32+
### Resources in General:
33+
- Let us know the features you need https://aka.ms/ACRoadmap
34+
- Schema Explorer - https://adaptivecards.io/explorer/Action.Execute.html
35+
- Designer - https://adaptivecards.io/designer/
36+
- Get started with Templating - https://aka.ms/ACTemplating
37+
- Browse the Adaptive Cards Code - https://aka.ms/ACRepo
38+
- Find tools, sample cards, and more - https://www.madewithcards.io
39+
- Contribution Guidelines – https://aka.ms/ACRepo
40+
41+
### Adaptive Cards feedback channels
42+
43+
- [Issues and feature requests](https://github.com/Microsoft/AdaptiveCards/issues)
44+
- [Technical questions](https://stackoverflow.com/questions/tagged/adaptive-cards)
45+
46+
The Adaptive Cards developer community call is on the 2nd Thursday of each month. We will provide you with the opportunity to learn about Adaptive Cards in general, how they could be a great tool in your applications and contribute to the evolution of the format and SDKs. Each month, we'll discuss new features we are bringing to the platform, our roadmap, and listen to your feedback and suggestions.

0 commit comments

Comments
 (0)