**Items completed in this PR**
1. Then-catch has been migrated to async-await for code_samples file from v2-demo folder for Playground v1
_All the functions of this file are tested after the async-await change_
Related work items: #469707, #470909, #471453, #473946
In several places in our samples, the error handling code uses different names for the same variable (`error` vs. `errors`):
```
.catch(function (error) {
Log.log(errors);
});
```
This causes an exception if there's an error
This PR contains:
- Version bump for the latest models versoin (1.4.0)
- Version bump for the javascript sdk
- Fix broken playground (mirror gh-pages changes)
- Remove survey banner as the survey ended.
This will break the workspace collection bug bash tool.
I will move the access tokens to a one not so the static analysis will still pass
Moved to One Note "Test users and tenants"
Removed **code-demo** folder and all its files
**code-demo** is not referenced anywhere in the repo
Warning message: Cred Scanner failed with 2 issues found.
**Issue**
Q&A elements are rendered in a wrong way.
**Reason**
Some div elements are marked with self-closing.
According to the HTML5 spec, tags that cannot have any contents (known as void elements) can be self-closing*. This includes the following tags:
**Resolution**
_Only void elements can be self closing. from HTML5 spec, void elements are:_
area, base, br, col, embed, hr, img, input, link, meta, param, source, track, wbr
**Copied from HTML5 SPEC:**
Tags are used to delimit the start and end of elements in the markup. Raw text, escapable raw text, and normal elements have a start tag to indicate where they begin, and an end tag to indicate where they end. The start and end tags of certain normal elements can be omitted, as described below in the section on optional tags. Those that cannot be omitted must not be omitted. Void elements only have a start tag; end tags must not be specified for void elements. Foreign elements must either have a start tag and an end tag, or a start tag that is marked as self-closing, in which case they must not have an end tag.
**References:**
https://html.spec.whatwg.org/multipage/syntax.html#void-elementshttps://stackoverflow.com/questions/3558119/are-non-void-self-closing-tags-valid-in-html5
Related work items: #365457
Added events to the playground when clicking on buttons.
Each event include "sessionId", the events:
When users getting to the landing page, entries for each sample, entries for each showcase (direct link/showcase page/interact), entries to the documentation, "Phone"/"Desktop" button clicks, "Copy" buttons (Code & Log).
For each click on the "Run" button, monitor the Embed type + token type/API used.
Option to disable to Track Events (enable by default) by adding "isTelemetryEnabled=false" to the URL (and enable it again by "true").
Bug fix#1 - bootstrapIframe more than once when switching between Desktop view and Phone view.
Bug fix#2 - open SampleStep twice.
Bug fix#3 - when clicking on "Data" in the Interact tab the "Authoring" bar opened.
Bug fix#4 - when clicking on "Run" in Mobile mode the Iframe was removed because the URL was changed.
Use powerbi.bootstrap in playground.
- one bug which will be treated with low priority for now:
When clicking on phone-layout without clicking on run, report is embedded.
- one important change is:
Demo folder is now installing the powerbi-client package from parent folder.