Skip to content

feat(ensadmin): ENS Explorer - explore names#1125

Merged
lightwalker-eth merged 21 commits intomainfrom
y3drk/feat/ensadmin/ens-explorer-explore-names
Oct 1, 2025
Merged

feat(ensadmin): ENS Explorer - explore names#1125
lightwalker-eth merged 21 commits intomainfrom
y3drk/feat/ensadmin/ens-explorer-explore-names

Conversation

@Y3drk
Copy link
Copy Markdown
Contributor

@Y3drk Y3drk commented Sep 26, 2025

Closes Issue #1091 . More details there.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 26, 2025

🦋 Changeset detected

Latest commit: d48eeed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
ensadmin Minor
ensindexer Minor
ensrainbow Minor
@ensnode/datasources Minor
@ensnode/ensrainbow-sdk Minor
@ensnode/ponder-metadata Minor
@ensnode/ensnode-schema Minor
@ensnode/ensnode-react Minor
@ensnode/ponder-subgraph Minor
@ensnode/ensnode-sdk Minor
@ensnode/shared-configs Minor
@docs/ensnode Minor
@docs/ensrainbow Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Sep 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
admin.ensnode.io Ready Ready Preview Comment Oct 1, 2025 0:40am
ensnode.io Ready Ready Preview Comment Oct 1, 2025 0:40am
ensrainbow.io Ready Ready Preview Comment Oct 1, 2025 0:40am

Copy link
Copy Markdown
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

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

@Y3drk Hey cool 👍 Reviewed and shared a few suggestions

Copy link
Copy Markdown
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

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

@Y3drk Hey nice work here 👍 I've pushed a few commits with refinements will merge this PR now. I've also added comments on this PR that contain background info that I think you'll find helpful for the future 😄

export default function ExploreNamesPage() {
const router = useRouter();
const [searchedName, setSearchedName] = useState<Name>("");
const [rawInputName, setRawInputName] = useState<Name>("");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Y3drk Background info: We frequently need to separate raw input values from validated values. Whenever we are in a context like this suggest to explicitly name raw input values as "raw..." to avoid mistakes when using such raw unvalidated values.

const formData = new FormData(e.target as HTMLFormElement);
const name = formData.get("ens-name") as Name;
// TODO: Input validation and normalization.
// see: https://github.com/namehash/ensnode/issues/1140
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Y3drk I created this follow up issue with the detailed requirements.

className="max-sm:self-stretch"
>
View Name
View Profile
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Y3drk Background info: We're exploring names, but technically we are viewing the profile for a name, not just the name itself.

className="font-mono rounded-full"
asChild
>
<NameDisplay name={exampleName} />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Y3drk Background info: Whenever we display a name it should be done through a NameDisplay. I have a pending task to add special logic into NameDisplay for some best practices. It's a long story but please follow this.

>
{exampleName}
</Button>
<NameLink name={exampleName} key={`example-name-link-${exampleName}`}>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Y3drk Background info:

  1. These may be styled as buttons, but they should operate as links. Ex: I should be able to ctrl+click to open in a new tab or copy the link, etc.
  2. Whenever we link to a name we should use NameLink

return (
<Link
href={nameDetailsRelativePath}
className={`inline-flex items-center gap-2 text-blue-600 hover:underline ${className || ""}`}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Y3drk Background info: NameLink should just purely hold link logic, not influence stylings.

<NameLink name={registration.name}>
<NameLink
name={registration.name}
className="inline-flex items-center gap-2 text-blue-600 hover:underline"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Y3drk If we want a particular NameLink to have a particular style, we can achieve that goal like this.

export function NameLink({ name, className, children }: PropsWithChildren<NameLinkProps>) {
const nameDetailsRelativePath = getNameDetailsRelativePath(name);
const { retainCurrentRawConnectionUrlParam } = useRawConnectionUrlParam();
const href = retainCurrentRawConnectionUrlParam(getNameDetailsRelativePath(name));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Y3drk Background info: We shouldn't cause the selected connection to reset to the default selected connection whenever someone clicks on a link.

All our links need to retain the current selected connection. Perhaps there's a more elegant way to solve this issue, but in this PR I applied a simple strategy for achieving this goal.

@lightwalker-eth lightwalker-eth merged commit 8519564 into main Oct 1, 2025
10 checks passed
@lightwalker-eth lightwalker-eth deleted the y3drk/feat/ensadmin/ens-explorer-explore-names branch October 1, 2025 12:42
@github-actions github-actions bot mentioned this pull request Oct 1, 2025
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.

ENS Explorer: Explore Names

2 participants