From e3e5f29214601c109c0af1be18b4000590d2c632 Mon Sep 17 00:00:00 2001 From: Lukas Oppermann Date: Mon, 19 Oct 2026 12:57:09 +0200 Subject: [PATCH 1/3] feat(hub): add sidebar feedback link Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6fbf160c-eede-4e16-adc5-29526ef4b5ee --- .../repository-navigation-item/index.tsx | 14 ++++++-- .../components/workspace-navigation/index.tsx | 35 +++++++++++++++++++ .../components/workspace-navigation/types.ts | 1 + .../repository-navigation/index.test.tsx | 10 ++++-- .../pages/new-prototype-page/index.test.tsx | 1 + .../pages/prototypes-show-page/index.test.tsx | 1 + .../repositories-show-page/index.test.tsx | 1 + .../fixtures/authenticated-header.ts | 1 + .../_hub_administration_navigation.json.props | 1 + hub/config/locales/gallery.en.yml | 1 + .../hub_administration_navigation_test.rb | 4 ++- 11 files changed, 65 insertions(+), 5 deletions(-) diff --git a/hub/app/javascript/components/repository-navigation-item/index.tsx b/hub/app/javascript/components/repository-navigation-item/index.tsx index 1e445fc..2c6ed95 100644 --- a/hub/app/javascript/components/repository-navigation-item/index.tsx +++ b/hub/app/javascript/components/repository-navigation-item/index.tsx @@ -11,10 +11,17 @@ type RepositoryNavigationItemProps = { | { href: string selected?: boolean + external?: boolean onClick?: MouseEventHandler expanded?: never } - | { href?: never; selected?: never; onClick: () => void; expanded: boolean } + | { + href?: never + selected?: never + external?: never + onClick: () => void + expanded: boolean + } ) /** Renders a sidebar destination or a control with the same row treatment. */ @@ -22,6 +29,7 @@ export function RepositoryNavigationItem({ ariaLabel, count, expanded, + external = false, href, icon: Icon, label, @@ -45,12 +53,14 @@ export function RepositoryNavigationItem({ return href !== undefined ? ( 0 ? "true" : undefined} data-active={selected ? "true" : undefined} aria-current={selected ? "page" : undefined} aria-label={ariaLabel} + target={external ? "_blank" : undefined} + rel={external ? "noopener noreferrer" : undefined} onClick={onClick} > {content} diff --git a/hub/app/javascript/components/workspace-navigation/index.tsx b/hub/app/javascript/components/workspace-navigation/index.tsx index 57a0886..c3f3129 100644 --- a/hub/app/javascript/components/workspace-navigation/index.tsx +++ b/hub/app/javascript/components/workspace-navigation/index.tsx @@ -9,6 +9,26 @@ import { RepositoryUserMenu } from "@components/repository-user-menu" import type { WorkspaceAccountData } from "./types" import "./styles.css" +function FeedbackIcon({ size = 16 }: { size?: number }) { + return ( + + ) +} + /** Keeps sidebar collapse and real account controls identical across navigation scopes. */ export function WorkspaceNavigation({ collapsed, @@ -36,6 +56,14 @@ export function WorkspaceNavigation({ onClick={() => onCollapsedChange(!collapsed)} /> ) + const feedbackLink = ( + + ) return (