Skip to content

Commit 9c3598c

Browse files
authored
Merge branch 'main' into dev/annabauza/android_users_table_processor
2 parents d6e2644 + 473134e commit 9c3598c

File tree

5 files changed

+787
-752
lines changed

5 files changed

+787
-752
lines changed

src/trace_processor/tables/metadata_tables.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,11 @@
856856
C('byte_offset', CppOptional(CppInt64())),
857857
C('severity', CppString()),
858858
C('name', CppString()),
859-
C('arg_set_id', CppOptional(CppUint32())),
859+
C(
860+
'arg_set_id',
861+
CppOptional(CppUint32()),
862+
cpp_access=CppAccess.READ_AND_LOW_PERF_WRITE,
863+
),
860864
],
861865
)
862866

ui/src/assets/widgets/nodegraph.scss

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
background-color: var(--pf-color-background);
3030
position: relative;
3131
user-select: none;
32+
font-family: var(--pf-font-compact);
33+
cursor: grab;
3234
}
3335

3436
.pf-canvas-content {
@@ -63,33 +65,36 @@
6365
padding-block: 12px;
6466
}
6567

66-
.pf-node.pf-selected {
67-
border-color: var(--pf-color-accent);
68-
box-shadow: 0 0 0 2px
69-
color-mix(in srgb, var(--pf-color-accent) 30%, transparent);
70-
}
71-
7268
// Wrapper for dock chains - uses flexbox to make children same width
7369
.pf-dock-chain {
7470
position: absolute;
7571
display: flex;
7672
flex-direction: column;
7773
pointer-events: auto;
74+
box-shadow: 0 4px 12px var(--pf-color-box-shadow);
7875

7976
// All nodes in chain stretch to same width (determined by widest node)
8077
.pf-node {
8178
width: 100%;
8279
position: relative !important;
8380
left: auto !important;
8481
top: auto !important;
82+
box-shadow: none; // No box shadow for docked nodes
8583
}
8684
}
8785

86+
.pf-node.pf-selected {
87+
border-color: var(--pf-color-accent);
88+
box-shadow: 0 0 0 2px
89+
color-mix(in srgb, var(--pf-color-accent) 30%, transparent);
90+
z-index: 1; // Make sure box shadow appears above other nodes
91+
}
92+
8893
// Docked child: flush top edge with no rounded corners or border
8994
.pf-node.pf-docked-child {
9095
border-top-left-radius: 0;
9196
border-top-right-radius: 0;
92-
border-top: none;
97+
margin-top: -2px; // Overlap border with parent
9398
}
9499

95100
// Parent with docked child: flush bottom edge with no rounded corners
@@ -135,8 +140,6 @@
135140

136141
.pf-node-content {
137142
padding-inline: 12px;
138-
padding-bottom: 8px;
139-
border-bottom: 1px solid var(--pf-color-border-secondary);
140143
}
141144

142145
.pf-port-row {
@@ -168,14 +171,12 @@
168171
cursor: crosshair;
169172
position: absolute;
170173
top: 50%;
171-
transition: all 0.2s;
172174
z-index: 10;
173175
}
174176

175-
.pf-port:hover {
177+
.pf-output:hover {
176178
background: var(--pf-color-accent);
177179
border-color: var(--pf-color-accent);
178-
transform: translateY(-50%) scale(1.2);
179180
}
180181

181182
.pf-port.pf-connected {
@@ -204,13 +205,6 @@
204205
right: -8px;
205206
}
206207

207-
.pf-port.pf-active {
208-
background: var(--pf-color-accent);
209-
border-color: var(--pf-color-accent);
210-
box-shadow: 0 0 8px
211-
color-mix(in srgb, var(--pf-color-accent) 80%, transparent);
212-
}
213-
214208
svg {
215209
position: absolute;
216210
top: 0;
@@ -248,3 +242,29 @@ svg {
248242
fill: none;
249243
stroke-dasharray: 5, 5;
250244
}
245+
246+
.pf-connecting {
247+
cursor: crosshair;
248+
249+
.pf-input:hover {
250+
background: var(--pf-color-accent);
251+
border-color: var(--pf-color-accent);
252+
cursor: copy;
253+
}
254+
.pf-output:hover {
255+
background: var(--pf-color-border);
256+
border-color: var(--pf-color-border-secondary);
257+
cursor: not-allowed;
258+
}
259+
}
260+
261+
.pf-output.pf-active,
262+
.pf-output.pf-active:hover {
263+
background: var(--pf-color-accent);
264+
border-color: var(--pf-color-accent);
265+
cursor: crosshair;
266+
}
267+
268+
.pf-panning {
269+
cursor: grabbing;
270+
}

ui/src/base/classnames.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// It's common to want to have a class depending on a boolean flag, in which
1616
// case we use `flag && className` which evaluates to either false or a string,
1717
// which is why false is included in definition of ArgType.
18-
type ArgType = string | false | undefined;
18+
type ArgType = string | false | undefined | null;
1919

2020
// Join class names together into valid HTML class attributes
2121
// Falsy elements are ignored

ui/src/plugins/dev.perfetto.WidgetsPage/nodegraph_demo.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ interface NodeTemplate {
3636
inputs: string[];
3737
outputs: string[];
3838
content?: m.Children;
39+
allInputsLeft?: boolean;
3940
}
4041

4142
export function NodeGraphDemo() {
@@ -138,6 +139,7 @@ export function NodeGraphDemo() {
138139
join: {
139140
inputs: ['Left', 'Right'],
140141
outputs: ['Output'],
142+
allInputsLeft: true,
141143
content: m(
142144
'',
143145
{style: {display: 'flex', flexDirection: 'column', gap: '4px'}},
@@ -195,6 +197,7 @@ export function NodeGraphDemo() {
195197
const template = nodeTemplates[model.type];
196198
const hasNext = model.nextId !== undefined;
197199
const nextModel = hasNext ? modelNodes.get(model.nextId!) : undefined;
200+
const allInputsLeft = template.allInputsLeft ?? false;
198201

199202
return {
200203
id: model.id,
@@ -204,6 +207,7 @@ export function NodeGraphDemo() {
204207
outputs: template.outputs,
205208
content: template.content,
206209
next: nextModel ? renderChildNode(nextModel) : undefined,
210+
allInputsLeft,
207211
addMenuItems: [
208212
m(MenuItem, {
209213
label: 'Select',

0 commit comments

Comments
 (0)