Skip to content

improvement(tables): disable the default view's delete action with a tooltip - #6897

Merged
j15z merged 1 commit into
stagingfrom
fix/default-view-delete-tooltip
Aug 20, 2026
Merged

improvement(tables): disable the default view's delete action with a tooltip#6897
j15z merged 1 commit into
stagingfrom
fix/default-view-delete-tooltip

Conversation

@j15z

@j15z j15z commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Show the Delete action on the default view as disabled and dimmed instead of hiding it
  • Hovering it shows a tooltip: "Default view cannot be deleted"
  • Uses aria-disabled rather than the disabled attribute so the button keeps hover/focus events for the tooltip and stays hidden in the row's resting state; clicks are swallowed instead of deleting or falling through to row selection
  • Suppresses the hover background on the inert button so it doesn't read as clickable

Type of Change

  • Improvement

Testing

Views-menu unit tests updated and passing; lint and the full audit suite pass

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 20, 2026 8:03pm

Request Review

@cursor

cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Small views-menu UI change only; delete remains blocked for the default view with no backend or data-model impact.

Overview
Shows Delete on the default table view as a dimmed, inert action instead of hiding it, with a hover tooltip: “Default view cannot be deleted.”

Uses aria-disabled (not the native disabled attribute) so the button still receives hover/focus for the tooltip, stays hidden at rest, and swallows clicks without deleting or selecting the row. Tests now assert both Delete buttons, the disabled default, and that onDelete is not called.

Reviewed by Cursor Bugbot for commit 130db81. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR keeps the default view’s Delete action visible but inert, with dimmed styling and an explanatory tooltip.

  • Adds a disabled reason to the default view’s Delete action.
  • Uses aria-disabled and explicitly swallows activation while retaining hover and focus behavior.
  • Updates unit coverage to verify the action is rendered and does not invoke deletion.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or non-blocking defects identified.

The disabled action remains focusable and hoverable for its tooltip, while its click path prevents default behavior, stops propagation, and returns before deletion.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/views-menu/views-menu.tsx Adds a tooltip-wrapped, aria-disabled Delete action for default views while preserving event suppression and hidden-row action behavior.
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/views-menu/views-menu.test.tsx Updates the ViewsMenu test to assert that both Delete actions render and that activating the default view’s action does not call the deletion callback.

Reviews (1): Last reviewed commit: "improvement(tables): disable the default..." | Re-trigger Greptile

@j15z
j15z merged commit 43850e3 into staging Aug 20, 2026
30 checks passed
@j15z
j15z deleted the fix/default-view-delete-tooltip branch August 20, 2026 20:15
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.

1 participant