feat(ui): make API keys instruction configurable via NEXT_PUBLIC_API_…#3329
feat(ui): make API keys instruction configurable via NEXT_PUBLIC_API_…#3329rahulkumaar03 wants to merge 1 commit intoblockscout:mainfrom
Conversation
…KEYS_INSTRUCTION Made-with: Cursor
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| }, [ deleteModalProps ]); | ||
|
|
||
| const description = ( | ||
| const description = apiKeysInstructionHtml ? ( |
There was a problem hiding this comment.
Hi @rahulkumaar03,
Thank you for your contribution. However, we would prefer to keep the current text as the default if the variable is not set.
Description and Related Issue(s)
The intro line on the API keys account page (“Create API keys to use for your RPC and EthRPC API requests…”) was hardcoded. This change makes it optional and environment-driven, consistent with the existing NEXT_PUBLIC_API_KEYS_ALERT_MESSAGE banner on the same page.
Proposed Changes
Make the API keys account page intro line (“Create API keys to use for your RPC and EthRPC API requests…”) configurable via environment variables, instead of hardcoded React copy.
Checklist for PR author
Note
Medium Risk
Introduces
dangerouslySetInnerHTMLrendering of env-provided HTML on the API keys page; misconfiguration could enable XSS or broken markup. Otherwise changes are localized to UI config/env validation and documentation.Overview
Makes the API keys page intro text optional and environment-configurable via new
NEXT_PUBLIC_API_KEYS_INSTRUCTION, replacing the previously hardcoded copy.Plumbs the new env var through
configs/app/ui.ts, adds it to the env validator schema and test.env.base, and documents it indocs/ENVS.md. The API keys page now renders the instruction HTML (when set) above the list and styles any included links.Written by Cursor Bugbot for commit a05836a. This will update automatically on new commits. Configure here.