Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Patrol DevTools extension #1829

Merged
merged 101 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
1ff42c4
Add simple extension and publish script
zltnDC Sep 21, 2023
2adf00b
Add vmservice request for widget root
zltnDC Sep 22, 2023
19d0243
Add getRootWidgetSummaryTree
zltnDC Sep 25, 2023
46ec1a6
Add getRootWidgetSummaryTreeWithPreviews
zltnDC Sep 25, 2023
1017e33
Add getObject
zltnDC Sep 26, 2023
c32be3a
Add dependencies
zltnDC Sep 26, 2023
b4a9494
Add debugDumpRenderTree
zltnDC Sep 26, 2023
eea817e
Add simple vm extension
zltnDC Sep 28, 2023
1960c74
Add getNativeViews PoC
zltnDC Sep 28, 2023
a3705c7
Add android window trees
zltnDC Oct 2, 2023
942d028
Use ElementSnapshot for UITree
zltnDC Oct 4, 2023
08f35cc
Add element type mapping and devtools service extensions
zltnDC Oct 5, 2023
72e5a54
Add patrol service extension api
zltnDC Oct 6, 2023
c3591d9
Add simple native inspector tree
zltnDC Oct 9, 2023
b5f6fcc
Add simple native inspector layout
zltnDC Oct 11, 2023
d1e922f
Improve layout
zltnDC Oct 11, 2023
03f631d
Add installedApps for ios inspector
zltnDC Oct 12, 2023
e607b7f
Add Node abstraction
zltnDC Oct 12, 2023
091bf47
Change color for null values in node details
zltnDC Oct 12, 2023
c9ecff3
Add node expansion
zltnDC Oct 12, 2023
f06a1a1
Add short/long names for nodes
zltnDC Oct 13, 2023
88c37b6
Add flutter hooks
zltnDC Oct 13, 2023
0401e6d
Improve item layout
zltnDC Oct 13, 2023
a3dec9b
Add tree lines
zltnDC Oct 13, 2023
a35932a
Add initial character
zltnDC Oct 13, 2023
fcd4141
Improve details, add copy button
zltnDC Oct 13, 2023
44e8a95
Remove deprecated code
zltnDC Oct 13, 2023
423bc27
add leancode_lint
bartekpacia Oct 25, 2023
a4f3e2e
format code, apply quick fixes
bartekpacia Oct 25, 2023
0a09282
add patrol_devtools_extension-prepare GH action
bartekpacia Oct 25, 2023
49a6b45
NativeInspectorTree: fix most glaring overflows when text is too long
bartekpacia Oct 26, 2023
fa75f70
NativeInspectorTree: fix everything falling apart because invalid con…
bartekpacia Oct 26, 2023
bcd316d
NativeInspectorTree: use ellipsis for nodes overflow
bartekpacia Oct 26, 2023
11eea60
_InspectorTreeControls: fix overflows
bartekpacia Oct 26, 2023
2b95c5b
NativeInspectorTree: replace OverflowBox with Flexible
bartekpacia Oct 26, 2023
a52d054
NativeInspectorTree: solve with OverflowingFlex by Albert Wolszon
bartekpacia Oct 26, 2023
8bce6c0
implement un-selecting native view node
bartekpacia Oct 26, 2023
7b20637
_NativeViewDetails: fix overflows with OverflowingFlex
bartekpacia Oct 26, 2023
dd6f0a7
refactor and clean up
bartekpacia Oct 26, 2023
240f933
fix to work with Flutter beta
bartekpacia Oct 27, 2023
6906769
PatrolBinding: fix crashing on Flutter 3.16 beta
bartekpacia Oct 30, 2023
91b09bb
patrol_devtools_extension: fix dependency resolution
bartekpacia Oct 30, 2023
203eb36
pin dependencies
bartekpacia Oct 30, 2023
d46ec42
Fix typo in config.yaml and add .pubignore file to the extension
mateuszwojtczak Oct 31, 2023
1af5aec
flutter pub get
bartekpacia Nov 2, 2023
9195fd6
TEMPORARY COMMIT - REVERT IT. DO NOT DEVELOP ON TOP OF IT
bartekpacia Nov 2, 2023
b178858
`patrol develop`: automatically open Patrol page in devtools when ready
bartekpacia Nov 3, 2023
807eed1
Revert "TEMPORARY COMMIT - REVERT IT. DO NOT DEVELOP ON TOP OF IT"
bartekpacia Nov 6, 2023
9ff8aac
stop using `Expanded`s and `Flexible`s inside `_NativeViewHierarchyTree`
bartekpacia Nov 7, 2023
bd42bbf
implement poor man's 2D scrolling
bartekpacia Nov 7, 2023
29b583b
implement highlighting selected node
bartekpacia Nov 7, 2023
e8a49fd
add button to fetch native view hierarchy when it's not present
bartekpacia Nov 7, 2023
f27ef5e
NativeViewDetails: make key and value take equal space (doesn't look …
bartekpacia Nov 7, 2023
1d27bbe
NativeViewDetails: make "keys" column take as much space as needed (l…
bartekpacia Nov 7, 2023
840fdbf
NativeViewDetails: show snackbar on copy
bartekpacia Nov 8, 2023
296674d
NativeViewDetails: highlight row on hover (not *whole* row, yet)
bartekpacia Nov 8, 2023
67827a6
NativeViewDetails: highlight row on hover
bartekpacia Nov 8, 2023
2ed1359
add nice rounded corners
bartekpacia Nov 8, 2023
489b381
NativeViewHierarchy: add highlight on hover
bartekpacia Nov 8, 2023
a71a59b
remove redundant scrollbar
bartekpacia Nov 8, 2023
4007049
bump dependencies
bartekpacia Nov 9, 2023
47b6efa
Merge branch 'master' into task/patrol-extension
bartekpacia Nov 9, 2023
9e1992c
use latest Flutter master on CI
bartekpacia Nov 9, 2023
2019974
`patrol_finders`: fix most failing tests
bartekpacia Nov 9, 2023
08a11b6
Fix naming of NativeView properties in the extension UI
mateuszwojtczak Nov 10, 2023
a089171
Remove concurrency from iOS code (#1891)
piotruela Nov 13, 2023
5cf10a1
patrol-prepare: use Melos to fix `flutter test` crashing
bartekpacia Nov 13, 2023
e2fd74e
patrol_devtools_extension prepare: fix `flutter test` not passing
bartekpacia Nov 13, 2023
f35adfe
prepare* workflows: remove redundant check when doing `dart format`
bartekpacia Nov 13, 2023
5614356
Remove `patrol`'s dependency on `integration test` plugin (#1882)
bartekpacia Nov 13, 2023
6f25e70
CI workflows: use `flutter build apk --config-only`
bartekpacia Nov 13, 2023
fd13647
fix analyzer warnings
bartekpacia Nov 13, 2023
12a1da8
improve granularity of `flutter precache`s
bartekpacia Nov 13, 2023
c5db170
patrol_finders: remove ignoring deprecation errors
bartekpacia Nov 13, 2023
792e995
Fix 2 failing tests by forwarding PatrolFinder.describeMatch()
bartekpacia Nov 13, 2023
dc73453
Remove deprecated parameters from `patrolTest` (#1892)
jBorkowska Nov 13, 2023
ab73795
PatrolFinder: forward more methods, ignore deprecation warnings
bartekpacia Nov 13, 2023
316bef4
add 3.0 changelogs
bartekpacia Nov 13, 2023
2eb539a
lower dependency versions in patrol_devtools_extension
bartekpacia Nov 13, 2023
778b4ed
temporary workaround for DevTools extension
bartekpacia Nov 13, 2023
11b7037
add link to docs about debugDefaultTargetPlatformOverride
bartekpacia Nov 13, 2023
42f2d33
change materialIconCodePoint
bartekpacia Nov 13, 2023
61f6035
set Flutter version in all CI workflows to `beta 3.16.0-0.5.pre`
bartekpacia Nov 13, 2023
ddcd9c0
fix fomratting
bartekpacia Nov 13, 2023
93a0fb3
try to fix `patrol_devtools_extension-prepare`
bartekpacia Nov 13, 2023
fb00651
fix `patrol_devtools_extension-prepare` not finding build directory
bartekpacia Nov 13, 2023
177e25f
retrigger CI
bartekpacia Nov 13, 2023
ade415f
dev/cli_tests: pass --no-open-devtools
bartekpacia Nov 13, 2023
827107e
update min Dart SDK and Flutter SDK constraints
bartekpacia Nov 13, 2023
9b3e388
bump actions/checkout to v4
bartekpacia Nov 13, 2023
5957343
patrol: remove fixnum package
bartekpacia Nov 13, 2023
15d10cf
fix PR labeler
bartekpacia Nov 13, 2023
061d1b1
cirrusCI: update Flutter version
bartekpacia Nov 13, 2023
2d78fb3
cirrusCI: remove `find_latest_matching_flutter_version_script`
bartekpacia Nov 13, 2023
cde440b
cirrusCI: run `melos bootstrap`
bartekpacia Nov 13, 2023
1a150e4
more CI fixes
bartekpacia Nov 13, 2023
c32910c
patrol_develop_test: increase afterBuildCompletedTimeout from 2 to 4 …
bartekpacia Nov 13, 2023
5074b70
rebuild iOS app, resulting in removal of `integration_test` from Podf…
bartekpacia Nov 14, 2023
ee6ab35
update changelogs
bartekpacia Nov 14, 2023
43148c4
cirrusCI yaml: use macos-sonoma
bartekpacia Nov 14, 2023
a46e551
test-* workflows: set up Melos to fix CI on branches
bartekpacia Nov 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 14 additions & 27 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test_linux_task:
kvm: 'true'
env:
PATH: $HOME/.pub-cache/bin:$HOME/fvm/default/bin:$CIRRUS_WORKING_DIR/fvm:${PATH}
FLUTTER_VERSION: '3.13'
FLUTTER_VERSION: '3.16.0-0.5.pre'
EMULATOR_API_LEVEL: '34'
EMULATOR_ABI: google_apis_playstore;x86_64
EMULATOR_IMAGE: system-images;android-${EMULATOR_API_LEVEL};${EMULATOR_ABI}
Expand All @@ -20,26 +20,15 @@ test_linux_task:
set_up_fvm_script: |
curl -LO https://github.com/fluttertools/fvm/releases/download/2.4.1/fvm-2.4.1-linux-x64.tar.gz
tar -xf fvm-2.4.1-linux-x64.tar.gz
find_latest_matching_flutter_version_script: |
flutter_versions=$(fvm releases)
flutter_matching_versions=$(echo "$flutter_versions" | grep -v "pre" | grep -o " ${FLUTTER_VERSION}.[0-9]*")
latest_flutter_matching_version=$(echo "$flutter_matching_versions" | sort -rV | head -n 1)
echo "LATEST_MATCHING_FLUTTER_VERSION=$latest_flutter_matching_version" >> $CIRRUS_ENV
setup_flutter_script: |
echo "y" | fvm global $LATEST_MATCHING_FLUTTER_VERSION
echo "y" | fvm global $FLUTTER_VERSION
fvm doctor
flutter --version
flutter precache
generate_gradlew_script: |
cd packages/patrol/example
flutter build apk --target lib/main.dart --debug --flavor=does-not-exist &
start=$SECONDS
until [ -e "android/gradlew" ] || [ $(($SECONDS - start)) -ge 120 ]; do sleep 2; done
if [ ! -e "android/gradlew" ]; then
echo "android/gradlew was not generated within the 2 minutes timeout"
exit 1
fi
kill $!
flutter precache --android
cd packages/patrol/example && flutter build apk --config-only
melos_bootstrap_script: |
dart pub global activate melos
melos bootstrap
setup_patrol_cli_script:
- dart pub global activate --source path packages/patrol_cli && patrol
setup_emulator_script: |
Expand Down Expand Up @@ -74,25 +63,23 @@ test_macos_task:
- 'package: patrol'
- 'cirrusci'
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
env:
PATH: $HOME/.pub-cache/bin:$HOME/fvm/default/bin:${PATH}
FLUTTER_VERSION: '3.13'
FLUTTER_VERSION: '3.16.0-0.5.pre'
timeout_in: 30m

set_up_fvm_script: |
brew tap leoafarias/fvm
brew install fvm
find_latest_matching_flutter_version_script: |
flutter_versions=$(fvm releases)
flutter_matching_versions=$(echo "$flutter_versions" | grep -v "pre" | grep -o " ${FLUTTER_VERSION}.[0-9]*")
latest_flutter_matching_version=$(echo "$flutter_matching_versions" | sort -rV | head -n 1)
echo "LATEST_MATCHING_FLUTTER_VERSION=$latest_flutter_matching_version" >> $CIRRUS_ENV
setup_flutter_script: |
echo "y" | fvm global $LATEST_MATCHING_FLUTTER_VERSION
echo "y" | fvm global $FLUTTER_VERSION
fvm doctor
flutter --version
flutter precache
flutter precache --ios
melos_bootstrap_script: |
dart pub global activate melos
melos bootstrap
setup_patrol_cli_script:
- dart pub global activate --source path packages/patrol_cli && patrol
setup_simulator_script: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/adb-prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ on:

jobs:
main:
name: Dart ${{ matrix.sdk }}
name: Dart ${{ matrix.dart-version }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
sdk: ['2.18.0', stable]
dart-version: ['3.1']

defaults:
run:
working-directory: packages/adb

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Dart
uses: dart-lang/setup-dart@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/adb-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Dart
uses: dart-lang/setup-dart@v1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/label_pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ jobs:

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Label Pull Request
uses: actions/labeler@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: ''
62 changes: 47 additions & 15 deletions .github/workflows/patrol-prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,35 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
flutter-version: ['3.16.0-0.5.pre']
flutter-channel: ['beta']

defaults:
run:
working-directory: packages/patrol/example/android

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.x'
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}

- name: Preload Flutter artifacts
run: flutter precache --android

- name: Generate Gradle wrapper
working-directory: packages/patrol/example
run: flutter build apk --debug --flavor=does-not-exist || true
run: flutter build apk --config-only

- name: ktlint check
run: .\gradlew.bat :patrol:ktlintCheck
Expand All @@ -59,23 +65,35 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
flutter-version: ['3.16.0-0.5.pre']
flutter-channel: ['beta']

defaults:
run:
working-directory: packages/patrol/example/android

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.x'
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}

- name: Preload Flutter artifacts
run: flutter precache --android

- name: Generate Gradle wrapper
working-directory: packages/patrol/example
run: flutter build apk --debug --flavor=does-not-exist || true
run: flutter build apk --config-only

- name: Run unit tests
if: success() || failure()
Expand Down Expand Up @@ -103,14 +121,16 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest]
flutter-version: ['3.16.0-0.5.pre']
flutter-channel: ['beta']

defaults:
run:
working-directory: packages/patrol/ios

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install tools
run: |
Expand All @@ -136,7 +156,11 @@ jobs:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.x'
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}

- name: Preload Flutter artifacts
run: flutter precache --ios

- name: Generate iOS build files
working-directory: packages/patrol/example
Expand Down Expand Up @@ -170,20 +194,28 @@ jobs:
strategy:
fail-fast: false
matrix:
flutter-version: ['3.3.x', '3.7.x', '3.10.x', '3.13.x']
flutter-version: ['3.16.0-0.5.pre']
flutter-channel: ['beta']

defaults:
run:
working-directory: packages/patrol

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}

