Skip to content

feat(ui): close resource and Helm drawers by clicking outside#361

Open
SaviorVirus wants to merge 1 commit intoskyhook-io:mainfrom
SaviorVirus:feat/close-drawer-on-backdrop-click
Open

feat(ui): close resource and Helm drawers by clicking outside#361
SaviorVirus wants to merge 1 commit intoskyhook-io:mainfrom
SaviorVirus:feat/close-drawer-on-backdrop-click

Conversation

@SaviorVirus
Copy link
Copy Markdown
Contributor

Add a transparent backdrop overlay behind the resource detail drawer and Helm release drawer so users can dismiss them by clicking any empty area, instead of having to click the same row again.

Made-with: Cursor

Description

Currently, to close the resource detail drawer or Helm release drawer, users had to click the same row that opened it (or the X button). This PR adds a transparent backdrop overlay behind both drawers so clicking anywhere on the empty area to the left dismisses them — a more intuitive UX pattern.

Changes:

  • packages/k8s-ui/src/components/workload/ResourceDetailDrawer.tsx — backdrop is hidden when the drawer is expanded to full-screen WorkloadView to prevent accidental dismissal
  • web/src/components/helm/HelmReleaseDrawer.tsx — same backdrop added

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

How has this been tested?

  • Tested locally with a remote cluster (EKS)
  • Opened a resource in the Resources view → clicked empty area to the left of the drawer → it closed
  • Opened a Helm release → clicked empty area to the left → it closed
  • Expanded resource drawer to full WorkloadView → confirmed backdrop is not shown (no accidental close)
  • Confirmed X button and row click still work as before

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my code
  • I have added comments where necessary
  • My changes generate no new warnings
  • Any dependent changes have been merged

Related issues

N/A

Add a transparent backdrop overlay behind the resource detail drawer
and Helm release drawer so users can dismiss them by clicking any
empty area, instead of having to click the same row again.

Made-with: Cursor
Copy link
Copy Markdown
Contributor

@nadaverell nadaverell left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

I think this makes sense on the topology view where clicking empty space feels like it should dismiss the drawer, but not so much on the resource and helm views. There it was intentional that users can click through different rows to switch the drawer content.

In those, we have 3 close mechanisms - X button, Escape, clicking the same row.

If we want click-outside-to-close specifically for the topology graph, that could be handled at the graph canvas level rather than with a global backdrop.

@nadaverell
Copy link
Copy Markdown
Contributor

Hey @SaviorVirus, friendly ping — any thoughts on scoping click-outside to the topology canvas?

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