Skip to content

Commit c4ad302

Browse files
authored
Merge pull request #459 from solid/post-talk
Post talk changes to slides
2 parents 7186b14 + 8aa91b6 commit c4ad302

File tree

7 files changed

+185
-72
lines changed

7 files changed

+185
-72
lines changed

Documentation/forms-intro.html

Lines changed: 89 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@
9393
}
9494
table.parameters {
9595
background-color: #dddddd;
96+
margin-left: 4em;
9697
} /* background-color: #ddddff; */
9798
table.properties {
9899
background-color: #ddddff;
100+
margin-left: 4em;
99101
} /* background-color: #ddddff; */
100102
td {
101103
padding: 0.5em;
@@ -240,20 +242,17 @@ <h2>Form field types</h2>
240242
<table class="properties">
241243
<tr>
242244
<td>label</td>
243-
244245
<td>String</td>
245-
246246
<td>
247247
A label for the form field. This is the prompt for the user, e.g.,
248-
"Name", "Employer".
248+
"Name", "Employer". If the label is not given in the form, the
249+
system will make one from a label of the property in the ontology.
249250
</td>
250251
</tr>
251252

252253
<tr>
253254
<td>property</td>
254-
255255
<td>rdf:Property</td>
256-
257256
<td>
258257
When the user enters the data, it is stored in the web as a triple
259258
with this property as its predicate.
@@ -262,16 +261,25 @@ <h2>Form field types</h2>
262261

263262
<tr>
264263
<td>default</td>
265-
266264
<td>[according to field type] Optional</td>
267-
268265
<td>
269266
The input control is set to this value by default. It is easiest for
270267
the user to enter this value. (This value is <b>not</b> automatically
271268
stored by the form system if the user does not select or enter it in
272269
some way.
273270
</td>
274271
</tr>
272+
273+
<tr>
274+
<td>suppressEmptyUneditable</td>
275+
<td>Boolean</td>
276+
<td>
277+
Setting this flag (on a single form field not a structure) means that when the user is just reading the data, not
278+
editing it, the fields with blank data will be removed completely.
279+
This avoid things like a blank field for a region in an address when there isn't one given.
280+
This can make the UX much cleaner. Defaults to false.
281+
</td>
282+
</tr>
275283
</table>
276284

277285
<p>
@@ -399,6 +407,24 @@ <h4 class="class">Group</h4>
399407
the same as for Form.
400408
</p>
401409

410+
<table class="properties">
411+
<tr>
412+
<td>weight</td>
413+
414+
<td>xsd:integer</td>
415+
<td>0:lighter than normal, 1: Normal, 2,3: heavier than normal</td>
416+
</tr>
417+
<tr>
418+
<td>parts</td>
419+
<td>rdf:Collection</td>
420+
<td>
421+
The form fields, forms, in the group
422+
</td>
423+
</tr>
424+
</table>
425+
426+
427+
402428
<h4 class="class">Choice</h4>
403429

404430
<p>The user choses an item from a class.</p>
@@ -425,18 +451,16 @@ <h4 class="class">Choice</h4>
425451

426452
<tr>
427453
<td>canMintNew</td>
428-
429454
<td>xsd:Boolean</td>
430-
431455
<td>
432456
If the user doesn't find the thing they want, can they introduce an
433457
item of that class by filling in a form about it? [Boolean]
434458
</td>
435459
</tr>
436460
</table>
437461

438-
If a new thing is minted, that will be done with a form which is a
439-
<tt>ui:creationForm</tt> for the class.
462+
<p>If a new thing is minted, that will be done with a form which is a
463+
<tt>ui:creationForm</tt> for the class.</p>
440464

441465
<h4 class="class">Multiple</h4>
442466

@@ -454,6 +478,37 @@ <h4 class="class">Multiple</h4>
454478
form. It is the field, or the address, and so on.
455479
</p>
456480

481+
482+
<table class="properties">
483+
<tr>
484+
<td>ordered</td>
485+
<td>Boolean</td>
486+
<td>If true, the user has an ordered array of things, and the data is in an RDF collection.
487+
If false, the UI is irrelevant and the data is a series of arcs.</td>
488+
</tr>
489+
<tr>
490+
<td>property</td>
491+
<td>rdf:Property</td>
492+
<td>The API details or query endpoint and query details to be used to search the item in
493+
the databasse.</td>
494+
</tr>
495+
<tr>
496+
<td>reverse</td>
497+
<td>Boolean</td>
498+
<td>If set, the form will write data triple like <tt>X P S</tt> instead of the normal <tt>S P X</tt>.
499+
</td>
500+
</tr>
501+
<tr>
502+
<td>part</td>
503+
<td>Form</td>
504+
<td>The form to be used for each one.
505+
</td>
506+
</tr>
507+
</table>
508+
509+
510+
511+
457512
<h4 class="class">Classifier</h4>
458513

459514
<table class="properties">
@@ -468,7 +523,7 @@ <h4 class="class">Classifier</h4>
468523
</td>
469524
</tr>
470525
</table>
471-
526+
<p>
472527
This form field leverages the ontology heavily. It pulls the subclasses of
473528
the given class, and makes a pop-up menu for the user to chose one. If and
474529
only if the ontology says that the class is a disjoint union
@@ -477,7 +532,7 @@ <h4 class="class">Classifier</h4>
477532
shows that that subclass has its own subclasses, then the user will be
478533
prompted to pick one of those, to (if they like) further refine the
479534
selection. And so on.
480-
535+
</p>
481536
<p>
482537
The classifier pops a menu to allow the user to select a set of values to
483538
classify the subject.
@@ -517,7 +572,7 @@ <h4 class="class">Options</h4>
517572
</tr>
518573
</table>
519574

520-
and for each case:
575+
<p>and for each case:</p>
521576

522577
<table class="properties">
523578
<tr>
@@ -565,24 +620,21 @@ <h4 class="class" id="Autocomplete">Autocomplete</h4>
565620

566621
<tr>
567622
<td>labelProperty</td>
568-
<td>String</td>
623+
<td>rdf:Property</td>
569624
<td>The property which will be used to store the name of the selected thing as a separate triple</td>
570625
</tr>
571-
572626
<tr>
573627
<td>dataSource</td>
574-
575628
<td>DataSource</td>
576-
577629
<td>The API details or query endpint and query details to be usde to search of the itemn in
578630
the databasse.</td>
579631
</tr>
580632
<tr>
581633
<td>targetClass</td>
582634
<td>rdfs:Class</td>
583-
<td>Is tyhis is specified, it be used to replace any occuurences of
635+
<td>Is tyhis is specified, it be used to replace any occurrences of
584636
"$(targetClass)" in the query template. this allows different instances
585-
of AutocompleteField to share the same DatSource, by specifying different values for <tt>targetClass</tt>.</td>
637+
of AutocompleteField to share the same DataSource, by specifying different values for <tt>targetClass</tt>.</td>
586638
</tr>
587639

588640
</table>
@@ -604,8 +656,17 @@ <h4 class="class">Heading</h4>
604656

605657
<td>The text content of the heading</td>
606658
</tr>
659+
<tr>
660+
<td>suppressIfUneditable</td>
661+
<td>Boolean</td>
662+
<td>If data is uneditable,ie read-only mode, hide this comment</td>
663+
</tr>
607664
</table>
608665

666+
<p>The <tt>suppressIfUneditable</tt> flag allow you to make a form which
667+
is much cleaner and simpler when the user is just reading information,
668+
not editing it.</p>
669+
609670
<h4 class="class">Comment</h4>
610671

611672
<p>
@@ -618,11 +679,16 @@ <h4 class="class">Comment</h4>
618679
<td>contents</td>
619680

620681
<td>String</td>
621-
622682
<td>
623683
The text content of the comment. (This should be displayed by form
624684
systems as <tt>pre-wrap</tt> mode.)
625685
</td>
686+
<tr>
687+
<td>suppressIfUneditable</td>
688+
<td>Boolean</td>
689+
<td>If data is uneditable,ie read-only mode, hide this comment</td>
690+
</tr>
691+
626692
</tr>
627693
</table>
628694

@@ -634,9 +700,11 @@ <h2>Conclusion</h2>
634700
daily life at home and at work. It can be vary efficient as developers can
635701
reuse material between forms. Users can even generate their own forms.
636702
</p>
703+
<p>
637704
Future directions include separate implementations of the form UI code in
638705
for various platforms, and using various UI frameworks. There may also be
639706
extensions of the system with new field types, more options for setting style
640707
from various sources, etc.
708+
</p>
641709
</body>
642710
</html>

Documentation/talks/FormsTalk.html

Lines changed: 76 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ <h1>Single Line Text field</h1>
165165
<h1>Examples of other form fields</h1>
166166

167167
<ol>
168-
<li><a target="demo" href="../form-examples/demo.html">Examples of individual Form Fields</a></li>
169-
<li><a target="demo" href="../form-examples/structures.html">Examples of structures in forms: Groups</a></li>
170-
<li><a target="demo" href="../form-examples/structures3.html">Selection, Options, Autocomplete</a></li>
171-
<li><a target="demo" href="../form-examples/profile-demo.html">Examples of a Solid profile editing form</a></li>
168+
<li><a target="demo1" href="../form-examples/demo.html">Examples of individual Form Fields</a></li>
169+
<li><a target="demo2" href="../form-examples/structures.html">Examples of structures in forms: Groups</a></li>
170+
<li><a target="demo3" href="../form-examples/structures3.html">Selection, Options, Autocomplete</a></li>
171+
<li><a target="demo4" href="../form-examples/profile-demo.html">Examples of a Solid profile editing form</a></li>
172172
<!--
173173
<li><a target="demo" href="../form-examples/edit-form.html">Editing a simple form using the Form Form</a></li>
174174
<li><a target="demo" href="../form-examples/edit-form-form.html">Editing the Form Form</a></li>
@@ -178,10 +178,65 @@ <h1>Examples of other form fields</h1>
178178
</div>
179179

180180

181+
<div class="slide">
182+
<h1>Common properties of form fields</h1>
183+
184+
<table class="properties">
185+
<tr>
186+
<td>label</td>
187+
<td>String</td>
188+
<td>
189+
A label for the form field, prompt for the user.
190+
</td>
191+
</tr>
192+
193+
<tr>
194+
<td>property</td>
195+
<td>rdf:Property</td>
196+
<td>
197+
Data it is stored in the web as a triple
198+
with this property as its predicate.
199+
</td>
200+
</tr>
201+
202+
<tr>
203+
<td>default</td>
204+
<td>[according to field type] Optional</td>
205+
<td>
206+
The input control is set to this value by default. It is easiest for
207+
the user to enter this value. (This value is <b>not</b> automatically
208+
stored by the form system if the user does not select or enter it in
209+
some way.
210+
</td>
211+
</tr>
212+
213+
<tr>
214+
<td>suppressEmptyUneditable</td>
215+
<td>Boolean</td>
216+
<td>
217+
When the user is just reading the data, not
218+
editing it, the fields with blank data will be hidden.
219+
</td>
220+
</tr>
221+
</table>
222+
223+
</div>
224+
225+
226+
<div class="slide">
227+
<h1>The Autocomplete field</h1>
228+
<p>This form field allows users to select things from lists in public databases, things like Languages, Organizations, Occupations, and Skills</p>
229+
<p>This is not covered in detail in this talk.</p>
230+
<p>(There is a blog <a href="https://solidos.solidcommunity.net/public/2021/01%20Building%20Solid%20Apps%20which%20use%20Public%20Data.html">
231+
</i>Building Solid Apps which use Public Data</i></a>,
232+
about this which I could run though for those interested)</p>
233+
<img src="../diagrams/PersonalPublicDataLinks.svg" />
234+
</div>
235+
181236
<div class="slide">
182237
<h1>Code: Render a form</h1>
183238
<p>To put a form in your UI</p>
184-
<pre>UI.widgets.appendForm(dom, container, {}, subject, form, doc, callback)
239+
<pre>const element = UI.widgets.appendForm(dom, null, {}, subject, form, doc, callback)
185240
</pre>
186241

187242
<table class="parameters">
@@ -192,9 +247,10 @@ <h1>Code: Render a form</h1>
192247
</tr>
193248

194249
<tr>
195-
<td>container</td>
250+
<td>null</td>
196251

197-
<td>is a DOM element to contain the form</td>
252+
<td>used to be the is a DOM element to contain the form. If given, the form will be
253+
appended to it. This use is deprecated.</td>
198254
</tr>
199255

200256
<tr>
@@ -222,7 +278,7 @@ <h1>Code: Render a form</h1>
222278
<td>callback</td>
223279
<td>
224280
is a function taking an error flag and a message (if the error flag is
225-
true)
281+
true). Called when the form field has been set to a new value.
226282
</td>
227283
</tr>
228284
</table>
@@ -241,15 +297,18 @@ <h1>Going meta -- designing forms using the form of forms 1</h1>
241297
<h1>Going meta -- Editing forms using the form of forms 2</h1>
242298
<p>Here we are editing the really small form we started with.</p>
243299
<ul>
244-
<li><a target="demo" href="../form-examples/edit-form.html">Editing a simple form using the Form Form</a></li>
300+
<li><a target="demo8" href="../form-examples/edit-form.html">Editing a simple form using the Form Form</a></li>
245301
</ul>
246302
<p>Here we edit the FormForm with itself.</p>
247303
<ul>
248-
<li><a target="demo" href="../form-examples/edit-form-form.html">Editing the Form Form</a></li>
304+
<li><a target="demo9" href="../form-examples/edit-form-form.html">Editing the Form Form</a></li>
249305
</ul>
250306

251307
</div>
252308

309+
310+
311+
253312
<div class="slide">
254313
<h1>Forms and Classes</h1>
255314
<pre>
@@ -349,17 +408,14 @@ <h1>Future</h1>
349408
</ul>
350409
</div>
351410

352-
353-
354411
<div class="slide">
355412
<h1>Questions?</h1>
413+
<ul>
414+
<p>Reference</p>
415+
<li><a target="doc" href="../form-ecosystem.html">Manual: The Form Ecosystem</a></li>
416+
<li><a target="doc" href="../forms-intro.html">Manual: Intro to forms</a></li>
417+
<li><a target="doc" href="https://www.w3.org/ns/ui.n3">The UI ontology (source)</a></li>
418+
</ul>
356419
</div>
357-
<div class="slide">
358-
<h1>The Autocomplete field</h1>
359-
<p>This form field allows users to select things from lists in public databases, things like Languages, Organizations, Occupations, and Skills</p>
360-
<p>This is not covered in this talk.</p>
361-
<p>(There is a blog <a href="https://solidos.solidcommunity.net/public/2021/01%20Building%20Solid%20Apps%20which%20use%20Public%20Data.html">
362-
</i>Building Solid Apps which use Public Data</i></a>,
363-
about this which I could run though for those interested)</p>
364-
<img src="../diagrams/PersonalPublicDataLinks.svg" />
420+
365421
</div>

0 commit comments

Comments
 (0)