Skip to content

feat: disable governance view and show external frontends modal#53

Open
aminsammara wants to merge 2 commits intomainfrom
am/disable-governance-view
Open

feat: disable governance view and show external frontends modal#53
aminsammara wants to merge 2 commits intomainfrom
am/disable-governance-view

Conversation

@aminsammara
Copy link
Collaborator

@aminsammara aminsammara commented Mar 13, 2026

Summary

  • Disables direct access to the governance section of the dashboard
  • Clicking the "Governance" nav tab now opens a modal directing users to external community-hosted governance frontends
  • Direct URL access to /governance redirects to home
  • All existing governance code is preserved (not deleted)

Changes

  • New: src/config/externalGovernance.ts - Configurable list of external frontends
  • New: src/components/ExternalGovernanceModal/ - Modal component
  • Modified: src/components/Navbar/Navbar.tsx - Governance link opens modal instead of navigating
  • Modified: src/routes/AppRoutes.tsx - Redirects /governance to home

Configuration

External frontends are configured in src/config/externalGovernance.ts:

Adding a live frontend

{
  name: "Aztec Governance",
  hostedBy: "Nethermind",
  url: "http://example.io/",  // Include URL to make it clickable
}

Showing "Coming Soon"

{
  name: "Aztec Governance",
  hostedBy: "Nethermind",
  url: undefined,  // Omit or set to undefined to show "Coming Soon" badge
}

Replace direct governance access with a modal that directs users to
external community-hosted governance frontends. The governance code
is preserved but inaccessible.

- Add ExternalGovernanceModal component
- Add configurable external frontends list
- Modify Navbar to show modal instead of navigating
- Redirect /governance URLs to home
@aminsammara aminsammara requested a review from a team March 13, 2026 20:48
@aminsammara aminsammara requested a review from a team as a code owner March 13, 2026 20:48
@Maddiaa0 Maddiaa0 requested a review from Copilot March 13, 2026 20:52
Copy link

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

This PR disables the in-app Governance section while preserving the existing governance implementation, replacing the Governance nav behavior with a modal that directs users to community-hosted external governance frontends, and redirecting direct /governance URL access back to home.

Changes:

  • Redirect /governance/* routes to / to prevent direct governance page access.
  • Add a configurable list of external governance frontends and a new modal UI to display them.
  • Update the Navbar “Governance” entry to open the modal instead of navigating.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
staking-dashboard/src/routes/AppRoutes.tsx Removes governance route usage and redirects /governance/* to home.
staking-dashboard/src/config/externalGovernance.ts Adds config/type definitions for external governance frontends.
staking-dashboard/src/components/Navbar/Navbar.tsx Replaces Governance navigation with modal open behavior (desktop + mobile).
staking-dashboard/src/components/ExternalGovernanceModal/index.ts Barrel export for the new modal component.
staking-dashboard/src/components/ExternalGovernanceModal/ExternalGovernanceModal.tsx Implements the modal and renders the configured external frontends list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{
name: "Aztec Governance",
hostedBy: "Nethermind",
url: undefined, // Coming soon - replace with URL when live: "http://aztecgov.nethermind.io/"
Comment on lines +41 to +46
<button
onClick={() => setIsGovernanceModalOpen(true)}
className="font-oracle-standard text-sm uppercase tracking-wider text-parchment/80 hover:text-chartreuse transition-colors font-medium"
>
GOVERNANCE
</button>
Comment on lines +82 to +90
<button
onClick={() => {
closeMenu()
setIsGovernanceModalOpen(true)
}}
className="block font-oracle-standard text-base uppercase tracking-wider text-parchment hover:text-chartreuse transition-colors font-medium py-2 text-left w-full"
>
GOVERNANCE
</button>
if (!isOpen) return null;

return createPortal(
<div className="fixed inset-0 backdrop-blur-xs z-50 flex items-center justify-center p-4">
{/* Frontends List */}
<div className="space-y-4">
{EXTERNAL_GOVERNANCE_FRONTENDS.map((frontend, index) => (
<FrontendItem key={index} frontend={frontend} />
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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