close
Skip to content

✏️ Update network dropdown labels#2784

Open
JFWooten4 wants to merge 2 commits into
stellar:masterfrom
JFWooten4:fix/network-dropdown-labels
Open

✏️ Update network dropdown labels#2784
JFWooten4 wants to merge 2 commits into
stellar:masterfrom
JFWooten4:fix/network-dropdown-labels

Conversation

@JFWooten4
Copy link
Copy Markdown

 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 networkName values remain unchanged for compatibility with existing settings and network switching.

Co-authored-by: Codex <noreply@openai.com>
Copilot AI review requested due to automatic review settings May 16, 2026 09:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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") in extension/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.

Comment thread extension/src/popup/components/account/AccountHeader/index.tsx
Co-authored-by: Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants