Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure form widgets #577

Merged
merged 13 commits into from
Mar 22, 2018

Conversation

adammichaelwood
Copy link
Contributor

@adammichaelwood adammichaelwood commented Mar 15, 2018

closes #566
closes #569
closes #38
closes #411
closes #378
closes #570
closes #568
closes #490

What is included?

Near-complete rewrite of form-widgets.rst, including new sections for several additional widgets.

Any problems?

Few things (misspellings, etc.) that I think should have been caught by style checks, but weren't. Will file a few issues against this.

(Before I forget: labelled/labeled, XSLForm)

Work still to do?

Shrink images a bit more.

Copy link
Member

@lognaturel lognaturel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking nice!

At a high level, I'd like to see a little bit more narrative to help users figure out non-obvious characteristics of some of the widgets (e.g. the text widget expands vertically) and why certain widgets are useful (e.g. text with numbers appearance is useful for phone numbers).

I'm also finding the "See Also" notes a little disconnected from their section. I'd tend to put them above the screenshots. That said, scaling down the screenshots may also address this. How about scaling them as a percentage of the screen but no bigger than say 300 pixels wide or so? It would be great to get two on the same line where possible.


This document is a list of available ODK :term:`Collect` :term:`form` :term:`widgets <widget>` (question types), with:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would still find it helpful to have a brief introduction here that states forms are made up of questions which can have different types, widgets refer to the whole package -- how the type is shown in Collect, how the user enters data, any appearances, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. That is coming.


This section shows examples of all the form widgets types, with no additional options displayed.
All of the text widgets share the :tc:`text` type,
and the inputs from them are saved as literal strings.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the inputs from them" feels hard to process to me. "their inputs"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

:tc:`text`
appearance
*none*

A simple text input.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can contain line breaks and will grow vertically as the user adds more text. The keyboard shown depends on user's Android settings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1


.. image:: /img/form-widgets/geopoint-completed.*
:alt: A completed geopoint form widget. It looks the same as before, but now has four fields below the button: Latitude, Longitude, Altitude, and Accuracy.
A numerical input that treats the input as a string, rather than a number.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keyboard shown only contains numbers, decimal markers and -. This is useful to input numbers larger than 999,999,999 (e.g. phone numbers).

:ref:`integer <default-integer-widget>`,
:ref:`decimal <default-decimal-widget>`,
and :ref:`number string <number-string-widget>` widgets
will display their values using locale-specific thousands separators.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Highlight limitation that . can't be used as a thousands separator and a space is used instead -- https://forum.opendatakit.org/t/odk-collect-v1-12-beta/10965/6


Acknowledge
-------------
Default decimal widget
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this order came from the All Widgets form and it's ok but it would make a bit more sense for me to have the plan integer and decimal widgets first followed by their variations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes sense


URL Widget
~~~~~~~~~~~~
Range widgets allow the user to select numbers from within a range that is visually represented as a number line. The parameters of the range widget are defined by :tc:`start`, :tc:`end`, and :tc:`step` values defined in the :th:`parameters` column of your XLSForm. The parameter values can be integers or decimals.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as a number line or a spinner.

Edit: Hmm, looks like the picker appearance isn't in All Widgets. I just added it and would be good to document here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Will include --- I rely on all-widgets to know what's available...


Single Select Widgets
Single select widget
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering whether it might be helpful to have a short introduction to selects with the text you have in the "Including Images as Choices" section below all the select widgets. Then it gives a good sense of the possibilities.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes sense. I'll try to make that work.

@adammichaelwood
Copy link
Contributor Author

I'd like to see a little bit more narrative to help users figure out non-obvious characteristics of some of the widgets (e.g. the text widget expands vertically) and why certain widgets are useful (e.g. text with numbers appearance is useful for phone numbers).

Great. Will do.

I'm also finding the "See Also" notes a little disconnected from their section. I'd tend to put them above the screenshots.

Yeah, I wasn't sure of the best spot. I'll move them up.

How about scaling them as a percentage of the screen but no bigger than say 300 pixels wide or so? It would be great to get two on the same line where possible.

+1

@lognaturel
Copy link
Member

Sounds great, I look forward to the next iteration!

@adammichaelwood
Copy link
Contributor Author

adammichaelwood commented Mar 20, 2018

This is ready for review again. I still need to run a style check and spelling pass over it myself,
but the things mentioned above have been addressed, and there is some restructure and added wayfinding.

@adammichaelwood
Copy link
Contributor Author

note:

  • shrink images

@adammichaelwood adammichaelwood changed the title WIP: Restructure form widgets Restructure form widgets Mar 21, 2018
@adammichaelwood
Copy link
Contributor Author

This is (I think) ready to go...

@yanokwa
Copy link
Member

yanokwa commented Mar 21, 2018

This is really great, @adammichaelwood. I did find it hard to leave comments inline so my apologies! I've tried to arrange this top down and I'm glad to hop on a call tomorrow if it'd help.

In the intro, I'd add a hint that you can also use ODK Build to design forms graphically, but it doesn't give you the full range.

The ordering of the widgets are a bit strange to me. I'd order them as far as frequency of use..

  • Text widgets
  • Numerical widgets
  • Date and time widgets
  • Select widgets
  • GPS widgets
  • Image widgets
  • Audio widget
  • Video widget
  • Barcode widget
  • Range widgets
  • Note widget
  • URL widget
  • Printer widget
  • Trigger/acknowledge widget
  • Grouping multiple questions on the same screen

