Skip to content

Commit 9b12ac3

Browse files
authored
Merge pull request #6 from jwlilly:Target-size
Target-size
2 parents a10893c + 9f3b70e commit 9b12ac3

8 files changed

Lines changed: 288 additions & 75 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/app/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "android-accessibility-inspector",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "View and analyze the accessibility tree for Android apps",
55
"license": "GPL-3.0-only",
66
"author": {

src/input.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
@tailwind components;
33
@tailwind utilities;
44

5+
.Toastify__toast {
6+
background-color: oklch(var(--b2)) !important;
7+
color: oklch(var(--bc)) !important;
8+
}
9+
10+
.Toastify__toast-icon {
11+
fill: oklch(var(--in)) !important;
12+
}
13+
514
.tree-view [role="treeitem"] {
615
cursor: pointer;
716
}

src/renderer/index.scss

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8405,6 +8405,42 @@ html:has(.drawer-open.drawer-open) {
84058405
top: 5px;
84068406
}
84078407

8408+
.left-0 {
8409+
left: 0px;
8410+
}
8411+
8412+
.left-\[5px\] {
8413+
left: 5px;
8414+
}
8415+
8416+
.left-\[10px\] {
8417+
left: 10px;
8418+
}
8419+
8420+
.left-\[15px\] {
8421+
left: 15px;
8422+
}
8423+
8424+
.left-\[16px\] {
8425+
left: 16px;
8426+
}
8427+
8428+
.left-\[12px\] {
8429+
left: 12px;
8430+
}
8431+
8432+
.left-\[8px\] {
8433+
left: 8px;
8434+
}
8435+
8436+
.left-\[6px\] {
8437+
left: 6px;
8438+
}
8439+
8440+
.left-\[4px\] {
8441+
left: 4px;
8442+
}
8443+
84088444
.isolate {
84098445
isolation: isolate;
84108446
}
@@ -8507,6 +8543,10 @@ html:has(.drawer-open.drawer-open) {
85078543
display: flex;
85088544
}
85098545

8546+
.\!flex {
8547+
display: flex !important;
8548+
}
8549+
85108550
.inline-flex {
85118551
display: inline-flex;
85128552
}
@@ -8631,6 +8671,18 @@ html:has(.drawer-open.drawer-open) {
86318671
height: 100vh;
86328672
}
86338673

8674+
.h-1 {
8675+
height: 0.25rem;
8676+
}
8677+
8678+
.h-2 {
8679+
height: 0.5rem;
8680+
}
8681+
8682+
.h-8 {
8683+
height: 2rem;
8684+
}
8685+
86348686
.max-h-\[calc\(100vh-150px\)\] {
86358687
max-height: calc(100vh - 150px);
86368688
}
@@ -9155,6 +9207,14 @@ html:has(.drawer-open.drawer-open) {
91559207
stroke: #fff;
91569208
}
91579209

9210+
.stroke-1 {
9211+
stroke-width: 1;
9212+
}
9213+
9214+
.stroke-2 {
9215+
stroke-width: 2;
9216+
}
9217+
91589218
.p-2 {
91599219
padding: 0.5rem;
91609220
}
@@ -9586,6 +9646,15 @@ html:has(.drawer-open.drawer-open) {
95869646
--tab-border-color: ${borderColor};
95879647
}
95889648

9649+
.Toastify__toast {
9650+
background-color: oklch(var(--b2)) !important;
9651+
color: oklch(var(--bc)) !important;
9652+
}
9653+
9654+
.Toastify__toast-icon {
9655+
fill: oklch(var(--in)) !important;
9656+
}
9657+
95899658
.tree-view [role="treeitem"] {
95909659
cursor: pointer;
95919660
}

src/renderer/views/basic-tree-view.tsx

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import TreeView, {
88
} from 'react-accessible-treeview';
99
import { ChevronDownIcon, ChevronRightIcon } from '@heroicons/react/16/solid';
1010
import { useCallback, useEffect, useState } from 'react';
11-
import { GlobeAltIcon } from '@heroicons/react/24/outline';
11+
import {
12+
GlobeAltIcon,
13+
MagnifyingGlassIcon,
14+
ViewfinderCircleIcon,
15+
} from '@heroicons/react/24/outline';
1216
import { IFlatMetadata } from 'react-accessible-treeview/dist/TreeView/utils';
1317

1418
function ArrowIcon({ isOpen, ...props }: any) {
@@ -25,6 +29,8 @@ const BasicTreeView = function BasicTreeView({
2529
onViewHovered,
2630
selectedView,
2731
searchTerm,
32+
showTargetSize,
33+
overlappingViews,
2834
}: any) {
2935
const [key, setKey] = useState(0);
3036
const [expandedIds, setExpandedIds] = useState(
@@ -171,13 +177,19 @@ const BasicTreeView = function BasicTreeView({
171177
})
172178
? 'search-term'
173179
: ''
174-
}`}
180+
} ${element.name.includes('WebView') && 'webview'}`}
175181
>
176-
<span className="indicator-item badge badge-warning badge-sm top-[5px]" />
182+
<span
183+
aria-hidden="true"
184+
title="search term found"
185+
className="indicator-item badge badge-warning badge-sm top-[5px]"
186+
>
187+
<MagnifyingGlassIcon className="h-4 text-warning-content stroke-2" />
188+
</span>
177189
<div
178190
// eslint-disable-next-line react/jsx-props-no-spreading
179191
{...getNodeProps({})}
180-
className={`${!isBranch ? 'ml-1' : ''} pl-[10px] my-1 ${element.name.includes('WebView') && 'webview'}`}
192+
className={`${!isBranch ? 'ml-1' : ''} pl-[10px] my-1`}
181193
onMouseOver={() => {
182194
viewHovered(element);
183195
}}
@@ -193,6 +205,20 @@ const BasicTreeView = function BasicTreeView({
193205
aria-label="search term found"
194206
className="search-term-label"
195207
/>
208+
209+
{showTargetSize &&
210+
overlappingViews.find((item: any) => {
211+
return item.id === element.id;
212+
}) ? (
213+
<span
214+
role="img"
215+
aria-label="possible target size overlap"
216+
title="possible target size overlap"
217+
className="indicator indicator-item badge badge-error badge-sm top-[5px] left-[4px] !flex"
218+
>
219+
<ViewfinderCircleIcon className="h-4 text-error-content stroke-2" />
220+
</span>
221+
) : null}
196222
{isBranch && (
197223
<ArrowIcon
198224
isOpen={isExpanded}

0 commit comments

Comments
 (0)