Skip to content

feat: add stats box and delete all fields option#922

Open
swathisaravananan wants to merge 3 commits intodrawdb-io:mainfrom
swathisaravananan:feature/stats-box-and-delete-all-fields
Open

feat: add stats box and delete all fields option#922
swathisaravananan wants to merge 3 commits intodrawdb-io:mainfrom
swathisaravananan:feature/stats-box-and-delete-all-fields

Conversation

@swathisaravananan
Copy link

Summary

  • Added a Stats Box floating panel (bottom-left of canvas) showing live counts of tables, relationships, and max relationship depth
  • Added a "Delete all fields" button in each table's ... popover menu

Changes Made

  • src/components/StatsBox.jsx — new component with live stats and max depth algorithm
  • src/components/Workspace.jsx — renders StatsBox in canvas area
  • src/components/EditorCanvas/Table.jsx — added "Delete all fields" button in popover
  • src/i18n/locales/en.js — added delete_all_fields translation key

Testing Instructions

  1. Run npm run dev → open http://localhost:5173
  2. Create a few tables and relationships
  3. Verify the Stats Box (bottom-left) updates live
  4. Hover over a table → click ... → click "Delete all fields" → verify all fields removed
  5. Verify Ctrl+Z undoes each field deletion

- Add StatsBox component showing live diagram stats (tables, relationships, max depth)
- Add "Delete all fields" button in table popover menu
- Add delete_all_fields translation key to en.js

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 5, 2026

@swathisaravananan is attempting to deploy a commit to the dottle's projects Team on Vercel.

A member of the Team first needs to authorize it.

swathisaravananan and others added 2 commits March 5, 2026 14:42
- Install Vitest + happy-dom + React Testing Library
- 6 tests for computeMaxDepth (edge cases, cycles, branching)
- 5 tests for StatsBox component rendering
- 4 tests for delete-all-fields logic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Author

@swathisaravananan swathisaravananan left a comment

Choose a reason for hiding this comment

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

Reviewed.

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