Skip to content

PAM Native 1.46.6

Choose a tag to compare

@DavidWilliamBalbino DavidWilliamBalbino released this 29 Oct 21:30
· 273 commits to main since this release

PAM Native 1.46.6 (on top of 1.46.5).

RN layout/text parity and Android list/media fixes on top of 1.46.5, no protocol change.

  • Layout: a stretched flex item is bounded by its own min/max cross size
    like Yoga, so a max-width child of a column (View or Text) wraps its
    text at that width instead of the column's.

  • Android Input font sizes are whole (ceiled) pixels like React Native's
    TextInput (15sp at 2.625 draws at 40 px, not 39.375).

  • Android text: numberOfLines="1" lays the text out as one unwrapped line
    (horizontally scrolling TextView, no input or marquee change), so the tail
    ellipsis cuts mid-word like React Native ("hoje à…") instead of breaking
    at the last word first and dropping text that fits ("hoje …"). Head and
    middle ellipsize modes now work on single lines too.

  • Android media in scrolling (not paged) lists prepares its player when the
    view shows on screen and the list is not flinging, instead of when the row
    is bound ahead of the viewport (S23 feed: PSS 389 -> 310 MB, p99 32 -> 23 ms,
    janky 3.84% -> 2.57%). Pagers (reels) keep preparing their next page.

  • Android media: a player lets go of its video surface on its own thread
    before the surface (and texture) is released, and its owner thread
    outlives the release by 3 s, so a codec still starting never writes into
    an abandoned queue (CodecException, "flush() ... at Released state") and
    late codec events never hit a dead thread. PamMediaChurnInstrumentedTest.

  • Android lists: a page landing above the rows on screen (older history)
    never moves or rebuilds them: window reports made before the rows changed
    are recognized (@first,last,rows) and ignored, a full rebind keeps the
    first visible row by id, and the row-index anchor (for placeholder runs)
    no longer applies to single rows (it jumped by the rows that joined).

  • Android: during a fling, windowed lists ask for rows three screens ahead.

  • windowSize lists follow their rows by key when rows join or leave
    before the window (an older page above a conversation): the rows on screen
    stay built instead of being released and replaced (a visible swap/jump).

  • Android: media players run under a manifest-declared media attribution
    tag (Samsung logged an AppOps "attributionTag not declared" error per
    playback). Debug builds: setprop log.tag.PamCellPerf DEBUG profiles each
    list cell bind (create, attach, properties per key, events, layout).

  • windowSize lists: a row released by the window keeps its native node
    (its placeholder takes the row's root kind), so the list keeps its anchor
    and pixel position; a list opened with initialScrollIndex past its end
    plans its first window around the end.

  • Android virtual lists: a scroll to a cell anchors on that cell (estimated
    placeholder heights above it no longer move the target away); a windowed
    list keeps a visible single row in place when rows join above it (the row
    index anchor used to jump by those rows).

  • Navigation focus follows the first mount: a screen opened through
    Route::navigate() (or any router entry) now gets
    NavigationLifecycleAware::navigationFocused() after setup() and
    onMounted(), then its onFocus() hooks, as in Vue/React Navigation.
    Previously navigationFocused() ran before the first render, so a focus
    handler using something setup() created saw it unset. Blur, back,
    kept-alive, modal and tab ordering are unchanged; a screen left before its
    first mount gets neither focus nor blur.

  • Windowed virtual lists opened with initialScrollIndex past the last row
    (a conversation opening at its newest message) materialize their last rows
    instead of the first 48 (PHP and the Android/iOS native encoder).

  • Android: a virtual list row re-measured while the list rests keeps the
    first fully visible row at its pixel offset (a partly hidden top row that
    grew used to push every row on screen).

  • Android debug builds: adb shell setprop log.tag.PamListTrace DEBUG logs
    each drawn frame's visual row motion of virtual lists (dy, rows in common,
    scroll state), a recording-free way to prove there are no jumps or snaps.

  • Virtual lists (Android): a scrollRequest committed while the user's own
    drag or fling moves the list is dropped unless the user asked for it (a
    press, long press or submit since the gesture began, e.g. send or "jump to
    latest"). Anchor-style requests issued while a window shifted cut flings
    short and jumped the list; run after the fling they snapped it at rest.

  • Android: rows prepended right below a leading row on screen (a header, a
    "loading older" row) keep the first row after them at its pixel offset,
    like any prepend above the viewport (RecyclerView kept the header and
    pushed the content down). New docs section "Native scrolling guarantees of
    long lists", PHP test list_native_scroll.php, Android
    PamListNativeScrollInstrumentedTest and PamHeadInsertAnchorTest.

  • Android: the per-frame "Received a PHP render frame" log is verbose and
    compiled out of release builds (NDEBUG); debug PamNativePerf lines now
    show each commit's own kind and sizes (frame=, frameIn=, frameOut=)
    next to the engine totals (totalFull=, totalPatch=, totalInBytes=),
    which used to read like per-frame values.

  • Shared elements between a screen and a <Modal> (the component, not a
    route), with the same shared tag and no app code: opening the Modal flies
    every tag on screen below into it, and closing it (visible false or
    unmounted) flies its tags home to the instance they came from. Media reuse
    the decoded picture and morph frame, crop and radius; a launchOnTap()
    flight is handed to the Modal the tap opened; a view released by
    Drag::holdAt(...) flies home from where it was let go. The Modal fades in
    step with the flights, an unmounted Modal keeps its window (untouchable)
    until they land, and a Modal over a Modal pairs with the one below
    (Android; iOS keeps the Modal animation for now).

  • A shared element flies home to the instance it left from while that
    instance is still on screen, even when the last touch was elsewhere (a close
    button), and the touch that picks among repeated tags is tracked on screen
    coordinates across windows.