Skip to content

Commit

Permalink
Implement ViewBox with manual measurement (#2397)
Browse files Browse the repository at this point in the history
* Implement ViewBox with manual measurement

Previously ViewBox delegated to FrameLayout. This worked okay
but it was potentially difficult to track behaviors between
View and UIView.

This implementation is based on the UIViewBox class implementation.

This fixes a bug where layouts incorrectly didn't handle changes
when modifiers were removed.

This changes how Box's margins are implemented. Previously the
margins were external, which required the hosting layout to
honor them as layout constraints. That was not supported when
the enclosing layout was a Row or Column.

* Sort imports
  • Loading branch information
squarejesse authored Oct 23, 2024
1 parent f377665 commit 5345799
Show file tree
Hide file tree
Showing 8 changed files with 239 additions and 141 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Changed:
Fixed:
- Fix a layout bug where children of fixed-with `Row` containers were assigned the wrong width.
- Fix inconsistencies between iOS and Android for `Column` and `Row` layouts.
- Correctly update the layout when a Box's child's modifiers are removed.

Breaking:
- Replace `CodeListener` with new functions in `RedwoodView`. This puts the loading/error/ready state with the UI that displays that state.
Expand Down
Loading

0 comments on commit 5345799

Please sign in to comment.