feat: add toolbar alignment option and export watermark support#21
Closed
devin-ai-integration[bot] wants to merge 4 commits into
Closed
feat: add toolbar alignment option and export watermark support#21devin-ai-integration[bot] wants to merge 4 commits into
devin-ai-integration[bot] wants to merge 4 commits into
Conversation
- 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>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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>
Author
|
Closing due to inactivity for more than 7 days. Configure here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Why is this change needed?
This PR addresses two enhancements for the ERD viewer:
Toolbar Alignment: When the side panel is expanded with concertinas open, it covers the toolbar when left-aligned. This adds a
toolbarAlignmentprop with options 'left', 'center', 'right' (defaulting to 'center') to prevent overlap.Export Watermark Support: Adds PNG and PDF export functionality with configurable watermark logo placement. Users can pass
printExportLogo(logo URL/data) andprintExportLogoPosition('top-left', 'top-right', 'bottom-left', 'bottom-right') through the AppBarConfig.Changes
toolbarAlignmentprop to ERDRenderer with CSS classes for positioninghtml-to-imageandjspdfdependencies for export functionalityuseExportDiagramhook with neverthrow Result typesExportConfigContextfor passing export configurationAppBarConfig.exportwithprintExportLogoandprintExportLogoPositionpropsHuman Review Checklist
handleExportPngandhandleExportPdffunctions in ExportDropdown.tsx use try/catch, butexportToPng/exportToPdfreturnResult<void, Error>types. The Result errors won't be caught - should checkresult.isErr()insteadhtml-to-imageandjspdfdependenciesLink to Devin run: https://app.devin.ai/sessions/85752c3e02a04b2ab02c3c2eae1287f0
Requested by: Christian Screen (@christian-screen)