Skip to content

Commit

Permalink
[Designer] Bug fixes and minor enhancements (#3510)
Browse files Browse the repository at this point in the history
* Designer bug fixes and minor enhancements

* Address review feedback
  • Loading branch information
dclaux authored Oct 4, 2019
1 parent 1617263 commit 441c1d6
Show file tree
Hide file tree
Showing 14 changed files with 163 additions and 196 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[**.json]
[**.{json,html}]
indent_style = tab
charset = utf-8
insert_final_newline = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ a.ac-anchor:visited:active {
user-select: none;
height: 31px;
background-color: white;
color: #0078D7;
color: #0079db;
border: 1px solid #B2E0FF;
}

Expand Down
8 changes: 7 additions & 1 deletion source/nodejs/adaptivecards-designer-app/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ import "./app.css";

window.onload = function() {
// Uncomment to enabled preview features such as data binding
// ACDesigner.GlobalSettings.previewFeaturesEnabled = true;
/*
ACDesigner.GlobalSettings.showVersionPicker = true;
ACDesigner.GlobalSettings.enableDataBindingSupport = true;
// Note the below two flags are ignored if enableDataBindingSupport is set to false
ACDesigner.GlobalSettings.showDataStructureToolbox = true;
ACDesigner.GlobalSettings.showSampleDataEditorToolbox = true;
*/

// Uncomment to configure default toolbox titles
/*
Expand Down
17 changes: 10 additions & 7 deletions source/nodejs/adaptivecards-designer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
</style>

<script type="text/javascript">
window.onload = function() {
ACDesigner.GlobalSettings.previewFeaturesEnabled = false;
window.onload = function () {
ACDesigner.GlobalSettings.enableDataBindingSupport = false;
ACDesigner.GlobalSettings.showDataStructureTooklbox = false;
ACDesigner.GlobalSettings.showSampleDataEditorToolbox = false;
ACDesigner.GlobalSettings.showVersionPicker = false;

if (!ACDesigner.SettingsManager.isLocalStorageAvailable) {
if (!ACDesigner.SettingsManager.isLocalStorageAvailable) {
console.log("Local storage is not available.");
}

Expand Down Expand Up @@ -58,9 +61,9 @@
// NOTE: Adding toolbar elements must be done BEFORE the designer is attached
/* Here's how to collapse certain panes by default:
designer.treeViewPane.collapse();
designer.jsonEditorPane.collapse();
*/
Expand All @@ -82,7 +85,7 @@
*/

// NOTE: Collapsing panes/setting the card payload must be done AFTER the designer is attached
// Initialize monaco-editor for the JSON-editor pane.
// Initialize monaco-editor for the JSON-editor pane.

require.config({
paths: {
Expand All @@ -105,4 +108,4 @@
</div>
</body>

</html>
</html>
11 changes: 7 additions & 4 deletions source/nodejs/adaptivecards-designer/previewFeatures.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
</style>

<script type="text/javascript">
window.onload = function() {
ACDesigner.GlobalSettings.previewFeaturesEnabled = true;
window.onload = function () {
ACDesigner.GlobalSettings.enableDataBindingSupport = true;
ACDesigner.GlobalSettings.showDataStructureTooklbox = true;
ACDesigner.GlobalSettings.showSampleDataEditorToolbox = true;
ACDesigner.GlobalSettings.showVersionPicker = true;

if (!ACDesigner.SettingsManager.isLocalStorageAvailable) {
if (!ACDesigner.SettingsManager.isLocalStorageAvailable) {
console.log("Local storage is not available.");
}

Expand Down Expand Up @@ -58,4 +61,4 @@
</div>
</body>

</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
}

.acd-tree-item-additionalText {
color: gray;
color: #757575;
margin-left: 8px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export class CardDesignerSurface {
let cardToRender: Adaptive.AdaptiveCard;

if (this.isPreviewMode) {
if (Shared.GlobalSettings.previewFeaturesEnabled) {
if (Shared.GlobalSettings.enableDataBindingSupport) {
let cardPayload = this.card.toJSON();

try {
Expand Down
Loading

0 comments on commit 441c1d6

Please sign in to comment.