Skip to content

fix(ui): port emission factor display fixes to InventoryMappingStep#2804

Merged
lemilonkh merged 1 commit into
developfrom
fix/ON-5985-port-emission-factor-fix-to-new-mapping-step
Jul 8, 2026
Merged

fix(ui): port emission factor display fixes to InventoryMappingStep#2804
lemilonkh merged 1 commit into
developfrom
fix/ON-5985-port-emission-factor-fix-to-new-mapping-step

Conversation

@tatimoreira

Copy link
Copy Markdown
Contributor

Summary

PR #2772 improved example value display in the import mapping screen, but those fixes targeted mapping-columns-step.tsx which was deleted by PR #2777 when the 4-step import flow was consolidated into InventoryMappingStep. The new component was left with the original col.exampleValue || "-" raw display.

  • Port EMISSION_FACTOR_KEYS + formatExampleValue to convert CO2/CH4/N2O/TotalCO2e emission factor example values from raw units to metric tonnes (e.g. 63.15450.0632 t CO2e)
  • Replace "-" placeholder with "Not specified" in content.tertiary color so empty fields are visually distinct from actual data
  • Update sort order: required fields first → auto-detected fields → undetected, so Activity data amount and other mandatory fields always group at the top

Test plan

  • Go to /GHGI/onboarding/import/ and upload a GHGI file
  • On the mapping step, confirm emission factor columns show values in t CO2e format
  • Confirm columns with no example data show "Not specified" in grey instead of "-"
  • Confirm required fields (GPC Ref No, Sector, Subsector, Activity Amount) appear at the top of the list
  • Confirm auto-detected non-required fields appear above undetected fields

…ryMappingStep

PR #2772 improved mapping-columns-step.tsx but that component was deleted
by PR #2777 when the import flow was consolidated into InventoryMappingStep.
Port the same fixes to the new component:

- Convert emission factor example values (CO2/CH4/N2O/TotalCO2e) from raw
  units to metric tonnes (t CO2e)
- Show "Not specified" in tertiary color instead of "-" for empty/undefined
  example values
- Sort: required fields first, then auto-detected fields, then undetected,
  so Activity data amount and other mandatory fields group at the top

@lemilonkh lemilonkh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great, thanks 👍

@lemilonkh
lemilonkh merged commit 4c08bb8 into develop Jul 8, 2026
9 checks passed
@lemilonkh
lemilonkh deleted the fix/ON-5985-port-emission-factor-fix-to-new-mapping-step branch July 8, 2026 08:56
lemilonkh pushed a commit that referenced this pull request Jul 8, 2026
…2804)

PR #2772 improved mapping-columns-step.tsx but that component was deleted
by PR #2777 when the import flow was consolidated into InventoryMappingStep.
Port the same fixes to the new component:

- Convert emission factor example values (CO2/CH4/N2O/TotalCO2e) from raw
  units to metric tonnes (t CO2e)
- Show "Not specified" in tertiary color instead of "-" for empty/undefined
  example values
- Sort: required fields first, then auto-detected fields, then undetected,
  so Activity data amount and other mandatory fields group at the top
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.

2 participants