Skip to content

feat: add toolbar alignment option and export watermark support#21

Closed
devin-ai-integration[bot] wants to merge 4 commits into
mainfrom
devin/1769719710-toolbar-alignment-export-watermark
Closed

feat: add toolbar alignment option and export watermark support#21
devin-ai-integration[bot] wants to merge 4 commits into
mainfrom
devin/1769719710-toolbar-alignment-export-watermark

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Issue

  • resolve: N/A (feature request from user)

Why is this change needed?

This PR addresses two enhancements for the ERD viewer:

  1. Toolbar Alignment: When the side panel is expanded with concertinas open, it covers the toolbar when left-aligned. This adds a toolbarAlignment prop with options 'left', 'center', 'right' (defaulting to 'center') to prevent overlap.

  2. Export Watermark Support: Adds PNG and PDF export functionality with configurable watermark logo placement. Users can pass printExportLogo (logo URL/data) and printExportLogoPosition ('top-left', 'top-right', 'bottom-left', 'bottom-right') through the AppBarConfig.

Changes

  • Added toolbarAlignment prop to ERDRenderer with CSS classes for positioning
  • Added html-to-image and jspdf dependencies for export functionality
  • Created useExportDiagram hook with neverthrow Result types
  • Created ExportConfigContext for passing export configuration
  • Added "Download PNG" and "Download PDF" options to Export dropdown
  • Extended AppBarConfig.export with printExportLogo and printExportLogoPosition props

Human Review Checklist

  • Bug in error handling: The handleExportPng and handleExportPdf functions in ExportDropdown.tsx use try/catch, but exportToPng/exportToPdf return Result<void, Error> types. The Result errors won't be caught - should check result.isErr() instead
  • Verify toolbar alignment CSS works correctly when side panel is expanded
  • Review bundle size impact from html-to-image and jspdf dependencies
  • Test watermark positioning with different logo sizes and positions

Link to Devin run: https://app.devin.ai/sessions/85752c3e02a04b2ab02c3c2eae1287f0
Requested by: Christian Screen (@christian-screen)

- Add toolbarAlignment prop to ERDRenderer with 'left', 'center', 'right' options (default: 'center')
- Add CSS classes for toolbar positioning
- Add PNG and PDF export functionality with watermark logo support
- Add printExportLogo and printExportLogoPosition props to AppBarConfig
- Create useExportDiagram hook with neverthrow Result types
- Create ExportConfigContext for passing export configuration

Co-Authored-By: Christian Screen <devteamlead@aicg.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration Bot and others added 3 commits January 29, 2026 20:59
Co-Authored-By: Christian Screen <devteamlead@aicg.com>
… in AppBar

Co-Authored-By: Christian Screen <devteamlead@aicg.com>
Co-Authored-By: Christian Screen <devteamlead@aicg.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

Closing due to inactivity for more than 7 days. Configure here.

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.

0 participants