OLMIS-8191: Shared openlmis-long-text widen-then-wrap for table cells#86
Conversation
|
Reviewed as part of the OLMIS-8191/8192 rollout. Solid refactor — the opt-in openlmis-long-text class in place of a restrict:'E' directive on every textarea is a clean improvement, editable and read-only are handled consistently, and the hidden→shown guard (offsetParent === null) with its regression test is a good catch. |
The openlmisLongText directive only re-measured on value change, so a pre-filled textarea that starts hidden (ng-show/ng-if) and is shown later stayed at one row until edited. Watch visibility (offsetParent) too, so the field is sized once it becomes visible. Adds a regression test and notes OLMIS-8192 in the changelog.
|



What
A single opt-in
openlmis-long-textclass for long free-text in constrained table columns: the field widens with its content up to a cap, then wraps.<textarea>measured and sized by theopenlmisLongTextdirective.<span>sized purely in CSS (width: max-content, capped bymax-width).common/_variables.scss.Why
Replaces the earlier auto-resize approach (the directive was
restrict: 'E'on every table textarea — #79 / #74) with one explicit opt-in that covers the editable and read-only sides consistently.Notes
OLMIS-8191 / OLMIS-8192