Skip to content

Commit 9c87cf1

Browse files
leiyreFrancisco Aranda
leiyre
authored and
Francisco Aranda
committed
style: Small visual adjustments for Text2Text record card (#1632)
This PR changes the button alignment and position of the score, button styles and text. Closes #1138 (cherry picked from commit bd9be09)
1 parent d634a7b commit 9c87cf1

File tree

4 files changed

+45
-47
lines changed

4 files changed

+45
-47
lines changed

frontend/assets/scss/abstract/placeholders/_placeholders.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
border: 0;
146146
&:hover,
147147
&:focus {
148-
text-decoration: underline;
148+
text-decoration: none;
149149
background: none;
150150
}
151151
}

frontend/components/core/ReButton.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,14 @@ export default {
279279
.button-clear {
280280
@extend %button;
281281
@extend %clear;
282-
&:hover,
283-
&:focus {
284-
text-decoration: none;
285-
color: $font-dark-color;
282+
border-radius: $border-radius;
283+
padding: 0.5em;
284+
transition: all 0.2s ease;
285+
@include font-size(14px);
286+
background: none;
287+
&:hover {
288+
transition: all 0.2s ease;
289+
background: palette(grey, bg);
286290
}
287291
&--small {
288292
@extend %button;

frontend/components/text2text/results/Text2TextContentEditable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
v-if="editionMode && annotationEnabled && editableText"
1717
class="content__edit__buttons"
1818
>
19+
<re-button class="button-primary" @click="annotate">Save</re-button>
1920
<re-button class="button-primary--outline" @click="$emit('back')"
2021
>Back</re-button
2122
>
22-
<re-button class="button-primary" @click="annotate">Save</re-button>
2323
</div>
2424
</span>
2525
</template>
@@ -134,7 +134,7 @@ $marginRight: 200px;
134134
&__buttons {
135135
margin: 2.5em 200px 0 auto;
136136
display: flex;
137-
justify-content: flex-end;
137+
justify-content: flex-start;
138138
.re-button {
139139
margin-bottom: 0;
140140
&:last-child {

frontend/components/text2text/results/Text2TextList.vue

Lines changed: 34 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<div
2121
:class="[
2222
'content',
23-
hasAnnotationAndPredictions ? 'content--separator' : null,
23+
'content--separator',
2424
!annotationEnabled
2525
? 'content--exploration-mode'
2626
: 'content--annotation-mode',
@@ -66,7 +66,10 @@
6666
<div v-if="itemNumber === index" class="content__sentences">
6767
<div class="content__group">
6868
<p v-if="!editionMode" class="content__sentences__title">
69-
{{ sentencesOrigin }}
69+
{{ sentencesOrigin
70+
}}<span v-if="showScore" class="content__score"
71+
>: {{ sentence.score | percent }}
72+
</span>
7073
</p>
7174
<re-button
7275
v-if="hasAnnotationAndPredictions && !editionMode"
@@ -96,8 +99,24 @@
9699
/>
97100
<div v-if="!editionMode" class="content__footer">
98101
<template v-if="sentencesOrigin === 'Prediction'">
99-
<div v-if="showScore" class="content__score">
100-
Score: {{ sentence.score | percent }}
102+
<div v-if="annotationEnabled" class="content__actions-buttons">
103+
<re-button
104+
v-if="allowValidation"
105+
class="button-primary"
106+
@click="onAnnotate(visibleSentence)"
107+
>Validate</re-button
108+
>
109+
<re-button
110+
v-if="sentences.length"
111+
:class="[
112+
'edit',
113+
allowValidation
114+
? 'button-primary--outline'
115+
: 'button-primary',
116+
]"
117+
@click="edit"
118+
>Edit</re-button
119+
>
101120
</div>
102121
<div v-if="sentences.length" class="content__nav-buttons">
103122
<a
@@ -107,8 +126,8 @@
107126
>
108127
<svgicon
109128
name="chevron-left"
110-
width="8"
111-
height="8"
129+
width="12"
130+
height="12"
112131
color="#4C4EA3"
113132
/>
114133
</a>
@@ -122,32 +141,13 @@
122141
>
123142
<svgicon
124143
name="chevron-right"
125-
width="8"
126-
height="8"
144+
width="12"
145+
height="12"
127146
color="#4C4EA3"
128147
/>
129148
</a>
130149
</div>
131150
</template>
132-
<div v-if="annotationEnabled" class="content__actions-buttons">
133-
<re-button
134-
v-if="sentences.length"
135-
:class="[
136-
'edit',
137-
allowValidation
138-
? 'button-primary--outline'
139-
: 'button-primary',
140-
]"
141-
@click="edit"
142-
>Edit</re-button
143-
>
144-
<re-button
145-
v-if="allowValidation"
146-
class="button-primary"
147-
@click="onAnnotate(visibleSentence)"
148-
>Validate</re-button
149-
>
150-
</div>
151151
</div>
152152
</div>
153153
</span>
@@ -435,13 +435,13 @@ export default {
435435
flex-direction: column;
436436
min-height: 140px;
437437
&__title {
438-
@include font-size(13px);
438+
@include font-size(14px);
439439
color: palette(grey, medium);
440440
margin: 0;
441441
}
442442
}
443443
&__score {
444-
@include font-size(13px);
444+
@include font-size(15px);
445445
margin-right: 0;
446446
min-width: 33%;
447447
color: palette(grey, medium);
@@ -459,18 +459,12 @@ export default {
459459
align-items: center;
460460
margin-bottom: 0.5em;
461461
.button-clear {
462-
@include font-size(13px);
463462
margin: auto 0 auto auto;
464-
color: palette(grey, dark);
465-
transition: opacity 0.3s ease-in-out 0.2s;
466-
&:hover {
467-
color: darken(palette(grey, dark), 10%);
468-
}
469463
}
470464
}
471465
&__actions-buttons {
472-
margin-right: 0;
473-
margin-left: auto;
466+
margin-right: auto;
467+
margin-left: 0;
474468
display: flex;
475469
.edit {
476470
opacity: 0;
@@ -489,13 +483,13 @@ export default {
489483
}
490484
}
491485
&__nav-buttons {
492-
@include font-size(13px);
486+
@include font-size(14px);
493487
display: flex;
494488
align-items: center;
495489
justify-content: center;
496490
min-width: 33%;
497-
margin-right: auto;
498-
margin-left: 0;
491+
margin-right: 33%;
492+
margin-left: auto;
499493
color: palette(grey, medium);
500494
a {
501495
height: 20px;

0 commit comments

Comments
 (0)