Merge pull request #122 from mozilla/onboarding-v2-20

for #20: start 3rd onboarding panel; update images
This commit is contained in:
luke crouch 2017-02-01 14:41:36 -06:00 committed by GitHub
commit 9b54f56540
14 changed files with 59 additions and 19 deletions

View file

@ -35,20 +35,27 @@ table {
margin-block-start: 16px;
margin-inline-end: 16px;
margin-inline-start: 16px;
min-block-size: 480px;
}
.onboarding h3 {
margin-block-start: 16px;
}
.onboarding * {
text-align: center;
}
/* Make button placement to be consistent on tour */
.onboarding .spacing {
margin-block-start: auto;
.onboarding-img {
inline-size: 180px;
block-size: 132px;
}
.onboarding-title {
margin-block-start: 20px;
margin-block-end: 10px;
font-size: 14px;
color: #43484E;
}
.onboarding-subtext {
font-size: 10px;
color: #4a4a4a;
}
.popup-bumper {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 B

After

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -11,6 +11,7 @@ const DEFAULT_ICON = "circle";
// List of panels
const P_ONBOARDING_1 = "onboarding1";
const P_ONBOARDING_2 = "onboarding2";
const P_ONBOARDING_3 = "onboarding3";
const P_CONTAINERS_LIST = "containersList";
const P_CONTAINERS_EDIT = "containersEdit";
const P_CONTAINER_INFO = "containerInfo";
@ -31,8 +32,10 @@ const Logic = {
// Routing to the correct panel.
.then(() => {
if (localStorage.getItem("onboarded2")) {
if (localStorage.getItem("onboarded3")) {
this.showPanel(P_CONTAINERS_LIST);
} else if (localStorage.getItem("onboarded2")) {
this.showPanel(P_ONBOARDING_3);
} else if (localStorage.getItem("onboarded1")) {
this.showPanel(P_ONBOARDING_2);
} else {
@ -133,7 +136,7 @@ Logic.registerPanel(P_ONBOARDING_1, {
// This method is called when the object is registered.
initialize() {
// Let's move to the next panel.
document.querySelector("#onboarding-next-button").addEventListener("click", () => {
document.querySelector("#onboarding-start-button").addEventListener("click", () => {
localStorage.setItem("onboarded1", true);
Logic.showPanel(P_ONBOARDING_2);
});
@ -154,8 +157,29 @@ Logic.registerPanel(P_ONBOARDING_2, {
// This method is called when the object is registered.
initialize() {
// Let's move to the containers list panel.
document.querySelector("#onboarding-done-button").addEventListener("click", () => {
document.querySelector("#onboarding-next-button").addEventListener("click", () => {
localStorage.setItem("onboarded2", true);
Logic.showPanel(P_ONBOARDING_3);
});
},
// This method is called when the panel is shown.
prepare() {
return Promise.resolve(null);
},
});
// P_ONBOARDING_3: Third page for Onboarding.
// ----------------------------------------------------------------------------
Logic.registerPanel(P_ONBOARDING_3, {
panelSelector: ".onboarding-panel-3",
// This method is called when the object is registered.
initialize() {
// Let's move to the containers list panel.
document.querySelector("#onboarding-done-button").addEventListener("click", () => {
localStorage.setItem("onboarded3", true);
Logic.showPanel(P_CONTAINERS_LIST);
});
},

View file

@ -8,21 +8,30 @@
<body>
<div class="panel onboarding onboarding-panel-1 hide" id="onboarding-panel-1">
<img alt="Container Tabs Overview" src="/img/onboarding-1.png" />
<h3>A better way to manage all the things you do online</h3>
<p>Use containers to organize tasks, manage accounts, and keep your focus where you want it.</p>
<p class="spacing" ><a href="#">Learn more</a></p>
<a href="#" id="onboarding-next-button" class="button expanded">Next</a>
<img class="onboarding-img" alt="Container Tabs Overview" src="/img/onboarding-1.png" />
<h3 class="onboarding-title">A better way to manage all the things you do online</h3>
<p>
Use containers to organize tasks, manage accounts, and keep your focus where you want it.
<br/>
<a href="#">Learn more</a>
</p>
<a href="#" id="onboarding-start-button" class="button expanded onboarding-button">Get Started</a>
</div>
<div class="panel onboarding onboarding-panel-2 hide" id="onboarding-panel-2">
<img alt="How Containers Work" src="/img/onboarding-2.png" />
<h3>Put containers to work for you.</h3>
<img class="onboarding-img" alt="How Containers Work" src="/img/onboarding-2.png" />
<h3 class="onboarding-title">Put containers to work for you.</h3>
<p>Features like color-coding and separate container tabs help you find things easily, focus your attention, and minimize distractions.</p>
<a href="#" id="onboarding-done-button" class="button expanded spacing">Done</a>
<a href="#" id="onboarding-next-button" class="button expanded spacing">Next</a>
</div>
<div class="panel onboarding onboarding-panel-3 hide" id="onboarding-panel-3">
<img class="onboarding-img" alt="How Containers Work" src="/img/onboarding-3.png" />
<h3 class="onboarding-title">A place for everything, and everything in its place.</h3>
<p>Start with the containers we've created, or create your own.</p>
<a href="#" id="onboarding-done-button" class="button expanded spacing">Done</a>
</div>
<div class="panel container-panel" id="container-panel">
<div class="row panel-header">