Skip to content
This repository was archived by the owner on Aug 14, 2018. It is now read-only.

Commit 179290f

Browse files
Merge pull request #162 from GoogleDeveloperExperts/upd-create-dialog
Fullscreen default on mobile; fix shifting header issue; fix close inaction
2 parents 8bd0799 + f34d1a9 commit 179290f

File tree

1 file changed

+48
-46
lines changed

1 file changed

+48
-46
lines changed

src/experts-activities/experts-activity-create.html

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
font-family : Roboto;
6666
@apply(--layout-vertical);
6767
}
68+
6869
:host:hover {
6970
box-shadow : 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
7071
}
@@ -86,7 +87,7 @@
8687
color : #aaa;
8788
}
8889
#continue {
89-
margin : 0 auto;
90+
margin : 20px auto 0;
9091
}
9192
h2 {
9293
display : flex;
@@ -203,6 +204,15 @@
203204
overflow-x: hidden;
204205
};
205206
}
207+
208+
header {
209+
padding: 24px 20px;
210+
}
211+
header h2 {
212+
margin: 0;
213+
width: 90%;
214+
}
215+
206216
footer {
207217
display : flex;
208218
flex-direction : column;
@@ -216,6 +226,7 @@
216226
border-radius : 2px;
217227
padding : 14px 30px;
218228
font-size : 14px;
229+
219230
}
220231
footer .progress {
221232
display : flex;
@@ -269,35 +280,41 @@
269280
background-color: #4285f4;
270281
color: #fff;
271282
}
283+
284+
/* On mobile, don't crunch the window */
285+
@media (max-width: 767px) {
286+
:host {
287+
width : 100vw;
288+
height : 100vh;
289+
}
290+
.iron-selected section {
291+
margin: 0 1em;
292+
}
293+
}
272294

273295
</style>
274296
<!--
275297
====================================
276298
HTML
277299
====================================
278300
-->
279-
280-
<paper-button
281-
id = "closeCreateActivity"
282-
on-tap = "cancel">
283-
<iron-icon
284-
icon = "close">
285-
</iron-icon>
286-
</paper-button>
301+
<header>
302+
<h2>
303+
<iron-icon id="headerIcon" class="step0-icon" icon="add-circle"
304+
on-tap="back"></iron-icon>
305+
Add an activity
306+
</h2>
307+
<paper-button id="closeCreateActivity" on-tap="cancel">
308+
<iron-icon icon ="close"></iron-icon>
309+
</paper-button>
310+
</header>
287311

288312
<paper-dialog-scrollable class='content'>
289313
<iron-pages
290314
id = "ironpages"
291315
selected = "{{_currentStep}}">
292316
<!-- Tab 0 -->
293317
<div>
294-
<h2>
295-
<iron-icon
296-
class="step0-icon"
297-
icon = "add-circle">
298-
</iron-icon>
299-
Add an activity
300-
</h2>
301318
<section>
302319
<div class="item">
303320
Fill in the details below to add and track your activity.
@@ -326,12 +343,6 @@ <h2>
326343
</div>
327344
<!-- Tab 1 -->
328345
<div>
329-
<h2>
330-
<paper-button on-tap="back">
331-
<iron-icon icon="arrow-back"></iron-icon>
332-
</paper-button>
333-
Product Groups
334-
</h2>
335346
<section>
336347
<div class="item">
337348
Choose product group(s) that relate to your completed activity.
@@ -363,13 +374,6 @@ <h2>
363374
</div>
364375
<!-- Tab 2 -->
365376
<div>
366-
<h2>
367-
<paper-button on-tap="back">
368-
<iron-icon icon="arrow-back"></iron-icon>
369-
</paper-button>
370-
Activity Type
371-
</h2>
372-
373377
<section>
374378
<div class="item">
375379
Begin by choosing one relevant activity group.
@@ -392,7 +396,7 @@ <h2>
392396
</div>
393397
</div>
394398
<div class="item">
395-
<div>Now choose the relevant activity type (only one allowed).</div>
399+
Now choose the relevant activity type (only one allowed).
396400
<div
397401
id="activitytypenodes"
398402
class="types item_value"
@@ -416,14 +420,12 @@ <h2>
416420
</div>
417421
<!-- Tab 3 -->
418422
<div>
419-
<h2>
420-
<paper-button on-tap="back">
421-
<iron-icon icon="arrow-back"></iron-icon>
422-
</paper-button>
423-
Activity Information
424-
</h2>
425-
<section
426-
id="details">
423+
424+
<section id="details">
425+
<div class="item">
426+
Date and Location Information.
427+
</div>
428+
427429
<paper-input
428430
id = "date"
429431
type = "date"
@@ -447,13 +449,6 @@ <h2>
447449
</div>
448450
<!-- Tab 4 -->
449451
<div class="activityLinkPanel">
450-
<h2>
451-
<paper-button on-tap="back">
452-
<iron-icon icon="arrow-back"></iron-icon>
453-
</paper-button>
454-
Activity Link and Impact
455-
</h2>
456-
457452
<section>
458453
<div class="item">
459454
<p>Activity links help define the impact of your activity in three areas: direct, indirect, and trained users. Each link source can have a different metric(s) for you to report and you can have many supporting links.</p>
@@ -758,6 +753,8 @@ <h2>
758753
this.$.country.invalid = false;
759754
this.$.date.invalid = false;
760755

756+
this.$.headerIcon.icon = "add-circle";
757+
761758
// reset focus start to 0
762759
this._focusStart();
763760
});
@@ -774,11 +771,16 @@ <h2>
774771
if (this._currentStep > 0) {
775772
this._currentStep -= 1;
776773
}
774+
775+
if (this._currentStep === 0) {
776+
this.$.headerIcon.icon = "add-circle";
777+
}
777778
},
778-
next : function() {
779+
next: function() {
779780
console.debug("[experts-activity-create] next - current tab: ", this._currentStep, this.activity );
780781
if (this._currentStep < this._numberOfSteps -1 && !this._isStepDisabled()) {
781782
this._currentStep += 1;
783+
this.$.headerIcon.icon = "arrow-back";
782784
this._focusStart();
783785
}
784786
},

0 commit comments

Comments
 (0)