feat: add dynamic font sizing to event storming sticky notes (fixes #40)#41
Merged
feat: add dynamic font sizing to event storming sticky notes (fixes #40)#41
Conversation
Implements real-time font size adjustment to prevent text overflow in sticky notes (fixes #40). Font size automatically scales between 10px and 16px based on text length and available space. - Add calculateFontSize() function with character width estimation - Calculate font size dynamically in component render (no stored state) - Use consistent padding values (8px horizontal, 16px vertical) - Update textWidth to use availableWidth for consistency The implementation follows Miro-style behavior where text shrinks to fit the card rather than overflowing or expanding the card.
Contributor
Deploying ddd-toolbox with
|
| Latest commit: |
1302f37
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e4f84cad.ddd-toolbox.pages.dev |
| Branch Preview URL: | https://fix-issue-40-dynamic-font-si.ddd-toolbox.pages.dev |
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.
Summary
Implements real-time dynamic font sizing for event storming sticky notes to prevent text overflow (fixes #40). The font size automatically scales between 10px and 16px based on text length and available space, similar to how Miro handles text in cards.
Changes
calculateFontSize()helper function: Estimates optimal font size based on character width and available spacetextWidth: UsesavailableWidthvariable for consistency with font size calculationsImplementation Details
The
calculateFontSizefunction:Test Plan
Behavior
Closes #40