Skip to content

Commit 30f1516

Browse files
author
Guillaume Chau
committed
fix: overflowing mutation label, closes #1090
1 parent 3bce674 commit 30f1516

File tree

1 file changed

+77
-66
lines changed

1 file changed

+77
-66
lines changed

packages/app-frontend/src/views/vuex/VuexHistory.vue

Lines changed: 77 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,21 @@
6565
class="entry list-item special"
6666
@click="inspect(null)"
6767
>
68-
<span class="mutation-type">Base State</span>
69-
<span class="entry-actions">
70-
<a
71-
v-tooltip="'Time Travel to This State'"
72-
class="action action-time-travel"
73-
@click.stop="timeTravelTo(null)"
74-
>
75-
<VueIcon
76-
class="medium"
77-
icon="restore"
78-
/>
79-
<span>Time Travel</span>
80-
</a>
81-
</span>
82-
<span class="time">
83-
{{ lastCommit | formatTime($shared.timeFormat) }}
68+
<span class="entry-info">
69+
<span class="mutation-type">Base State</span>
70+
<span class="entry-actions">
71+
<a
72+
v-tooltip="'Time Travel to This State'"
73+
class="action action-time-travel"
74+
@click.stop="timeTravelTo(null)"
75+
>
76+
<VueIcon
77+
class="medium"
78+
icon="restore"
79+
/>
80+
<span>Time Travel</span>
81+
</a>
82+
</span>
8483
</span>
8584
<span
8685
v-if="activeIndex === -1"
@@ -90,6 +89,9 @@
9089
v-if="inspectedIndex === -1"
9190
class="label inspected"
9291
>inspected</span>
92+
<span class="time">
93+
{{ lastCommit | formatTime($shared.timeFormat) }}
94+
</span>
9395
</div>
9496
<div
9597
v-else
@@ -103,48 +105,44 @@
103105
class="entry list-item"
104106
@click="inspect(entry)"
105107
>
106-
<span class="mutation-type">{{ entry.mutation.type }}</span>
107-
<span class="entry-actions">
108-
<a
109-
v-tooltip="'Commit This Mutation'"
110-
class="action action-commit"
111-
@click="commit(entry);$event.stopImmediatePropagation()"
112-
>
113-
<VueIcon
114-
class="medium"
115-
icon="get_app"
116-
/>
117-
<span>Commit</span>
118-
</a>
119-
<a
120-
v-tooltip="'Revert This Mutation'"
121-
class="action action-revert"
122-
@click="revert(entry);$event.stopImmediatePropagation()"
123-
>
124-
<VueIcon
125-
class="small"
126-
icon="do_not_disturb"
127-
/>
128-
<span>Revert</span>
129-
</a>
130-
<a
131-
v-if="!isActive(index, entry)"
132-
v-tooltip="'Time Travel to This State'"
133-
class="action action-time-travel"
134-
@click="timeTravelTo(entry)"
135-
>
136-
<VueIcon
137-
class="medium"
138-
icon="restore"
139-
/>
140-
<span>Time Travel</span>
141-
</a>
142-
</span>
143-
<span
144-
v-tooltip="entry.timestamp"
145-
class="time"
146-
>
147-
{{ entry.timestamp | formatTime($shared.timeFormat) }}
108+
<span class="entry-info">
109+
<span class="mutation-type">{{ entry.mutation.type }}</span>
110+
<span class="entry-actions">
111+
<a
112+
v-tooltip="'Commit This Mutation'"
113+
class="action action-commit"
114+
@click="commit(entry);$event.stopImmediatePropagation()"
115+
>
116+
<VueIcon
117+
class="medium"
118+
icon="get_app"
119+
/>
120+
<span>Commit</span>
121+
</a>
122+
<a
123+
v-tooltip="'Revert This Mutation'"
124+
class="action action-revert"
125+
@click="revert(entry);$event.stopImmediatePropagation()"
126+
>
127+
<VueIcon
128+
class="small"
129+
icon="do_not_disturb"
130+
/>
131+
<span>Revert</span>
132+
</a>
133+
<a
134+
v-if="!isActive(index, entry)"
135+
v-tooltip="'Time Travel to This State'"
136+
class="action action-time-travel"
137+
@click="timeTravelTo(entry)"
138+
>
139+
<VueIcon
140+
class="medium"
141+
icon="restore"
142+
/>
143+
<span>Time Travel</span>
144+
</a>
145+
</span>
148146
</span>
149147
<span
150148
v-if="isActive(index, entry)"
@@ -154,6 +152,12 @@
154152
v-if="isInspected(index, entry)"
155153
class="label inspected"
156154
>inspected</span>
155+
<span
156+
v-tooltip="entry.timestamp"
157+
class="time"
158+
>
159+
{{ entry.timestamp | formatTime($shared.timeFormat) }}
160+
</span>
157161
</div>
158162
</template>
159163
</RecycleScroller>
@@ -289,10 +293,12 @@ $inspected_color = #af90d5
289293
box-shadow inset 0 1px 0px rgba(0, 0, 0, .08)
290294
min-height 34px
291295
transition padding .15s, min-height .15s
292-
&::after
293-
content: ''
294-
display table
295-
clear both
296+
&,
297+
.entry-info
298+
display flex
299+
.entry-info
300+
flex 100% 1 1
301+
overflow hidden
296302
&.active
297303
.time
298304
color lighten($active-color, 75%)
@@ -321,10 +327,15 @@ $inspected_color = #af90d5
321327
vertical-align middle
322328
.mutation-type
323329
line-height 20px
324-
overflow-wrap break-word
325-
max-width 100%
330+
overflow hidden
331+
white-space nowrap
332+
text-overflow ellipsis
333+
flex auto 0 1
334+
margin-right 4px
326335
.entry-actions
327336
display none
337+
flex none
338+
padding-right 12px
328339
&:hover
329340
.entry-actions
330341
display inline-block
@@ -359,15 +370,15 @@ $inspected_color = #af90d5
359370
.time
360371
font-size 11px
361372
color #999
362-
float right
363373
margin-top 3px
374+
flex none
364375
365376
.label
366-
float right
367377
font-size 10px
368378
padding 4px 8px
369379
border-radius 6px
370380
margin-right 8px
381+
flex none
371382
&.active
372383
background-color darken($active-color, 25%)
373384
&.inspected

0 commit comments

Comments
 (0)