enketo / enketo

Enketo web forms monorepo
Apache License 2.0
15 stars 29 forks source link

Support choice styling with markdown / span #161

Open tinok opened 4 years ago

tinok commented 4 years ago

At the moment, Enketo Express does not support styling choice labels the way that question labels already do. This is supported by ODK Collect.

See the Form styling documentation for Collect and the XLSForm documentation.

MartijnR commented 4 years ago

Thanks. It's good to have an issue for this to refer to.

I am not in favor of resolving this (though technically very easy) because:

  1. It means we'd have to move markdown parsing to the client. The costs in performance will be high. I don't think they outweigh the (I daresay minor) benefit of having this feature.

  2. In order to support it on mobile devices for select_multiple/select_one with minimal, we'd have to move away from native HTML <select> elements, which I think will be a deterioration in mobile usability of these question types. Excluding those would be tough to explain because the same form would be different on non-touchscreen and touchscreen devices.

lognaturel commented 1 year ago

The current approach to markdown is slow because of the replacement step at the end but that can be replaced.

Likely next step: move MD processing client-side, make it performant, stop using Transformer MD processing

After that: make sure https://docs.getodk.org/form-styling/#markdown has full specification of what we want to support and replace custom implementation with off the shelf one (likely https://remark.js.org/)