feat: convert namespace detail to right-side drawer panel
Replace the standalone namespace detail route with an inline drawer panel that slides in from the right when clicking a namespace in the list view. This provides a more fluid UX without full page navigation. Changes: - Namespace detail now opens in a fixed-position right-side panel (600px width) - Added semi-transparent backdrop that closes the panel when clicked - Converted namespace links to buttons with proper click handlers - Removed /polaris/ns/:namespace route and NamespaceDetailView import - Updated tests to check for buttons instead of links - Panel includes close button (×) in header Technical details: - Uses React state (selectedNamespace) instead of route params - Panel styled with fixed positioning, z-index layering, and box shadow - Backdrop at z-index 1100, panel at 1200 to overlay content - No MUI imports (stays within Headlamp CommonComponents constraint) Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -117,7 +117,7 @@ describe('NamespacesListView', () => {
|
||||
expect(screen.getByText('No Polaris audit results found.')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders namespace rows with correct scores and links', () => {
|
||||
it('renders namespace rows with correct scores and buttons', () => {
|
||||
const data = makeAuditData([
|
||||
makeResult({
|
||||
Name: 'deploy-a',
|
||||
@@ -157,12 +157,14 @@ describe('NamespacesListView', () => {
|
||||
|
||||
renderWithRouter(<NamespacesListView />);
|
||||
|
||||
// Namespace links
|
||||
const alphaLink = screen.getByText('alpha');
|
||||
expect(alphaLink.closest('a')).toHaveAttribute('href', '/polaris/ns/alpha');
|
||||
// Namespace buttons (now buttons instead of links for drawer)
|
||||
const alphaButton = screen.getByText('alpha');
|
||||
expect(alphaButton).toBeInTheDocument();
|
||||
expect(alphaButton.tagName).toBe('BUTTON');
|
||||
|
||||
const betaLink = screen.getByText('beta');
|
||||
expect(betaLink.closest('a')).toHaveAttribute('href', '/polaris/ns/beta');
|
||||
const betaButton = screen.getByText('beta');
|
||||
expect(betaButton).toBeInTheDocument();
|
||||
expect(betaButton.tagName).toBe('BUTTON');
|
||||
});
|
||||
|
||||
it('uses correct scoreStatus: >=80 success, >=50 warning, <50 error', () => {
|
||||
|
||||
Reference in New Issue
Block a user