Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zora: implement custom tag #2263

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Zora: implement custom tag #2263

merged 1 commit into from
Sep 27, 2024

Conversation

isstuev
Copy link
Collaborator

@isstuev isstuev commented Sep 24, 2024

Description and Related Issue(s)

resolves #2255

Proposed Changes

added NEXT_PUBLIC_ADDRESS_USERNAME_TAG env variable
config for Zora: {'api_url_template': 'https://api.zora.co/discover/user/{address}', 'tag_link_template': 'httpszora.co/{username}', 'tag_icon': 'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/zora.svg', 'tag_bg_color': 'rgba(0,0,0)', 'tag_text_color': 'rgba(255,255,255)'}

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

@isstuev isstuev added the ENVs label Sep 24, 2024
@isstuev isstuev marked this pull request as ready for review September 24, 2024 13:11
@isstuev isstuev requested a review from tom2drum September 24, 2024 13:11
Copy link
Collaborator

@tom2drum tom2drum left a comment

Choose a reason for hiding this comment

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

I find the current naming a bit misleading.

When I see the userProfile prefix, I immediately think of the user account and its profile within the app. However, that is not the case here.

I suggest making the names more specific by including the word address, as it relates to the address page (the tag on the address page) and omit API from the ENV name, since the config that it holds is not related only to the API but to the tag as well. For example, we could use NEXT_PUBLIC_ADDRESS_USERNAME_TAG or something similar for ENV variable name and change the naming in the code accordingly.

Additionally, I wonder if this feature is less generic than it appears. The API's response schema is hardcoded, and I doubt that other protocols will adopt the same schema as Zora. Therefore, we could be more specific in both the code and the naming to indicate that it pertains to the Zora API. However, this is just my perspective, and I do not have all the details about the task or whether other protocols will follow the same API schema.

lib/hooks/useUserProfileApiQuery.tsx Outdated Show resolved Hide resolved
@isstuev isstuev merged commit 10e5e93 into main Sep 27, 2024
7 checks passed
@isstuev isstuev deleted the fe-2255 branch September 27, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zora: implement custom tag
2 participants