- name: Set up Melos and activate workspace
working-directory: .
run: |
dart pub global activate melos
melos bootstrap

- name: flutter pub get
run: flutter pub get
Expand All @@ -197,7 +229,7 @@ jobs:
run: flutter analyze

- name: dart format
if: ${{ (success() || failure()) && (contains('3.10.x', matrix.flutter-version) || contains('3.13.x', matrix.flutter-version)) }}
if: success() || failure()
run: dart format --set-exit-if-changed .

- name: flutter pub publish --dry-run
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/patrol-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# This step adds the auth token for pub.dev
- name: Set up Dart
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/patrol_cli-prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
flutter-version: ['3.3.x', '3.7.x', '3.10.x', '3.13.x']
flutter-version: ['3.16.0-0.5.pre']
flutter-channel: ['beta']

defaults:
run:
working-directory: packages/patrol_cli

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}

- name: Run flutter tool (to dismiss the first run experience)
run: flutter
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/patrol_cli-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check if versions are defined consistently
working-directory: packages/patrol_cli
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/patrol_devtools_extension-prepare.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: patrol_devtools_extension prepare

on:
workflow_dispatch:
pull_request:
paths:
- 'packages/patrol_devtools_extension/**'

jobs:
prepare:
name: Flutter ${{ matrix.flutter-version }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
flutter-version: ['3.16.0-0.5.pre']
flutter-channel: ['beta']

defaults:
run:
working-directory: packages/patrol_devtools_extension

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}

- name: flutter pub get
run: flutter pub get

- name: flutter test
if: success() || failure()
run: flutter test --coverage

- name: flutter analyze
if: success() || failure()
run: flutter analyze

- name: dart format
if: success() || failure()
run: dart format --set-exit-if-changed .

- name: Build extension
if: success() || failure()
run: ./publish_to_patrol_extension
6 changes: 4 additions & 2 deletions .github/workflows/patrol_finders-prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ jobs:
strategy:
fail-fast: false
matrix:
flutter-version: ['3.3.x', '3.7.x', '3.10.x', '3.13.x']
flutter-version: ['3.16.0-0.5.pre']
flutter-channel: ['beta']

defaults:
run:
working-directory: packages/patrol_finders

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}

- name: flutter pub get
run: flutter pub get
Expand Down
Loading
Loading