Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

refactor: unify snapshot and edgelist export to use ExportActions pattern - #114

Merged
sauravbhattacharya001 merged 1 commit into
masterfrom
refactor/toolbar-export-consistency
Mar 28, 2026
Merged

sauravbhattacharya001 merged 1 commit into
masterfrom
refactor/toolbar-export-consistency

Conversation

@sauravbhattacharya001

Copy link
Copy Markdown
Owner

The snapshot and edgelist export buttons used an old, buggy save-dialog pattern with a do-while loop that showed error messages instead of proper overwrite confirmation. All other 7 export buttons already used the centralized ExportActions.addExportButton() pattern.

Changes

  • Refactored addSnapshotButton to use ExportActions.addExportButton
  • Refactored addEdgelistExportButton to use ExportActions.addExportButton
  • Added FileNotFoundException check for missing graph.txt source file
  • Fixed typo: 'take and image' → 'take an image'
  • Removed unused LOGGER field and imports (Level, Supplier, Logger)

Impact

  • -41 lines of duplicated dialog/error-handling code
  • Consistent UX across all export buttons (overwrite confirmation instead of error loop)
  • Better error reporting (IOException shown in dialog vs silently logged)

…tern

The snapshot and edgelist export buttons used an old, buggy save-dialog
pattern with a do-while loop that showed 'File already exists!!!' errors
instead of proper overwrite confirmation. All other export buttons already
used the centralized ExportActions.addExportButton() pattern which provides:
- Consistent overwrite confirmation dialog
- Automatic file extension appending
- Proper error handling with logged exceptions
- Uniform button sizing and UX

Changes:
- Refactored addSnapshotButton to use ExportActions.addExportButton
- Refactored addEdgelistExportButton to use ExportActions.addExportButton
- Added FileNotFoundException check for missing graph.txt source
- Fixed typo 'take and image' -> 'take an image'
- Removed unused LOGGER field and imports (Level, Supplier, Logger)
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added visualization Graph visualization and UI size/m labels Mar 23, 2026
@sauravbhattacharya001
sauravbhattacharya001 merged commit b8fc5b0 into master Mar 28, 2026
4 of 8 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size/m visualization Graph visualization and UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant