Repository navigation
feat: add FittedBox control - #46
Merged
Merged
Conversation
Add fitted_box/fittedbox helpers and the FittedBox wire type with fit, alignment, clip_behavior, content and the common layout keywords.
This was referenced Oct 28, 2026
2 tasks
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.
Adds the Ruby side of
FittedBox(Work Package F, item F4).Engine counterpart (renderer): AdamMusa/ruflet-engine#31
Usage
API
controls/shared/fittedbox_control.rb,RufletComponents::FittedBoxControl, TYPEfittedbox, WIREFittedBox.fitted_boxandfittedboxin both the shared and the top-level registry.fitted_box(content = nil, **props)andfittedboxare inmaterial_control_methods.rb,shared_control_forwarders.rbanddsl.rb.alignment clip_behavior content fitplus the common layout keywords. Events:on_animation_end,on_size_change.contain,centerandnoneapply.contentis not enforced in Ruby. As withrotated_box, nil content renders an empty box rather than raising, so a hidden or late-bound child cannot break the page.Tests
test/fitted_box_compatibility_test.rb(5 runs). It covers:_c, positional and keyword content, and the serialized props;Ruflet.control(:fitted_box)and theRuflet::DSLhelpers;has_handler?for the layout events;ArgumentError.verify_pr.shwithRUBY_PKGS="ruflet_core ruflet_rails": ruflet_core 146/146 files, 623 runs; ruflet_rails 15/15 files, 278 runs. The engine pair passes too (+720 tests, analyze clean). The wire-key audit shows 0 new findings.