-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathds_apps_guides.html
More file actions
745 lines (304 loc) · 20.7 KB
/
ds_apps_guides.html
File metadata and controls
745 lines (304 loc) · 20.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Follow these guidelines to create an element that behaves like a native Weebly element.">
<meta name="keywords" content="elements, guidelines, icon, placeholder, element, elements">
<title>Element Design Guidelines | Weebly Cloud for Designers Documentation</title>
<link rel="shortcut icon" href="images/favicon.ico">
<!-- Third-Party CSS -->
<link rel="stylesheet" href="css/syntax.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<!-- Custom CSS -->
<link rel="stylesheet" media="screen" href="css/orbit-external.css">
<link rel="stylesheet" media="screen" href="css/orbit.css">
<link rel="stylesheet" media="screen" href="css/theme-weebly.css">
<!-- Third-Party JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script>
<script src="js/jquery.navgoco.min.js"></script>
<script src="js/jekyll-search.js" type="text/javascript"></script>
<script src="js/toc.js"></script>
<!-- Custom JS -->
<script src="js/customscripts.js"></script>
</head>
<body>
<!-- Navigation -->
<div class="top-nav">
<div class="top-nav-item">
<a href="home.html">
<img src="images/weebly_cloud_designers_logo.png" alt="Weebly Cloud" class="cloud-logo" role="button" tabindex="0" alt="menu"/>
</a>
</div>
<div class="top-nav-item">
<img class="mobile-nav-btn" src="images/icons/mobile-menu.svg" alt="Mobile menu">
</div>
<nav class="top-nav-item">
<div class="nav-group">
<ul class="NavList nav-group-list horizontal">
<!-- entries without drop-downs appear here -->
<li class="NavLinkLi">
<a href="home.html" class="NavLink nav-group-list-link">Get Started</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_gs.html" class="NavLink nav-group-list-link">Apps</a>
</li>
<li class="NavLinkLi">
<a href="ds_themes_start.html" class="NavLink nav-group-list-link">Themes</a>
</li>
<li class="NavLinkLi">
<a href="ds_api_about.html" class="NavLink nav-group-list-link">APIs</a>
</li>
<li class="NavLinkLi">
<a href="ds_tags_about.html" class="NavLink nav-group-list-link">Tags</a>
</li>
<li class="NavLinkLi">
<a href="ds_mg_about.html" class="NavLink nav-group-list-link">Migrated Designer?</a>
</li>
<!-- entries with drop-downs appear here -->
<!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
<!--
<li class="NavLinkLi">
<a class="email NavLink nav-group-list-link" title="Submit feedback" href="#" onclick="javascript:window.location='mailto:rwhitmore@weebly.com?subject=Weebly Cloud for Designers Docs feedback&body=I have some feedback about the Element Design Guidelines page: ' + window.location.href;">Feedback</a>
</li>
-->
<li class="NavLinkLi">
<a href="https://weeblycloud.com/admin" target="_blank" class="NavLink nav-group-list-link"><strong>Cloud Admin</strong></a>
</li>
<li>
<!--start search-->
<div id="search-demo-container">
<input type="text" id="search-input" placeholder="Search...">
<ul id="results-container"></ul>
</div>
<!--end search-->
</li>
</ul>
</div>
</nav>
</div>
<div class="page has-sidebar">
<div class="col-sidebar">
<ul id="mysidebar" class="nav NavList">
<li class="NavLinkLi">
<a href="#" class="NavLink isSecondary">Get Started with Apps</a>
<ul class="NavList Children">
<li class="NavLinkLi">
<a href="ds_apps_gs.html" class="NavLink isSecondary">Get Started with Developing Apps</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_samples.html" class="NavLink isSecondary">Sample Applications</a>
</li>
</ul>
</li>
<li class="NavLinkLi">
<a href="#" class="NavLink isSecondary">Tutorial: Create an Element</a>
<ul class="NavList Children">
<li class="NavLinkLi">
<a href="ds_element_main.html" class="NavLink isSecondary">Create an Element</a>
</li>
<li class="NavLinkLi">
<a href="ds_element_1.html" class="NavLink isSecondary">1. Design the Element</a>
</li>
<li class="NavLinkLi">
<a href="ds_element_2.html" class="NavLink isSecondary">2. Register the Element</a>
</li>
<li class="NavLinkLi">
<a href="ds_element_3.html" class="NavLink isSecondary">3. Create a Directory Structure</a>
</li>
<li class="NavLinkLi">
<a href="ds_element_4.html" class="NavLink isSecondary">4. Create the Manifest</a>
</li>
<li class="NavLinkLi">
<a href="ds_element_5.html" class="NavLink isSecondary">5. Create the Settings</a>
</li>
<li class="NavLinkLi">
<a href="ds_element_6.html" class="NavLink isSecondary">6. Create the HTML Template</a>
</li>
<li class="NavLinkLi">
<a href="ds_element_7.html" class="NavLink isSecondary">7. Create the Styles</a>
</li>
<li class="NavLinkLi">
<a href="ds_element_8.html" class="NavLink isSecondary">8. Create the JavaScript</a>
</li>
<li class="NavLinkLi">
<a href="ds_element_9.html" class="NavLink isSecondary">9. Package, Upload, and Test Your Element</a>
</li>
<li class="NavLinkLi">
<a href="ds_element_finish.html" class="NavLink isSecondary">Finish</a>
</li>
</ul>
</li>
<li class="NavLinkLi">
<a href="#" class="NavLink isSecondary">Develop an App</a>
<ul class="NavList Children">
<li class="NavLinkLi">
<a href="ds_apps_dev.html" class="NavLink isSecondary">Develop an App</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_reg.html" class="NavLink isSecondary">Register Your App</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_manage.html" class="NavLink isSecondary">Manage Your App</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_files.html" class="NavLink isSecondary">Create the App File Structure</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_manifest.html" class="NavLink isSecondary">Create the App Manifest</a>
</li>
</ul>
</li>
<li class="NavLinkLi">
<a href="#" class="NavLink isSecondary">Create a Backend Service</a>
<ul class="NavList Children">
<li class="NavLinkLi">
<a href="ds_apps_backend.html" class="NavLink isSecondary">Create a Backend Service</a>
</li>
</ul>
</li>
<li class="NavLinkLi">
<a href="#" class="NavLink isSecondary">Create an Element</a>
<ul class="NavList Children">
<li class="NavLinkLi">
<a href="ds_apps_elements.html" class="NavLink isSecondary">What are Elements?</a>
</li>
<li class="active isActive NavLinkLi">
<a href="ds_apps_guides.html" class="NavLink isSecondary">Element Design Guidelines</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_icon.html" class="NavLink isSecondary">Element Icon Guidelines</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_create.html" class="NavLink isSecondary">Create an Element</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_folders.html" class="NavLink isSecondary">Add Element Folders</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_manifest.html" class="NavLink isSecondary">Add an Element to the Manifest</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_settings.html" class="NavLink isSecondary">Create Element Settings</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_man_ex.html" class="NavLink isSecondary">Element Manifest Example</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_temp.html" class="NavLink isSecondary">Create an Element Template</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_temp_ex.html" class="NavLink isSecondary">Element Template Example</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_style.html" class="NavLink isSecondary">Add Stylesheets to an Element</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_js.html" class="NavLink isSecondary">Add JavaScript to an Element</a>
</li>
</ul>
</li>
<li class="NavLinkLi">
<a href="#" class="NavLink isSecondary">Get Your App Ready to Publish</a>
<ul class="NavList Children">
<li class="NavLinkLi">
<a href="ds_apps_element_upload.html" class="NavLink isSecondary">Upload your App</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_test.html" class="NavLink isSecondary">Test Your App</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_release.html" class="NavLink isSecondary">Release Your App</a>
</li>
<li class="NavLinkLi">
<a href="ds_apps_element_update.html" class="NavLink isSecondary">Update Your App</a>
</li>
</ul>
</li>
</ul>
<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
<script>
$("li.active").parents('li').toggleClass("active");
</script>
</div>
<div class="col-content">
<div>
<div class="post-header">
<h1 class="post-title-main display-1">Element Design Guidelines</h1>
</div>
<div class="page-type"> concepts </div>
</div>
<div class="post-content">
<div class="summary">Follow these guidelines to create an element that behaves like a native Weebly element.</div>
<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. -->
<script>
$( document ).ready(function() {
$('#toc').toc({
minimumHeaders: 2, // Don't show ToC if there is only one header
listType: 'ul',
showSpeed: 0,
headers: 'h2'
});
/* this offset helps account for the space taken up by the floating toolbar. */
$('#toc').on('click', 'a', function() {
var target = $(this.getAttribute('href'))
, scroll_target = target.offset().top
$(window).scrollTop(scroll_target - 50);
return false
})
});
</script>
<div id="toc" class="toc"></div>
<h2 id="element-flow">Element Flow</h2>
<p>How an element behaves when dropped onto a page is an important user interaction, so try to emulate the Weebly elements, as closely as possible. Weebly elements generally fall into one or a combination of one of the following user flows:</p>
<ul>
<li><strong>Simple</strong>: There are no settings. Weebly examples include Title and Text.</li>
<li><strong>Settings</strong>: The element has configurable settings. The Weebly Map and Button are examples of elements that use settings.</li>
<li><strong>Connect</strong>: The element connects to external data. The user is presented with a popup dialog (optionally auto-pop) in order to find or create the data needed for the element. The Weebly Product element is an external element. It connects to a product in the store’s catalog.</li>
</ul>
<h2 id="design-the-element-settings">Design the Element Settings</h2>
<p>When determining settings for your element, try to use the same setting metaphors that you see in Weebly elements. Use the Weebly settings UI (the default) and try to not call out to an external site that displays in an iFrame. External settings can be confusing to our users as they are used to the way Weebly elements and their settings behave.</p>
<p>Here are some questions to think about before you start coding. You’ll need the answers in order to create your element:</p>
<ul>
<li>Should the element dialog display automatically when the element is dropped onto the page? Or will the user need to click the element to open the dialog?</li>
<li>Will the element’s settings display in the native Weebly dialog using Weebly components (preferred) or will the user be presented with an external site displayed in an iframe?</li>
<li>What type of display (such as text, integer, color picker) is needed for each setting? The Weebly dialog supports <a href="ds_apps_element_settings.html#setting-types">these types</a>.</li>
<li>What settings can be grouped together and displayed on one dialog page? What settings will need their own section?</li>
<li>Do the settings require tooltips to help the user configure them correctly?</li>
<li>Is configuring and using the element complicated and so might need a tutorial? Should the tutorial be include a set of steps or a video?</li>
<li>What needs to be handled if a user copies the element to another page?
Users can copy elements and place the copy on other pages in their site. All setting values are also copied over.</li>
<li>Will your element need to behave differently in the editor than on the published site? If so, you may want to create two sets of JavaScript, HTML, and/or CSS files.</li>
</ul>
<h2 id="element-icon">Element Icon</h2>
<p>You need to create an <code class="highlighter-rouge">svg</code> file to represent your element in the element tray. It must be named <code class="highlighter-rouge">icon.svg</code>, and must live in the root folder of your element. Follow our element icon <a href="ds_apps_icon.html">guidelines</a> when creating your icon.</p>
<h2 id="element-placeholder">Element Placeholder</h2>
<p>Your element when displayed in the editor (the element placeholder) should give a preview of the content that will be displayed on the published site. This placeholder can allow minimal interactivity. For example, when dropped onto a page, your element might allow users to directly edit content or forms in the content, but there shouldn’t be any navigation or any wizard-like behavior. Plan your settings to handle this type of interactivity. You can create alternate HTML templates, Javascript, and CSS for the element placeholder when you need it to behave differently in the editor than on the published page.</p>
<div class="Notice type_info" role="alert">
<b>Note:</b> The width of the placeholder can always be adjusted by the user. Weebly handles this resizing for you - please don’t set a width on your element or it will not resize correctly on the page. For example, if the element has a set width and is dropped on a page and then a column is put next to it, it will stay at the predefined width and not display properly.
</div>
<div class="tags">
Tags:<br/>
<a href="tag_elements.html" class="btn btn-default navbar-btn cursorNorm tags-link" role="button">elements</a>
</div>
</div>
<hr class="shaded"/>
<footer class="footer">
<div class="row">
<div class="col-lg-12">
<div class="footer__fineprint">
©2018 Weebly. All rights reserved. <br />
Site last generated: Jan 31, 2018
</div>
<div class="footer__logo">
<img src="images/weebly_logo.svg" alt="Weebly logo"/>
</div>
</div>
</div>
</footer>
</div>
</div>
</body>
</html>