| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c588d11 commit d8ab818
23 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,11 +32,11 @@ jobs: | |||
| 32 | 32 | # app, dies). Sharding the run into a few balanced groups, each on | |
| 33 | 33 | # its own freshly booted emulator, keeps every session under the | |
| 34 | 34 | # limit, and parallelizes the Android pass as a bonus. Groups are | |
| 35 | - # sized so none exceeds ~12 heavy flows: ``components`` (35 flows | ||
| 36 | - # after the graphics additions) dropped offline at ~11.5 minutes | ||
| 37 | - # when split in two, so it runs as three parts; ``hooks`` (23 quick | ||
| 38 | - # flows, ~10 minutes of driving) gets a dedicated emulator; the | ||
| 39 | - # remaining categories are grouped to similar totals. | ||
| 35 | + # sized to about nine minutes of driving or less: ``components`` | ||
| 36 | + # (39 flows) runs as three parts; ``hooks`` (26 flows) dropped | ||
| 37 | + # offline at ~11.5 minutes in one session, so it runs as two parts; | ||
| 38 | + # the remaining categories pair up to similar totals, and ``misc`` | ||
| 39 | + # (14 flows) runs alone. | ||
| 40 | 40 | # ``fail-fast: false`` so one shard's failure still lets the others | |
| 41 | 41 | # report. | |
| 42 | 42 | strategy: | |
@@ -49,12 +49,18 @@ jobs: | |||
| 49 | 49 | suites: components-b | |
| 50 | 50 | - name: components-c | |
| 51 | 51 | suites: components-c | |
| 52 | - - name: hooks | ||
| 53 | - suites: hooks | ||
| 54 | - - name: nav-gestures-layout-styling | ||
| 55 | - suites: navigation gestures layout styling | ||
| 56 | - - name: anim-misc | ||
| 57 | - suites: animations assets misc | ||
| 52 | + - name: hooks-a | ||
| 53 | + suites: hooks-a | ||
| 54 | + - name: hooks-b | ||
| 55 | + suites: hooks-b | ||
| 56 | + - name: nav-gestures | ||
| 57 | + suites: navigation gestures | ||
| 58 | + - name: layout-styling | ||
| 59 | + suites: layout styling | ||
| 60 | + - name: anim-assets | ||
| 61 | + suites: animations assets | ||
| 62 | + - name: misc | ||
| 63 | + suites: misc | ||
| 58 | 64 | - name: inbox | |
| 59 | 65 | suites: inbox | |
| 60 | 66 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | Focusing the field brings up the software keyboard; ``Keyboard.add_listener`` | |
| 4 | 4 | mirrors every [`KeyboardEvent`][pythonnative.KeyboardEvent] into the | |
| 5 | 5 | readouts, ``Keyboard.is_visible()`` answers the current state, and the | |
| 6 | - "Dismiss keyboard" button (outside the field) calls ``Keyboard.dismiss()``, | ||
| 6 | + "Dismiss keyboard" button (above the field) calls ``Keyboard.dismiss()``, | ||
| 7 | 7 | which resigns the focused input so ``on_blur`` fires and the visibility | |
| 8 | 8 | readout flips back to "no". | |
| 9 | 9 | """ | |
@@ -44,6 +44,9 @@ def dismiss() -> None: | |||
| 44 | 44 | "Keyboard.is_visible, add_listener, and dismiss.", | |
| 45 | 45 | section( | |
| 46 | 46 | "Keyboard module", | |
| 47 | + # The button sits above the field: the software keyboard covers | ||
| 48 | + # the lower half of a short screen while the field is focused. | ||
| 49 | + pn.Button("Dismiss keyboard", on_press=dismiss), | ||
| 47 | 50 | result_text("Focused", "ON" if focused else "OFF"), | |
| 48 | 51 | result_text("Keyboard visible", "yes" if visible else "no"), | |
| 49 | 52 | result_text("Keyboard events", events), | |
@@ -64,7 +67,6 @@ def dismiss() -> None: | |||
| 64 | 67 | font_size=16, | |
| 65 | 68 | ), | |
| 66 | 69 | ), | |
| 67 | - pn.Button("Dismiss keyboard", on_press=dismiss), | ||
| 68 | 70 | hint("Maestro focuses the field, then dismisses the keyboard from Python."), | |
| 69 | 71 | ), | |
| 70 | 72 | ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,9 +1,11 @@ | |||
| 1 | 1 | """Demo screen for [`pn.use_reduce_motion`][pythonnative.use_reduce_motion]. | |
| 2 | 2 | ||
| 3 | 3 | The hook mirrors the system Reduce Motion setting and re-renders when it | |
| 4 | - changes. CI emulators run with the setting off, so the flow asserts | ||
| 5 | - "no"; the demo also shows how an app would shorten an animation when it | ||
| 6 | - is on. | ||
| 4 | + changes. The setting differs between CI devices (Android reports it on | ||
| 5 | + when animations are disabled, as CI's emulator runs), so the flow checks | ||
| 6 | + that the hook agrees with ``AccessibilityInfo.is_reduce_motion_enabled()`` | ||
| 7 | + rather than a fixed value. The demo also shows how an app would shorten | ||
| 8 | + an animation when the setting is on. | ||
| 7 | 9 | """ | |
| 8 | 10 | ||
| 9 | 11 | from __future__ import annotations | |
@@ -17,6 +19,7 @@ def UseReduceMotionDemo() -> pn.Element: | |||
| 17 | 19 | """Render the Reduce Motion flag and the animation duration derived from it.""" | |
| 18 | 20 | reduce_motion = pn.use_reduce_motion() | |
| 19 | 21 | duration = 0 if reduce_motion else 300 | |
| 22 | + agrees = reduce_motion == pn.AccessibilityInfo.is_reduce_motion_enabled() | ||
| 20 | 23 | ||
| 21 | 24 | return demo_screen( | |
| 22 | 25 | "use_reduce_motion", | |
@@ -25,6 +28,7 @@ def UseReduceMotionDemo() -> pn.Element: | |||
| 25 | 28 | "Reduce motion", | |
| 26 | 29 | result_text("Reduce motion", "yes" if reduce_motion else "no"), | |
| 27 | 30 | result_text("Animation duration", duration), | |
| 28 | - hint("Maestro asserts 'Reduce motion: no' on the stock emulator."), | ||
| 31 | + result_text("Matches AccessibilityInfo", "yes" if agrees else "no"), | ||
| 32 | + hint("Maestro checks the hook against AccessibilityInfo on any device."), | ||
| 29 | 33 | ), | |
| 30 | 34 | ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -117,6 +117,21 @@ def _run() -> None: | |||
| 117 | 117 | result_text("Guard", "ON" if guard else "OFF"), | |
| 118 | 118 | result_text("Vetoes", vetoes), | |
| 119 | 119 | result_text("Last veto", last_veto), | |
| 120 | + # The controls sit above the nested stack: a short screen can't show | ||
| 121 | + # the readouts, the stack, and three rows of buttons at once, and the | ||
| 122 | + # flow reads the stack's header titles from its top edge. | ||
| 123 | + buttons_row( | ||
| 124 | + pn.Button("Push Compose", on_press=act("push", "Compose")), | ||
| 125 | + pn.Button("Push Preview", on_press=act("push", "Preview")), | ||
| 126 | + ), | ||
| 127 | + buttons_row( | ||
| 128 | + pn.Button("Push Plain", on_press=act("push", "Plain")), | ||
| 129 | + pn.Button("Pop to Home", on_press=act("pop_to", "Home")), | ||
| 130 | + ), | ||
| 131 | + buttons_row( | ||
| 132 | + pn.Button("Enable guard", on_press=lambda: set_guard(True)), | ||
| 133 | + pn.Button("Disable guard", on_press=lambda: set_guard(False)), | ||
| 134 | + ), | ||
| 120 | 135 | pn.View( | |
| 121 | 136 | _Bus.Provider( | |
| 122 | 137 | _Stack.Navigator( | |
@@ -136,18 +151,6 @@ def _run() -> None: | |||
| 136 | 151 | ), | |
| 137 | 152 | style=pn.style(height=200, border_radius=8, background_color="#F8FAFC", overflow="hidden"), | |
| 138 | 153 | ), | |
| 139 | - buttons_row( | ||
| 140 | - pn.Button("Push Compose", on_press=act("push", "Compose")), | ||
| 141 | - pn.Button("Push Preview", on_press=act("push", "Preview")), | ||
| 142 | - ), | ||
| 143 | - buttons_row( | ||
| 144 | - pn.Button("Push Plain", on_press=act("push", "Plain")), | ||
| 145 | - pn.Button("Pop to Home", on_press=act("pop_to", "Home")), | ||
| 146 | - ), | ||
| 147 | - buttons_row( | ||
| 148 | - pn.Button("Enable guard", on_press=lambda: set_guard(True)), | ||
| 149 | - pn.Button("Disable guard", on_press=lambda: set_guard(False)), | ||
| 150 | - ), | ||
| 151 | 154 | hint("Header titles: screen beats group beats navigator. The guard vetoes pop_to."), | |
| 152 | 155 | ), | |
| 153 | 156 | ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,15 +6,22 @@ | |||
| 6 | 6 | from typing import Any, Callable, Literal | |
| 7 | 7 | from pythonnative.mutations import UNSET, UnsetType | |
| 8 | 8 | from pythonnative.sdk.types import decode_value, resolve_type | |
| 9 | + from pythonnative.style import DynamicColor as PNDynamicColor | ||
| 9 | 10 | from pythonnative.style import EdgeInsets as PNEdgeInsets | |
| 10 | 11 | from inbox_extension import InboxBatch as PNInboxBatch | |
| 11 | 12 | from inbox_extension import InboxRecord as PNInboxRecord | |
| 12 | 13 | from pythonnative.style import ShadowOffset as PNShadowOffset | |
| 13 | 14 | from pythonnative.style import Style as PNStyle | |
| 15 | + from pythonnative.style import TransformPerspective as PNTransformPerspective | ||
| 14 | 16 | from pythonnative.style import TransformRotate as PNTransformRotate | |
| 17 | + from pythonnative.style import TransformRotateX as PNTransformRotateX | ||
| 18 | + from pythonnative.style import TransformRotateY as PNTransformRotateY | ||
| 19 | + from pythonnative.style import TransformRotateZ as PNTransformRotateZ | ||
| 15 | 20 | from pythonnative.style import TransformScale as PNTransformScale | |
| 16 | 21 | from pythonnative.style import TransformScaleX as PNTransformScaleX | |
| 17 | 22 | from pythonnative.style import TransformScaleY as PNTransformScaleY | |
| 23 | + from pythonnative.style import TransformSkewX as PNTransformSkewX | ||
| 24 | + from pythonnative.style import TransformSkewY as PNTransformSkewY | ||
| 18 | 25 | from pythonnative.style import TransformTranslate as PNTransformTranslate | |
| 19 | 26 | ||
| 20 | 27 | from pythonnative.native_modules.registry import native_module | |
| Back | FazBrowse Home | New Git URL |
0 commit comments