judicialcouncilcalifornia / docassemble.jcc.abilitytopay

https://mycitations.courts.ca.gov
MIT License
0 stars 0 forks source link

Helper text component #32

Open slowbot opened 5 years ago

slowbot commented 5 years ago
  1. Allow for a field for help text per form field in doc assemble. This help text should not be hidden behind a tooltip but rather displayed under the form field.

image

  1. Allow for additional helper text element that acts an expandable trigger to reveal additional text. Will operate similar to conditional checkboxes on some pages.

image

jmadans commented 5 years ago

@slowbot Just want to make sure to flag the nuance that we need to be able to customize the prompt and explanation

slowbot commented 5 years ago

@rdeshpande Can you help track adding the tooltip to a subquestion?

slowbot commented 5 years ago

@jmadans Simple example of field helper. branch: simplehelptext @rdeshpande

image

Marthaew commented 5 years ago

This does not have to happen for Jan 31 go live, but would like to work on it for a next release for sure.

jaredcwhite commented 5 years ago

I've created a new branch helpwidget that contains styles/JS for both a simple help tip as well as the widget with the disclosure mechanism. Examples of both are in the YAML for page 2.

Let me know if this (fairly straightforward) HTML markup is suitable for use in authoring…if not, I could possibly come up with a simpler text format and use JS to expand it into the appropriate HTML markup. I'd originally looked into using the templates feature for this, but there were some reasons why I ended up using custom HTML fields.

jaredcwhite commented 5 years ago

Request from @jmadans to document where the CSS/JS is for this…

Starting at line 523 (at the moment) in source/style.scss: 5 selectors for .help-tip, .help-widget, and .help-widget-body

Lines 4-8 in jcc/abilitytopay/data/static/a2p.js: handles the click event for the disclosure link