There is a multiline appearance that this doc is missing. It might be good to review http://xlsform.org/ref-table to make sure we have them all.

I think maybe the number string widget should be called the number text widget. We don't use string anywhere.

The integer widget has a limit of 9 digits, but the decimal widget has a limit of 14 digits or 15 characters (not digits).

You call it "Numeric appearance attributes" but you don't use attributes as a header elsewhere.

I'd rename GPS widgets to Location. More on this later.

I'd move bearing widget under GPS/Location, and not numeric. I don't think people think of it as a number.

I'd move signature widget up one level. I don't think people think of it as an image.

Under default image widget, you don't mention appearance in the title, but you do so in numeric appearance.

The barcode app is now called Barcode Scanner, not ZXing.

Audio Record should be Audio Recorder.

Sort the non-Gregorian calendars alphabetically. I don't know how you ordered it but it looks weird to me :)

Single select with search feature can probably drop the feature.

Multiselect should be multi select (I think).

Geopoint doesn't capture GPS always. Sometimes it's WiFi or fused. I'd say Location to be precise. You are missing a period after "Geopoint with user-selected location".

Including images as choices would feel better as the last item in the select list.

In Single Select menu, sometimes you say "Select" other times you "Select widget". I think it should be the latter to be consistent.

In ODK Aggregate, a completed...I'd drop the "In ODK Aggregate". I think it's stored as OK in the form XML.

Trigger acknowledgment widget widget as a repeated word. It might be good to search for "widget widget" to make sure it's not elsewhere.

There is a really big gotcha for grouping multiple question on a screen that should be noted here. See "fields dependent upon an earlier field are not being updated" section on https://opendatakit.org/help/form-design/workarounds/

@adammichaelwood
Copy link
Contributor Author

I think i addressed just about everything above.

Couple points:

  • I tested multiline and it didn't change the actual appearance at all. So I didn't include it.
  • I'm not entirely happy with the awkwardness of the "questions depending on other questions" note, so if you have some better words for that, please volunteer them
  • i added meta as we discussed. Other reference items I've seen put the meta section at the top of the document, but I didn't. I can change that, of course. Also -- i don't know how I feel about wording in there, so feel free to suggest changes. (Always feel free, of course. But, you know -- especially.)
  • I switched "numeric" and "numerical" to "number" in most cases. There's a few where "numeric" seemed to fit better, but you might disagree.

Copy link
Member

@yanokwa yanokwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads a lot better to me! Just a few more changes...

Under Location widgets

  • You use "GPS" position, but that isn't accurate. Sometimes it's WiFi or fused. I'd say Location to be precise.

Under Number text widget

  • The decimal widget has a limit of 14 digits (15 characters)

Under metadata

  • End is the time the survey was last saved, not completed.
  • Today is the current date according to the device (which we might want to note is sometimes totally incorrect)

Under grouping questions

  • Don't say swipe, since people might have buttons enabled. Say, determined when you move to the next screen.
  • If you don't listen to the advice, it won't fail. It will just cause very unpredictable and likely incorrect behavior. That is, sometimes it will work and sometimes it won't.

@yanokwa
Copy link
Member

yanokwa commented Mar 22, 2018

@lognaturel This isn't a blocker for merge, but has it always been the case that multiline does nothing on text boxes?

@yanokwa
Copy link
Member

yanokwa commented Mar 22, 2018

Nitpick, but per our definition, it should be Grouping multiple widgets, not questions on the same screen!

@lognaturel
Copy link
Member

multiline does nothing on text boxes

That has always been the case. Collect uses the rows attribute, Enketo uses the multiline appearance. This is less relevant for Collect now because the text control just grows vertically as more text is entered.

@adammichaelwood
Copy link
Contributor Author

per our definition, it should be Grouping multiple widgets, not questions on the same screen!

I thought about that, but then I thought.... maybe the whole screen of questions is one widget...

@adammichaelwood
Copy link
Contributor Author

It will just cause very unpredictable and likely incorrect behavior.

I would call that a failure condition, no?

@yanokwa
Copy link
Member

yanokwa commented Mar 22, 2018

Failure implies that there will be something obvious that it has failed. I worry that people will think it's working when they swipe through, but it's failing subtly.

@adammichaelwood
Copy link
Contributor Author

do you know if today is captured at start, end, completion, or some other time?

@yanokwa
Copy link
Member

yanokwa commented Mar 22, 2018

Today is captured when the widget is shown.

@adammichaelwood
Copy link
Contributor Author

when the widget is shown.

Except it isn't visible. I'm using "rendered" unless you have a better suggestion...

- :tc:`end` --- The time the survey was completed.
- :tc:`today` --- The date of survey collection.
- :tc:`end` --- The last time the survey was saved.
- :tc:`today` --- The current date, according to the device, when the survey is collected. (The date is determined when the widget is rendered.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, now that I look at this, the meta widget isn't shown. Let's just drop the stuff in the parenthesis. Better to say nothing than say wrong stuff.

@yanokwa yanokwa merged commit 323dfa8 into getodk:master Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment