[Improvement]: Remove space between QuantityValue value and unit#18313
Conversation
Review Checklist
|
|
|
This may introduce a breaking change if people rely on this to split up the value and unit. |
|
Yeah, true, this will break exploding the string at the space character. But I personally think that's not a blocker - if you want to extract the number from the string, you can use regex. |
This comment was marked as resolved.
This comment was marked as resolved.
…ue-value-and-unit
…pace-between-quantityvalue-value-and-unit
|
…ue-value-and-unit
There was a problem hiding this comment.
Pull request overview
Removes the hardcoded space between QuantityValue numeric/text value and its unit abbreviation so spacing can be controlled externally (e.g., via translations), and documents the behavior change in upgrade notes (resolves #18312).
Changes:
- Remove the
" "separator in__toString()forQuantityValueandInputQuantityValue. - Remove the
" "separator in admin version preview and QuantityValueRange CSV export formatting. - Add an upgrade note describing the spacing change.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| models/DataObject/Data/QuantityValue.php | Removes hardcoded space before unit abbreviation in __toString(). |
| models/DataObject/Data/InputQuantityValue.php | Removes hardcoded space before translated unit abbreviation in __toString(). |
| models/DataObject/ClassDefinition/Data/QuantityValueRange.php | Removes hardcoded space before unit abbreviation in CSV export string. |
| models/DataObject/ClassDefinition/Data/AbstractQuantityValue.php | Removes hardcoded space before unit abbreviation in version preview formatting. |
| doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md | Adds upgrade note announcing the spacing change. |
models/DataObject/ClassDefinition/Data/AbstractQuantityValue.php
Outdated
Show resolved
Hide resolved
models/DataObject/ClassDefinition/Data/AbstractQuantityValue.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>



Changes in this pull request
Resolves #18312
Additional info