Skip to content

Commit 301bb4a

Browse files
author
Guillaume Chau
committed
fix: high-density
1 parent b628bcc commit 301bb4a

File tree

3 files changed

+38
-7
lines changed

3 files changed

+38
-7
lines changed

src/devtools/views/perf/ComponentRenderDetails.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
<div
2020
slot="scroll"
2121
class="metrics"
22+
:class="{
23+
'high-density': highDensity
24+
}"
2225
>
2326
<div class="header">
2427
<div
@@ -124,6 +127,11 @@ export default {
124127
125128
componentName () {
126129
return (this.$shared.classifyComponents ? classify(this.entry.id) : this.entry.id) || 'Anonymous Component'
130+
},
131+
132+
highDensity () {
133+
const pref = this.$shared.displayDensity
134+
return (pref === 'auto' && this.entries.length > 8) || pref === 'high'
127135
}
128136
},
129137
@@ -142,13 +150,17 @@ export default {
142150
.metrics
143151
padding 6px 0
144152
font-size 14px
153+
&.high-density
154+
font-size 12px
145155
146156
.header,
147157
.metric
148158
display flex
149159
/deep/ > *
150160
flex 25% 0 0
151161
padding 4px 10px
162+
.high-density &
163+
padding 2px 10px
152164
&:not(:first-child)
153165
text-align right
154166

src/devtools/views/perf/FramerateMarkerInspector.vue

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515
v-for="bubble of marker.bubbles"
1616
:key="bubble.type"
1717
class="group"
18+
:class="{
19+
'high-density': finalHighDensity
20+
}"
1821
>
1922
<div class="group-title">
2023
{{ bubble.type }}
2124
</div>
2225
<div
2326
v-for="(entry, index) of bubble.entries"
2427
:key="index"
25-
class="entry selectable-item"
28+
class="entry list-item"
2629
:class="{
2730
selected: selectedEntry === entry
2831
}"
@@ -67,6 +70,21 @@ export default {
6770
}
6871
},
6972
73+
computed: {
74+
totalEntriesCount () {
75+
let result = 0
76+
for (const bubble of this.marker.bubbles) {
77+
result += bubble.entries.length
78+
}
79+
return result
80+
},
81+
82+
finalHighDensity () {
83+
const pref = this.$shared.displayDensity
84+
return (pref === 'auto' && this.totalEntriesCount > 8) || pref === 'high'
85+
}
86+
},
87+
7088
watch: {
7189
marker () {
7290
this.selectedEntry = null
@@ -88,6 +106,8 @@ export default {
88106
.group-title,
89107
.entry
90108
padding 7px 12px 6px
109+
.high-density &
110+
padding 3px 12px 2px
91111
92112
.group
93113
&:not(:first-child)
@@ -103,11 +123,9 @@ export default {
103123
display flex
104124
.label
105125
flex auto 1 1
106-
color $pink
107126
.time
108127
color $md-grey-500
109128
&.selected
110-
.label,
111129
.time
112130
color $white
113131
</style>

src/devtools/views/router/RouterHistory.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ export default {
159159
.vue-ui-icon >>> svg
160160
fill lighten($active-color, 95%)
161161
.high-density &
162-
padding 4px 20px
162+
padding 1px 20px
163+
min-height 22px
163164
span
164165
display inline-block
165166
vertical-align middle
@@ -182,9 +183,9 @@ export default {
182183
line-height: 1
183184
color: #fff
184185
&.name
185-
background-color #aaa
186+
background-color $purple
186187
&.alias
187-
background-color #ff8344
188+
background-color $orange
188189
&.redirect
189-
background-color #af90d5
190+
background-color $darkerGrey
190191
</style>

0 commit comments

Comments
 (0)