Skip to content

feat(components): add AddressFieldWithResolvedPreview for ENS preview UX#193

Merged
pasevin merged 2 commits into
mainfrom
feat/address-field-resolved-preview
Jul 19, 2026
Merged

feat(components): add AddressFieldWithResolvedPreview for ENS preview UX#193
pasevin merged 2 commits into
mainfrom
feat/address-field-resolved-preview

Conversation

@pasevin

@pasevin pasevin commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add AddressFieldWithResolvedPreview and ResolvedAddressFieldPreview to @openzeppelin/ui-components — the canonical composition for forward ENS resolution in AddressField plus a rich reverse-resolved preview card (supersedes hand-rolled field + announcer suppression in consumers).
  • Add ResolvedAddressFieldPreviewWithNameResolution in @openzeppelin/ui-renderer and adopt it in AddAliasDialog when enableNameResolution is on.
  • Update the basic-react-app examples (Name Resolution integration page, AddressField gallery, ENS v1/v2 showcase, Account Alias copy) to demo the shared pattern.

Changesets

  • @openzeppelin/ui-components minor3.7.0 (AddressFieldWithResolvedPreview, ResolvedAddressFieldPreview)
  • @openzeppelin/ui-renderer patch → Address Book add-alias preview uses shared components

Test plan

  • pnpm --filter @openzeppelin/ui-components test (313 tests)
  • pnpm --filter @openzeppelin/ui-renderer test (128 tests)
  • Pre-push hook (format, lint, typecheck, full test suite)
  • Merge → Changesets "Version Packages" PR publishes @openzeppelin/[email protected] + renderer patch
  • Examples app: AddressField → "Rich ENS preview"; Name Resolution live widget; Address Book add-alias with enableNameResolution

Made with Cursor

Extract the forward-resolution field + reverse ENS preview card into
reusable ui-components exports, wire ui-renderer Address Book to the
shared pattern, and update the examples app demos accordingly.

Co-authored-by: Cursor <[email protected]>
@pasevin
pasevin requested a review from a team as a code owner July 18, 2026 23:37
@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for openzeppelin-ui ready!

Name Link
🔨 Latest commit f5669b4
🔍 Latest deploy log https://app.netlify.com/projects/openzeppelin-ui/deploys/6a5c19230b39190008a66569
😎 Deploy Preview https://deploy-preview-193--openzeppelin-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI 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.

Pull request overview

Adds a shared “rich ENS preview” pattern across the component library, renderer, and examples by composing AddressField forward resolution with a reverse-resolved preview card.

Changes:

  • Introduces AddressFieldWithResolvedPreview + ResolvedAddressFieldPreview in @openzeppelin/ui-components.
  • Adds ResolvedAddressFieldPreviewWithNameResolution in @openzeppelin/ui-renderer and adopts it in the Address Book add-alias flow (plus test updates).
  • Updates the basic React examples to demonstrate the recommended shared preview UX and wiring.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/renderer/src/components/ResolvedAddressFieldPreviewWithNameResolution.tsx Adds renderer bridge component wiring preview card to async reverse resolution.
packages/renderer/src/components/index.ts Exports the new renderer bridge component.
packages/renderer/src/components/AddressBookWidget/AddAliasDialog.tsx Switches add-alias address input to AddressFieldWithResolvedPreview with rich preview.
packages/renderer/src/components/AddressBookWidget/tests/AddAliasDialog.sf5.test.tsx Updates assertions to validate the new preview card UI instead of announcer copy.
packages/components/src/components/fields/ResolvedAddressFieldPreview.tsx Adds presentational preview card wrapping AddressDisplay for reverse-resolved UX.
packages/components/src/components/fields/index.ts Re-exports the new field + preview components.
packages/components/src/components/fields/AddressFieldWithResolvedPreview.tsx Adds canonical composition that suppresses the forward announcer and shows a preview slot/card.
packages/components/src/components/fields/AddressFieldWithResolvedPreview.test.tsx Adds tests for preview gating and custom preview slot behavior.
examples/basic-react-app/src/components/MainnetL1FallbackOptInToggle.tsx Updates demo copy to reference the preview-card UX path.
examples/basic-react-app/src/components/ENSShowcaseDemo.tsx Adopts the shared preview pattern in the ENS showcase.
examples/basic-react-app/src/components/ENSResolutionDemo.tsx Adopts the shared preview pattern in the name resolution demo and updates wiring snippets.
examples/basic-react-app/src/components/AddressFieldDemo.tsx Adds a “Rich ENS preview” section demonstrating the new composition.
examples/basic-react-app/src/components/AccountAliasDemo.tsx Updates copy to reflect the add-alias dialog’s new preview UX.
.changeset/renderer-resolved-preview.md Adds renderer changeset note (currently misstates the package for one export).
.changeset/address-field-resolved-preview.md Adds components changeset note documenting the new APIs and intended UX defaults.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/components/src/components/fields/ResolvedAddressFieldPreview.tsx Outdated
Comment thread packages/components/src/components/fields/AddressFieldWithResolvedPreview.tsx Outdated
Comment thread .changeset/renderer-resolved-preview.md Outdated
Add missing React type imports, exclude resolvedName from displayProps,
clarify announcer suppression comment, and fix renderer changeset package.

Co-authored-by: Cursor <[email protected]>
@pasevin
pasevin merged commit 3696502 into main Jul 19, 2026
14 checks passed
@pasevin
pasevin deleted the feat/address-field-resolved-preview branch July 19, 2026 07:13
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants