Skip to content

Conversation

@PhilippImhof
Copy link
Collaborator

This PR fixes the problems in #267 and #266. It has two changes:

  • Prior to Implement custom formatting of input fields #235, users could specify {_0}{_u} (with no space) in order to obtain a combined unit field. As there can now be options, it's possible to have {_0|width=100px}{_u|bgcol=red}. Unfortunately, I forgot that and was still searching for just {_0}{_u}.
  • Also, insertion of the combined field, once it was rendered, occurred at the position of the {_0}{_u} placeholders. I forgot to dynamically create the search string, taking into account the actual placeholder with its formatting options.

If the user adds formatting to both the {_0} and the {_u} part, the plugin will merge the options. In case of conflicts, the options from the {_u} field (the latter) will be used.

@coveralls
Copy link

coveralls commented Aug 6, 2025

Pull Request Test Coverage Report for Build 16798398940

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 97.633%

Totals Coverage Status
Change from base Build 16770520117: 0.004%
Covered Lines: 4331
Relevant Lines: 4436

💛 - Coveralls

@PhilippImhof
Copy link
Collaborator Author

@dbauer-ets If you have some time, please have a look at the fix. It works fine in my tests, I have also added two specific unit tests to cover the two bugs. I'd love to merge it by the end of the week and would then publish a bugfix release.

@PhilippImhof PhilippImhof merged commit 31ec890 into FormulasQuestion:main Aug 19, 2025
46 checks passed
@PhilippImhof PhilippImhof deleted the fix-formatting branch August 19, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No combined field if formatting number or unit No input box if formatting number and separate unit field

2 participants