Skip to content

Conversation

@MahendraBishnoi29
Copy link
Contributor

@MahendraBishnoi29 MahendraBishnoi29 commented Sep 14, 2025

Description

The two stories I created, WithArtist and BrandAsset, are designed to reflect the primary ways the AssetDownload component is used on our current assets page.

These stories test the component's rendering in the main contexts you're using it in.

Related Issue

@netlify
Copy link

netlify bot commented Sep 14, 2025

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 23e5674
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/68e415db51d7900008cfc080
😎 Deploy Preview https://deploy-preview-16260--ethereumorg.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.

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Hey @MahendraBishnoi29, thanks for this! Getting this error on each of these when viewing locally: Path must be a string. Received null


Small house-keeping note as well, if you use the words "Closes" or "Fixes" before the issue number in your PR description it will properly link it to that issue, so the issue is auto-closed when the PR is merged. And bonus, if it's used with a bullet-point, GitHub will render it nicely with the issue title and status as well:

## Related Issue
- Closes #13045
image image

I've gone ahead and updated this, but just noting for your sake =)

@MahendraBishnoi29
Copy link
Contributor Author

Hey @MahendraBishnoi29, thanks for this! Getting this error on each of these when viewing locally: Path must be a string. Received null

Small house-keeping note as well, if you use the words "Closes" or "Fixes" before the issue number in your PR description it will properly link it to that issue, so the issue is auto-closed when the PR is merged. And bonus, if it's used with a bullet-point, GitHub will render it nicely with the issue title and status as well:

## Related Issue
- Closes #13045

image image
I've gone ahead and updated this, but just noting for your sake =)

Fixed it, please check and let me know if any changes needed. @wackerow

@wackerow
Copy link
Member

@MahendraBishnoi29 hm, I'm still getting this same error.. are you able to load this up successfully on your end with pnpm storybook?

@MahendraBishnoi29
Copy link
Contributor Author

@MahendraBishnoi29 hm, I'm still getting this same error.. are you able to load this up successfully on your end with pnpm storybook?

Seems like the BaseLink component was causing that issue I've applied a fix to the BaseLink component that should prevent the crash in Storybook. By ensuring that the pathname is a valid string before attempting to resolve a relative path, the error should now be resolved.

@github-actions github-actions bot added the tooling 🔧 Changes related to tooling of the project label Oct 6, 2025
Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Thanks @MahendraBishnoi29! I pushed a couple commits to try and clean a few things up

  • To get the intl strings working, we had to add the page-assets namespace to the .storybook/next-intl.ts config
  • Updated the location of this story to nest inside "Molecules / Display Content / AssetDownload"
  • Switched the initial example to use the hero image
  • I reverted the changes to ui/Link and AssetDownload/index.tsx to minimize new changes to other components
  • To fix the undefined pathname issue, added a small patch instead to the getRelativePath util to make relativePath optional, falling back to an empty string.

Letting the preview build now, but approving in the meantime assuming it builds without issues. The story is working properly for me locally.. thanks again!

@wackerow wackerow merged commit 195c7ec into ethereum:dev Oct 6, 2025
7 checks passed
@wackerow
Copy link
Member

wackerow commented Oct 6, 2025

@all-contributors please add @MahendraBishnoi29 for test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tooling 🔧 Changes related to tooling of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create story for AssetDownload component

3 participants