Skip to content

[ENG-4158]feat: show displayName for nested objects - #1630

Merged
anushat05 merged 4 commits into
mainfrom
fix/map-to-name-display-for-nested-fields
Jul 31, 2026
Merged

[ENG-4158]feat: show displayName for nested objects#1630
anushat05 merged 4 commits into
mainfrom
fix/map-to-name-display-for-nested-fields

Conversation

@anushat05

@anushat05 anushat05 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What does this change do?

  • Read-field labels now prefer the builder's mapToDisplayName from amp.yaml over the provider's displayName.
  • Nested fields have no provider metadata for their path, so the server falls back to TitleCase(fieldName) — as a result users saw $['Customer']['Email'].
  • New shared getFieldDisplayName() in src/utils/manifest.ts, precedence: mapToDisplayName → displayName → mapToName → fieldName
  • Used in the Configure view (RequiredFields, OptionalFieldsV2) and the InstallWizard (FieldsContent, ConfigureObjectsStep, ReviewStep).
  • subPageUtils loses its local copy of getFieldDisplayName; its two consumers now import the shared helper directly.

Testing

  • Added new unit tests.
  • Manual E2E: deployed a Housecall Pro estimates integration, verified in the MailMonkey demo app against a local build.
    • before: $['Customer']['Email'], $['Customer']['First_name'],
Screenshot 2026-07-30 at 15 25 18 Screenshot 2026-07-30 at 17 19 52
  • after: Customer Email, Customer First Name, customer_home_number, …
Screenshot 2026-07-30 at 17 00 25 Screenshot 2026-07-30 at 17 28 16
  • Test integration was:
{
  "name": "hcpReadTest",
  "provider": "housecallPro",
  "displayName": "HCP Read Test",
  "read": {
    "objects": [
      {
        "objectName": "estimates",
        "destination": "test-webhook",
        "schedule": "0 * * * *",
        "mapToName": "estimate",
        "mapToDisplayName": "Estimate",
        "requiredFields": [
          {
            "fieldName": "id"
          },
          {
            "fieldName": "status"
          },
          {
            "fieldName": "$['customer']['email']",
            "mapToName": "customer_email",
            "mapToDisplayName": "Customer Email"
          },
          {
            "fieldName": "$['customer']['home_number']",
            "mapToName": "customer_home_number"
          },
          {
            "fieldName": "$['customer']['work_number']"
          },
          {
            "fieldName": "company_name",
            "mapToName": "hatch_company",
            "mapToDisplayName": "Hatch Company"
          },
          {
            "fieldName": "work_status",
            "mapToName": "hatch_work_status"
          },
          {
            "mapToName": "hatch_priority",
            "mapToDisplayName": "Priority",
            "prompt": "Which Housecall Pro field tracks priority?"
          },
          {
            "mapToName": "hatch_source",
            "prompt": "Which Housecall Pro field records the lead source?"
          }
        ],
        "optionalFields": [
          {
            "fieldName": "lead_source"
          },
          {
            "fieldName": "estimate_number",
            "mapToName": "hatch_estimate_number",
            "mapToDisplayName": "Hatch Estimate Number"
          },
          {
            "fieldName": "address",
            "mapToName": "hatch_address"
          },
          {
            "mapToName": "hatch_optional_tag",
            "mapToDisplayName": "Optional Tag",
            "prompt": "Which field holds an optional tag?"
          }
        ]
      },
      {
        "objectName": "customers",
        "destination": "test-webhook",
        "schedule": "0 * * * *",
        "requiredFields": [
          {
            "fieldName": "id"
          },
          {
            "fieldName": "email"
          }
        ],
        "optionalFields": [
          {
            "mapToName": "hatch_customer_tier",
            "mapToDisplayName": "Customer Tier",
            "prompt": "Which field records the customer tier?"
          }
        ],
        "optionalFieldsAuto": "all"
      }
    ]
  }
}```

@anushat05 anushat05 changed the title feat: show displayName for nested objects [ENG-4158]feat: show displayName for nested objects Jul 30, 2026
@linear

linear Bot commented Jul 30, 2026

Copy link
Copy Markdown

ENG-4158

Comment thread src/components/Configure/content/fields/OptionalFields/OptionalFieldsV2.tsx Outdated
Comment thread src/components/Configure/content/fields/RequiredFields.tsx Outdated
Comment thread src/components/InstallWizard/steps/configure-objects/subPageUtils.ts Outdated
Comment thread src/utils/manifest.ts Outdated
Comment thread src/utils/manifest.ts
Comment thread src/utils/manifest.ts
@anushat05
anushat05 merged commit 5bf4e91 into main Jul 31, 2026
4 checks passed
@anushat05
anushat05 deleted the fix/map-to-name-display-for-nested-fields branch July 31, 2026 21:59
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