Skip to content

Conversation

@cnathe
Copy link
Contributor

@cnathe cnathe commented Aug 12, 2025

Rationale

This pull request introduces support for handling columns with quantity units by recognizing a special unit suffix in column names, updating formatting and conversion logic, and enhancing how units are displayed in the UI. The changes are focused on enabling a feature flag for quantity column suffixes, updating value formatting to handle units, and ensuring proper data conversion and display.

Related Pull Requests

Changes

  • Added logic to detect and process column names with a __<unit> suffix when the QUANTITY_COLUMN_SUFFIX_TESTING feature is enabled
  • Enhanced value formatting and conversion functions to support quantities, including new methods for formatting values with units and converting values to the appropriate quantity type
  • Updated rendering logic to append unit labels to column headers and display values
  • Refactored and centralized format and conversion logic for columns to use new utility methods

@github-actions
Copy link

WARNING: This PR appears to have the default title generated by GitHub. Please use something more descriptive.

@cnathe cnathe changed the title Fb quantity Quantity support for volume and mass units and conversion between them Aug 14, 2025
@cnathe cnathe marked this pull request as ready for review August 14, 2025 15:52

if (null != expr && expr.canRender(ctx.getFieldMap().keySet()))
{
// TODO handle Quantity values here?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there is a format we need to convert to defaultDisplayUnit() before calling .format()

{
try
{
if (PropertyType.FILE_LINK.equals(col.getPropertyType()) && value instanceof String strVal)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this if FileLine else block repeated a few times. Now that we have the col.getConvertFn() mechanism to handle conversion, could the FileLink check be handled as part of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe??? I like the idea, if the FILE_LINK case is handled consistently in the various code paths. I don't know if that is true.

@cnathe cnathe merged commit 07f31d6 into develop Aug 18, 2025
7 of 9 checks passed
@cnathe cnathe deleted the fb_quantity branch August 18, 2025 21:26
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.

5 participants