feat(api): inline checkboxes + swappable checkmark/arrow designs (@since 1.7.0)#131
Merged
Conversation
Add InlineShapeRun for inline geometric figures (dots, arrows, chevrons, diamonds, triangles, stars, checkmarks, plus, regular polygons) drawn on the text baseline from geometry, not font glyphs. Introduce ShapeOutline.Polygon + ShapePoint with a family of factories usable both block-level (ShapeContainer) and inline; DSL shortcuts on ParagraphBuilder/RichText/ShapeContainerBuilder. Additive only, zero breaking changes.
1.7.0) - InlineShapeRun is now a ShapeLayer stack; checkbox(size, checked, ...) draws a rounded frame plus, when checked, a centred tick — checked/unchecked todo markers. - ShapeOutline adds CheckmarkStyle {CLASSIC, HEAVY} and ArrowStyle {BLOCK, TRIANGLE} with checkmark(w,h,style) / arrow(w,h,dir,style) overloads; no-style factories delegate to the defaults, so the look is unchanged. checkbox also takes a raw mark. - RichText / ParagraphBuilder gain matching overloads; dense band geometry lives in package-private ShapeRings. - Example checklist + variants; README, committed preview and CHANGELOG updated.
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
Finalizes the interrupted inline-checkbox work and adds an additive,
@since 1.7.0shape-design seam. No breaking changes (japicmp clean); default look byte-for-byte unchanged.InlineShapeRunis now aShapeLayerstack;checkbox(size, checked, …)draws a rounded frame plus, when checked, a centred tick — todo / checklist markers ("some done, some not").ShapeOutline.CheckmarkStyle {CLASSIC, HEAVY}+ArrowStyle {BLOCK, TRIANGLE}withcheckmark(w,h,style)/arrow(w,h,dir,style)overloads; no-style factories delegate to the defaults.checkboxalso accepts a rawShapeOutlinemark. Foundation for a future "pick your tick/arrow" UI.RichText/ParagraphBuilder; dense band geometry isolated in package-privateShapeRings.Render
InlineShapesExamplegains a checklist (checked + unchecked) and a variants row; committed previewassets/readme/examples/inline-shapes.pdf+ example README refreshed.Tests / gate
./mvnw verify -pl .green — 1111 tests, japicmp + javadoc clean. AddedShapeRingsTestplus checkbox/variant cases acrossShapeOutlineTest/InlineShapeRunTest/RichTextTest/InlineShapeRenderTest.