Skip to content
This repository was archived by the owner on May 10, 2026. It is now read-only.

feat: [SC-24987] create LoadingReportIcon#282

Open
FrancoAguzzi wants to merge 32 commits intomainfrom
feat/create-loading-report-icon
Open

feat: [SC-24987] create LoadingReportIcon#282
FrancoAguzzi wants to merge 32 commits intomainfrom
feat/create-loading-report-icon

Conversation

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples.nameguard.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 6:40pm
nameguard.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 6:40pm
namehashlabs.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 6:40pm
storybook.namekit.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 6:40pm

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 1, 2024

🦋 Changeset detected

Latest commit: bc4192d

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

This PR includes changesets to release 3 packages
Name Type
@namehash/nameguard-react Minor
@namehash/nameguard Minor
@namehash/nameguard-js Patch

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

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.

@FrancoAguzzi Hey great to see the progress here. Reviewed and shared feedback 👍

Comment thread packages/nameguard-react/src/components/LoadingReportIcon/LoadingReportIcon.tsx Outdated
Comment thread packages/nameguard-react/src/components/LoadingReportIcon/LoadingReportIcon.tsx Outdated
Comment thread packages/nameguard-react/src/components/LoadingReportIcon/LoadingReportIcon.tsx Outdated
Comment thread packages/nameguard-react/src/components/LoadingReportIcon/LoadingReportIcon.tsx Outdated
Comment thread packages/nameguard-react/src/components/ReportIcon/index.tsx Outdated
Comment thread packages/nameguard-react/src/components/ReportIcon/index.tsx Outdated
Comment thread packages/nameguard-sdk/src/utils.ts Outdated
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.

@FrancoAguzzi @notrab Thanks for updates. Reviewed and shared feedback 👍

Comment thread packages/nameguard-sdk/tsconfig.json Outdated
Comment thread packages/nameguard-sdk/src/utils.test.ts Outdated
Comment thread packages/nameguard-sdk/src/utils.test.ts Outdated
Comment thread packages/nameguard-sdk/src/utils.test.ts Outdated
Comment thread packages/nameguard-sdk/src/index.ts Outdated
Comment thread packages/nameguard-sdk/src/index.test.ts Outdated
Comment thread packages/nameguard-react/src/components/Report/Report.tsx Outdated
window.location.href = `https://nameguard.io/inspect/${encodeURIComponent(
ensName.name,
)}`;
const onClickHandler = (clickHandlerFor: ClickHandlerFor) => {
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.

Note to self: If time allows I want to look at this closer.

window.location.href = `https://nameguard.io/inspect/${encodeURIComponent(
ensName.name,
)}`;
const onClickHandler = (clickHandlerFor: ClickHandlerFor) => {
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.

Note to self: if time allows have a closer look at this.

Comment thread packages/nameguard-sdk/src/utils.ts Outdated
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.

@FrancoAguzzi Nice updates! Reviewed and shared feedback 👍

Comment thread packages/nameguard-react/src/utils/text.ts Outdated
Comment thread packages/nameguard-react/src/components/ReportIcon/index.tsx Outdated
Comment thread packages/nameguard-react/src/components/ReportBadge/index.tsx Outdated
Comment thread apps/examples.nameguard.io/package.json Outdated
@FrancoAguzzi
Copy link
Copy Markdown
Contributor Author

@notrab @djstrong can you review this test please?

https://github.com/namehash/namekit/actions/runs/10584114051/job/29327608472?pr=282

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.

@FrancoAguzzi Thanks for updates. Reviewed and shared feedback

format: ["esm"],
splitting: true,
sourcemap: true,
minify: false,
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.

Any changes to these tsup.config.js files either need to be reverted or discussed and aligned with @notrab. Thanks

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.

@FrancoAguzzi Whenever you make any changes to any build configuration files, please proactively add a comment about that change inside the PR in GitHub that explains:

  1. Why that change was needed.
  2. The current status of getting approval from @notrab of the change.

onClickOverride,
onIconClickOverride,
onBadgeClickOverride,
onTooltipClickOverride,
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.

@FrancoAguzzi I don't think we're going in the correct direction with this PR. We're not following our principles for composability.

  1. Let's please avoid ReportBadge becoming another "god" UI component with too many props. We need to design our UI components as needed so that they are composable.
  2. Why do we need all of these different "on click override" functions on each UI component? Why can't the code that wants to make use of ReportBadge just pass in some slots / props as needed? For example: There can be a slot for the icon in a ReportBadge. If someone wants the icon to have a special click override, they can pass special code into that slot as might be desired.
  3. I'm not sure we want so many degrees of freedom with so many customizations. It's best to keep it simple. Perhaps we remove some of these customizations entirely unless we see some real need for them right now.

onClickOverride?: (ensName: ENSName) => void;
type ReportShieldProps = {
onIconClickOverride?: (ensName: ENSName) => void;
onTooltipClickOverride?: (ensName: ENSName) => void;
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.

Please see my other feedback about wanting to find a more composable and simplified solution that allows us to remove all these on click override callbacks.

"build": "tsup",
"dev": "tsup --watch --clean=false"
"dev": "tsup --watch --clean=false",
"test": "vitest"
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.

Can you help me understand the goal for adding the test script here and not running tests from the root directory of the repo? For example, is this different than what we're doing for other packages? If so, why?

I can understand that perhaps people who get our packages via NPM aren't getting the whole monorepo and therefore maybe this has a purpose to include in each package? But in my mind, when you get a package via NPM, it shouldn't be something you're running tests against. For example we shouldn't even include the test code in the files included in the NPM package distribution. The NPM package should just contain the "main" code and no tests. Right?

Assuming we should remove this vitest script here, then please also remove vitest as a devDependency

"exports": {
".": {
"types": "./dist/index.d.ts",
"types": "./dist/index.d.mts",
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.

Can you please help to explain this change to .mts?

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.

@FrancoAguzzi Whenever you make any changes to any build configuration files, please proactively add a comment about that change inside the PR in GitHub that explains:

  1. Why that change was needed.
  2. The current status of getting approval from @notrab of the change.

Comment thread packages/ens-utils/.gitignore Outdated
@@ -0,0 +1,3 @@

# dependencies
/node_modules
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.

Why are we making this change? This suggests we aren't running our pnpm commands from the root of the monorepo. I don't see why we should do this?


type ShareProps = {
name?: string;
name: string;
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.

We should make this an ENSName rather than a string.

name: string;
};

function createTwitterLink(name: string) {
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.

All of these functions should take an ENSName rather than a string.

@@ -137,12 +136,10 @@ export function Share({ name }: ShareProps) {

<div className="min-h-[200px] flex items-center justify-center px-6 md:px-10">
{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.

Why are we checking here if name is defined? It should always be defined based on the defined props of this UI component.

* Fix PR 282

* Update sharing and report URL generation

* Many additional enhancements

* Misc small fixes

* Apply suggested update
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants