Skip to content

Add home search, subdomains, network switch on navbar - #89

Merged
AugustoL merged 6 commits into
openscan-explorer:devfrom
AugustoL:add-home-search
Dec 12, 2025
Merged

AugustoL merged 6 commits into
openscan-explorer:devfrom
AugustoL:add-home-search

Conversation

@AugustoL

@AugustoL AugustoL commented Dec 11, 2025 •

Copy link
Copy Markdown
Collaborator

New Features

Home Page Search Bar with ENS Support

  • Added a search bar on the home page that detects input type (block, transaction, address, ENS)
  • Shows a network dropdown when a valid search pattern is detected

Subdomain Routing System

  • Added subdomain configuration for network and profile pages
  • Supported subdomains: ethereum → /1, localhost → /31337 (dev only), openscan-app, openscan-org, weenus (Sepolia token)
  • Invalid subdomains redirect to the base domain
  • Navbar shows network icon with dropdown when on a network with subdomain support

Navbar Network Switcher

  • Dropdown shows all networks with subdomain support
  • Current network displayed first with active state
  • Other networks listed below with divider before OpenScan home option

Hardhat Network Support in Development

  • Hardhat (31337) network automatically injected when in development mode AND explicitly enabled in REACT_APP_OPENSCAN_NETWORKS
  • Added Hardhat to EVMAdapter supported networks

Bug Fixes

  • Fixed index redirection on error page
  • Fixed race condition preventing networks from displaying

Dependencies

  • Bumped explorer-network-connectors to 0.1.0

- Add HomeSearchBar component to home page that detects input type
  (address, transaction hash, block number, ENS name)
- Show dropdown with available networks when valid pattern is detected
- Support direct navigation to ENS URLs (e.g., /1/address/vitalik.eth)
- Add ENS resolution in address page with loading and error states
- Configure webpack dev server to allow dots in URLs (disableDotRule)
- Add CSS styles for search bar and dropdown
Add subdomain configuration for network and profile pages:
- ethereum → /1 (Ethereum Mainnet)
- openscan-app → /profile/app/openscan
- openscan-org → /profile/organization/openscan
- weenus → Weenus token on Sepolia

Changes:
- Add subdomain config file with enabled subdomain mappings
- Add subdomain detection utilities for localhost/production
- Add SubdomainRedirect component in App.tsx
- Update navbar to show network icon when on subdomain network
- Add dropdown menu to navigate between OpenScan home and network
- Invalid subdomains redirect to base domain
- Add Hardhat (31337) network config injection when both development
  mode is enabled and 31337 is in REACT_APP_OPENSCAN_NETWORKS
- Add 31337 to EVMAdapter and adaptersFactory supported networks
- Fix OpenScan URL in run-test-env.sh (3030 instead of 3000)
@github-actions

github-actions Bot commented Dec 11, 2025 •

Copy link
Copy Markdown

🚀 Preview: https://pr-89--openscan.netlify.app
📝 Commit: 0352787d30999c2687c5800e3fc4c375ac02d9cd

- Add localhost/Hardhat subdomain config (enabled in dev mode only)
- Update navbar dropdown to show all networks with subdomain support
- Current network shown first with active state
- Other networks listed below
- Divider separates networks from OpenScan home option
- Add CSS for active state and divider
@AugustoL
AugustoL marked this pull request as ready for review December 11, 2025 22:09
@AugustoL
AugustoL requested a review from MatiasOS December 11, 2025 22:09
@AugustoL AugustoL changed the title Add home search Add home search, subdomains, network switch con navbar Dec 11, 2025
@AugustoL AugustoL changed the title Add home search, subdomains, network switch con navbar Add home search, subdomains, network switch on navbar Dec 12, 2025
@AugustoL
AugustoL merged commit e48afa9 into openscan-explorer:dev Dec 12, 2025
3 checks passed
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