✏️ Update network dropdown labels - #2784
Conversation
Co-authored-by: Codex <noreply@openai.com>
There was a problem hiding this comment.
Pull request overview
Updates the network selector dropdown in the account header to display single-word network labels (e.g., “Mainnet”, “Testnet”) while keeping the underlying stored networkName values unchanged for compatibility.
Changes:
- Added a
getNetworkDisplayName(networkName)helper to map stored network names to desired display labels. - Updated the network dropdown row rendering to show the mapped display name instead of the raw
networkName.
Comments suppressed due to low confidence (2)
extension/src/popup/components/account/AccountHeader/index.tsx:57
- This mapping updates only Main/Test. If the user enables experimental mode, Futurenet becomes the default network (
NETWORK_NAMES.FUTURENET== "Future Net") and will still display as two words. Consider also mapping "Future Net" -> "Futurenet" to keep dropdown labels consistent with docs/UI elsewhere.
switch (networkName) {
case "Main Net":
return "Mainnet";
case "Test Net":
return "Testnet";
default:
return networkName;
extension/src/popup/components/account/AccountHeader/index.tsx:277
- Changing the dropdown labels will break existing UI tests that locate these options by text (e.g. many Playwright e2e tests use
getByText("Main Net")/getByText("Test Net")inextension/e2e-tests/**). Please update those assertions/selectors to the new labels ("Mainnet"/"Testnet") or switch tests to a more stable selector than visible text.
<NetworkIcon index={i} />
<div className="AccountHeader__network-copy">
{getNetworkDisplayName(n.networkName)}
</div>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Codex <noreply@openai.com>
|
Anything else you'd like to see here, @JakeUrban? |
|
We're supportive of this change, but as of now this PR isn't mergable since the tests are passing. If you can update the tests to match the changes we should be able to get this merged, thanks! |
Co-authored-by: Codex <noreply@openai.com>
|
I think I fixed it. It's been running the test for over a day now. |
Right now, the network selection dropdown shows locale selection as two words, which diverges from my documentation standards and the Lab.
This only changes the display text in the account header dropdown. The underlying stored
networkNamevalues remain unchanged for compatibility with existing settings and network switching.