openmrs / openmrs-esm-form-engine-lib

React Form Engine library for O3
Other
10 stars 59 forks source link

(fix) O3-3337 - Support expressions that don't use whitespace as delimiters #327

Closed arodidev closed 3 months ago

arodidev commented 3 months ago

Requirements

Summary

This PR introduces a fix for various failing expression evaluations due to improper formatting during form construction.

Screenshots

Related Issue

https://openmrs.atlassian.net/browse/O3-3337

Other

arodidev commented 3 months ago

Hi @brandones, the work on this PR had stalled since @pirupius had picked up the issue, albeit using a different approach.

brandones commented 3 months ago

Wait so should we revert this?

When things like that happen, please leave comments on PRs so that people know what's going on.

samuelmale commented 3 months ago

@brandones I would say we revert because this is a half-backed solution. Yes it does the necessary interpolation (further hydrates the expression by updating any lurking referenced field's value path) but it doesn't update the relationships (dependencies) etc. The ideal solution is to properly decompose the expression into parts and we were planning on using a third party library.

arodidev commented 3 months ago

@samuelmale If I’m not mistaken, updating the field dependants was not an area of concern while working on this issue since it was non-problematic. This was to take care of the mis-formatted expressions (ones with irregular whitespace intervals) that was causing the expressions to fail.

samuelmale commented 3 months ago

updating the field dependants was not an area of concern while working on this issue since it was non-problematic.

I would say it is a secondary concern.