FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: size native list row roots to fill their cells, and repair E2E CI · pythonnative/pythonnative@b8ec0e2 · GitHub

Repository navigation

Commit b8ec0e2

Browse files
committed
fix: size native list row roots to fill their cells, and repair E2E CI
1 parent b10e300 commit b8ec0e2

4 files changed

Lines changed: 27 additions & 1 deletion

File tree

‎.github/workflows/e2e.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ jobs:
142142
run: |
143143
curl -Ls "https://get.maestro.mobile.dev" | bash
144144
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
145-
brew tap facebook/fb && brew install idb-companion
145+
# Homebrew refuses formulae from untrusted third-party taps by
146+
# default; trust the tap explicitly before installing.
147+
brew tap facebook/fb && brew trust facebook/fb && brew install idb-companion
146148
147149
- name: Build and run E2E tests
148150
run: ./scripts/run-e2e.sh ios ${{ matrix.suites }}

‎src/pythonnative/native_views/android.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3052,6 +3052,13 @@ def mountRow(self, position: int, container: Any, width_dp: float, height_dp: fl
30523052
)
30533053
if root is not None:
30543054
_insert_view(container, root, 0)
3055+
# The layout engine frames only the *descendants*
3056+
# of a subtree root (screen hosts normally size
3057+
# the root themselves), so the row root would
3058+
# otherwise keep the 0x0 params ``_insert_view``
3059+
# assigns and render as nothing. Fill the cell.
3060+
FrameLP = jclass("android.widget.FrameLayout$LayoutParams")
3061+
root.setLayoutParams(FrameLP(FrameLP.MATCH_PARENT, FrameLP.MATCH_PARENT))
30553062
except Exception:
30563063
import traceback
30573064

‎src/pythonnative/native_views/ios.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4050,6 +4050,15 @@ def _table_cell_imp(self_ptr: int, cmd_ptr: int, tv_ptr: int, ip_ptr: int) -> in
40504050
root = pool.bind(content_key, lambda: render_row(row), cell_w, row_h)
40514051
if root is not None:
40524052
content.addSubview_(root)
4053+
# The layout engine frames only the *descendants*
4054+
# of a subtree root (screen hosts normally size
4055+
# the root themselves), so the row root would
4056+
# otherwise keep its zero frame and render as
4057+
# nothing. Fill the cell.
4058+
try:
4059+
root.setFrame_(((0, 0), (cell_w, row_h)))
4060+
except Exception:
4061+
pass
40534062
except Exception:
40544063
print(f"[VirtualList][iOS] mount for row={row} raised:")
40554064
_tb.print_exc()

‎tests/e2e/flows/components/text.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ appId: ${APP_ID}
1616
# Rich text: three nested spans flatten into one native label whose
1717
# plain text is the concatenation of the parts.
1818
- assertVisible: "Rich start bold middle red end"
19+
# The rich-text section pushes "Back to list" below the fold on the
20+
# shorter emulator viewports; close_demo taps it without scrolling,
21+
# so surface it first (no-ops when it's already visible).
22+
- scrollUntilVisible:
23+
element:
24+
text: "Back to list"
25+
direction: DOWN
26+
timeout: 20000
1927
- runFlow:
2028
file: ../../helpers/close_demo.yaml
2129
env:

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL