Skip to content

Commit b139d3b

Browse files
author
Amit Shuster
committed
Merged PR 63756: Playground Banner - for research panel
Playground Banner added to help find research panelists Ref link: https://www.usertesting.com/panels/7wZ4nzGa/join?RID=Playground Text was written with Linda. ![a.png](https://powerbi.visualstudio.com/4c7b5adb-c2d0-4f18-b23c-edc4ac30f4e1/_apis/git/repositories/1dd63332-e003-46a3-ac6f-70213a1bcc2e/pullRequests/63756/attachments/a.png)
1 parent 6e911c9 commit b139d3b

File tree

3 files changed

+74
-1
lines changed

3 files changed

+74
-1
lines changed

demo/v2-demo/sample.html

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<div id="playground-banner" onclick="openBannerLink();">
2+
<p id="playground-banner-text">Influence the future of Power BI Embedded by joining our research panel.&nbsp;</p><p id="playground-banner-text-underlined">Sign up now!</p>
3+
<img id="playground-banner-close" src="images\close.png" onclick="closeBanner();"/>
4+
</div>
15
<div id="steps-nav-bar">
26
<div id="steps-ul-dev">
37
<ul id="steps-ul" class="steps-ul">
@@ -28,4 +32,19 @@ <h3>Welcome to the Power BI Embedded Playground</h3>
2832
</div>
2933

3034
<div id="mainContent">
31-
</div>
35+
</div>
36+
37+
<script>
38+
var showBanner = true;
39+
function closeBanner() {
40+
showBanner = false;
41+
$("#playground-banner").hide();
42+
}
43+
44+
function openBannerLink() {
45+
if (!showBanner)
46+
return;
47+
48+
window.open("https://www.usertesting.com/panels/7wZ4nzGa/join?RID=Playground", '_blank');
49+
}
50+
</script>

demo/v2-demo/scripts/report.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ function OpenSamplesStep() {
3030
$("#embed-and-interact-steps-wrapper").hide();
3131

3232
$("#welcome-text").show();
33+
34+
if (window.innerWidth > 540)
35+
$("#playground-banner").show();
3336

3437
trackEvent(TelemetryEventName.InnerSectionOpen, { section: TelemetryInnerSection.Sample, src: TelemetryEventSource.UserClick });
3538
}
@@ -55,6 +58,7 @@ function OpenCodeStep(mode, entityType, tokenType) {
5558
$("#embed-and-interact-steps-wrapper").show();
5659

5760
$("#welcome-text").hide();
61+
$("#playground-banner").hide();
5862

5963
$("#highlighter").empty();
6064

demo/v2-demo/style/style.css

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,4 +1862,54 @@ input:checked + .slider.round {
18621862
right: calc(50% - 60px);
18631863
position: absolute;
18641864
font-size: 14px;
1865+
}
1866+
1867+
/* Playground Banner */
1868+
1869+
#playground-banner {
1870+
height: 48px;
1871+
text-align: center;
1872+
background-color: #F2C811;
1873+
padding: 12px;
1874+
border-bottom: solid 1px #F1F1F1;
1875+
cursor: pointer;
1876+
}
1877+
1878+
#playground-banner:hover {
1879+
background-color: #ddb612;
1880+
}
1881+
1882+
#playground-banner-text, #playground-banner-text-underlined {
1883+
font-size: 16px;
1884+
font-weight: 600;
1885+
display: inline-block;
1886+
}
1887+
1888+
#playground-banner-text-underlined {
1889+
text-decoration: underline;
1890+
}
1891+
1892+
#playground-banner-close {
1893+
float: right;
1894+
margin-top: 4px;
1895+
margin-right: 8px;
1896+
}
1897+
1898+
@media only screen and (max-width: 675px) {
1899+
#playground-banner-text-underlined {
1900+
display: none;
1901+
}
1902+
}
1903+
1904+
1905+
@media only screen and (max-width: 605px) {
1906+
#playground-banner-text {
1907+
font-size: 14px;
1908+
}
1909+
}
1910+
1911+
@media only screen and (max-width: 540px) {
1912+
#playground-banner {
1913+
display: none;
1914+
}
18651915
}

0 commit comments

Comments
 (0)