Repository navigation
SectionRail now positions itself inside the container you place it in, rather than against the
screen, and its panel opens flush with the rail wherever that container sits.
Added
edgeson SectionRail, and theSectionRailEdgestype. It sets each edge of the rail
relative to its container, for clearing chrome that floats over the content, such as a
transparent header or the home indicator below a full-height screen. Each edge defaults to0.
Changed
- SectionRail no longer reads the safe area. The rail used to subtract the device's safe-area
insets itself, so inside a container that already avoids them (a native header, a
SafeAreaView, a tab screen) the insets were taken twice and the rail sat away from its
corner. It now positions within its container, and the container owns the safe area. A rail in
a container that runs to the edge of the screen needs the insets passed in, for example
edges={{ bottom: insets.bottom }}fromuseSafeAreaInsets()for a bottom-aligned rail.
offsetis now the gap from the container's edge. Reported and fixed by @techzealot in
#322 and
#323.
Fixed
- The SectionRail panel opens against its rail. The panel is drawn in a portal above the
screen and used to position itself from the screen's insets plus a fixed 12-point gap, so it
ignoredoffsetand drifted from any rail not at the screen's edge. It now takes its position
and height from the rail's measured frame, follows rotation and window resizes, and anchors to
the correct edge in right-to-left layouts.
(#323)
Contributors
Thanks to @techzealot for the report and the fix.
Full changelog: v1.5.0...v1.6.0