Skip to content

Commit 68a5492

Browse files
licanhuarahulamlekarRahulAmlekarJeanRocaSidGulatiMsft
authored
Merge main to 22.09 branch and remove searchAndRemoveForbiddenElements (#7873)
* Merge website march22 to main branch (#7857) * Updating Bot Framework links (#6686) Co-authored-by: RahulAmlekar <raamleka@microsoft.com> * Scenario cards + Website indentation fix (#6733) * Changed teams target version to 1.4 * added RTL scenario card * Added scenario card for tooltip and isEnabled * Added order confirmation scenario * Added flight update table scenario * Added restaurant order scenario card * Added app login scenario * Fixed indentation in schema explorer * Testing application login on the samples page * Added extended 1.5 scenario cards * Fixed boolean and duplicate id on cards * added flightupdatetable and restaurant order to ignored cards for .NET tests Co-authored-by: Canhua Li <licanhua@live.com> * Removing "Preview" from Viva Connections (#6791) Co-authored-by: Paul Campbell <paulcam@microsoft.com> * Added blog posts for oct and nov (#6873) * Changed teams target version to 1.4 * Added october and november blog posts * fixed emojis * testing font weights for emoji * removed bold from emojis as not required to render Co-authored-by: Canhua Li <licanhua@live.com> Co-authored-by: almedina-ms <35784165+almedina-ms@users.noreply.github.com> * make columnsets clickable (#7042) Co-authored-by: Canhua Li <licanhua@live.com> * fix merge conflicts with berlin containers in adaptivecards-designer.ts * Convey Ctrl+M shortcut key to move out of code editor (#7072) * provide hint about ctrl+m toggling tab behavior * rephrase Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> Co-authored-by: Canhua Li <licanhua@live.com> * fixed same merge conflict in another commit * color fix (#7081) Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> * update headers (#7082) * Add title to iframe component in December 2019 blog post (#7083) * add title * spacing Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> * change text color (#7091) Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> * add aria label (#7090) Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> * update tab indices accordingly (#7119) Co-authored-by: Vsevolod <sevkorobot@gmail.com> * Adjust contrast on designer peer buttons (#7110) * Update role of 'Select Host App' combobox (#7118) Co-authored-by: root <root@PC-cazamor.redmond.corp.microsoft.com> Co-authored-by: Vsevolod <sevkorobot@gmail.com> * Delete old samples that don't have latest features (causing accessibility issues) (#7106) * updates to samples * phone number regex * delete files instead Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> Co-authored-by: Vsevolod <sevkorobot@gmail.com> * removed carousel samples * fixed merge conflict line 8 of package.json * fix titles (#7130) Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> * fixed merge conflict in ADCIOSVisualizerUITests * add tooltip on initialization (#7126) * more titles to iframes (#7135) Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> * add alt text (#7131) Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> * use active border instead of white (#7122) * add landmark (#7145) * Use HTML lists for hyperlinks (#7127) * Use HTML lists for hyperlinks * consistent spacing in css file Co-authored-by: root <root@PC-cazamor.redmond.corp.microsoft.com> Co-authored-by: Vsevolod <sevkorobot@gmail.com> Co-authored-by: PankajBhojwani <pankaj.d.bhoj@gmail.com> * Add a caption to the table present in the 'help' dialog (#7149) * move keyboard shortcut text to caption * use innerText instead * don't let focus fall on card designer surface (#7153) * add 1 px left margin (#7142) * Add underline styling to hyperlinks (#7157) Co-authored-by: root <root@PC-cazamor.redmond.corp.microsoft.com> Co-authored-by: Vsevolod <sevkorobot@gmail.com> * Allow footer hyperlinks to wrap (#7147) Co-authored-by: PankajBhojwani <pankaj.d.bhoj@gmail.com> * Website updates (#7163) * Changed teams target version to 1.4 * Added october and november blog posts * fixed emojis * testing font weights for emoji * removed bold from emojis as not required to render * added blogs posts * fixed video titles * updated roadmap links * removed repeated sentence Co-authored-by: Canhua Li <licanhua@live.com> * [JS] Remove `role='menubar'` and `role='menuitem'` from `ActionCollection` (#6763) Fixes #6425 Fixes #6019 Related #4859 * sync loc file * more package-locks * cherry pick 646503b * return focus after closing (#7155) * final cherry picks for 5e0f39f and 67187d0 * update designer * revert package-lock.json changes Co-authored-by: Rahul Amlekar <rahul.amlekar@mail.mcgill.ca> Co-authored-by: RahulAmlekar <raamleka@microsoft.com> Co-authored-by: J.P. Roca <jproca@microsoft.com> Co-authored-by: Siddharth Gulati <62313299+SidGulatiMsft@users.noreply.github.com> Co-authored-by: Paul Campbell <paulcam@microsoft.com> Co-authored-by: almedina-ms <35784165+almedina-ms@users.noreply.github.com> Co-authored-by: Roy Nehoran <rnehoran@gmail.com> Co-authored-by: naramaka <65971640+naramaka@users.noreply.github.com> Co-authored-by: PankajBhojwani <pankaj.d.bhoj@gmail.com> Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> Co-authored-by: Will Shown <thure@users.noreply.github.com> Co-authored-by: Vsevolod <sevkorobot@gmail.com> Co-authored-by: Carlos Zamora <carlos.zamora@microsoft.com> Co-authored-by: root <root@PC-cazamor.redmond.corp.microsoft.com> * prefix adaptivecards# for ttpolicy (#7860) * remove dead code searchAndRemoveForbiddenElements * Revert "use active border instead of white (#7122)" (#7874) This reverts commit 68d88fe. Co-authored-by: Rahul Amlekar <rahul.amlekar@mail.mcgill.ca> Co-authored-by: RahulAmlekar <raamleka@microsoft.com> Co-authored-by: J.P. Roca <jproca@microsoft.com> Co-authored-by: Siddharth Gulati <62313299+SidGulatiMsft@users.noreply.github.com> Co-authored-by: Paul Campbell <paulcam@microsoft.com> Co-authored-by: almedina-ms <35784165+almedina-ms@users.noreply.github.com> Co-authored-by: Roy Nehoran <rnehoran@gmail.com> Co-authored-by: naramaka <65971640+naramaka@users.noreply.github.com> Co-authored-by: PankajBhojwani <pankaj.d.bhoj@gmail.com> Co-authored-by: Pankaj Bhojwani <pabhojwa@microsoft.com> Co-authored-by: Will Shown <thure@users.noreply.github.com> Co-authored-by: Vsevolod <sevkorobot@gmail.com> Co-authored-by: Carlos Zamora <carlos.zamora@microsoft.com> Co-authored-by: root <root@PC-cazamor.redmond.corp.microsoft.com>
1 parent a83733f commit 68a5492

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

source/nodejs/adaptivecards-designer/src/card-designer-surface.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -965,25 +965,6 @@ export class CardDesignerSurface {
965965
}
966966
}
967967

968-
private searchAndRemoveForbiddenElements(peerToSearch: DesignerPeers.DesignerPeer, forbiddenElements: any) {
969-
if (peerToSearch.children) {
970-
// Remove forbidden elements
971-
peerToSearch.children.filter((child) =>
972-
(forbiddenElements.includes(child.getCardObject().getJsonTypeName())))
973-
.forEach((e) => {
974-
e.remove(false, true);
975-
});
976-
// If a peer is a container, we should see if it contains forbidden elements as well
977-
peerToSearch.children.filter((child) =>
978-
(child instanceof DesignerPeers.CardElementPeer
979-
&& (child.cardElement instanceof Adaptive.Container || child.cardElement instanceof Adaptive.StylableCardElementContainer)))
980-
.forEach((e) => {
981-
this.searchAndRemoveForbiddenElements(e, forbiddenElements);
982-
});
983-
}
984-
985-
}
986-
987968
get rootPeer(): DesignerPeers.DesignerPeer {
988969
return this._rootPeer;
989970
}

source/nodejs/adaptivecards/src/card-elements.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ export class TextBlock extends BaseTextBlock {
11081108
// Markdown processing is handled outside of Adaptive Cards. It's up to the host to ensure that markdown is safely
11091109
// processed.
11101110
private static readonly _ttMarkdownPolicy = window.trustedTypes?.createPolicy(
1111-
"markdownPassthroughPolicy",
1111+
"adaptivecards#markdownPassthroughPolicy",
11121112
{ createHTML: (value) => value }
11131113
);
11141114

@@ -1117,7 +1117,7 @@ export class TextBlock extends BaseTextBlock {
11171117
// _originalInnerHtml so that we can restore/recalculate truncation later if space availability has changed (see
11181118
// TextBlock.restoreOriginalContent())
11191119
private static readonly _ttRoundtripPolicy = window.trustedTypes?.createPolicy(
1120-
"restoreContentsPolicy",
1120+
"adaptivecards#restoreContentsPolicy",
11211121
{ createHTML: (value) => value }
11221122
);
11231123

source/nodejs/adaptivecards/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export function truncateText(element: HTMLElement, maxHeight: number, lineHeight
190190
* TextBlock.truncateIfSupported}), but had a bug where it might actually pass through an element
191191
* for which innerHTML yielded actual HTML (since fixed).
192192
*/
193-
const ttDeprecatedPolicy = window.trustedTypes?.createPolicy("deprecatedExportedFunctionPolicy", {
193+
const ttDeprecatedPolicy = window.trustedTypes?.createPolicy("adaptivecards#deprecatedExportedFunctionPolicy", {
194194
createHTML: (value) => value
195195
});
196196

0 commit comments

Comments
 (0)