Skip to content

Commit

Permalink
feat(#1289): fine tuning aspect on DS without Labels (#1300)
Browse files Browse the repository at this point in the history
closes #1289

This PR includes:
- Quit empty bar
- Change copy button for: "Create label"
- Use the selector space to indicate "No existing label"

(cherry picked from commit 207f97e)
  • Loading branch information
leiyre authored and frascuchon committed Mar 28, 2022
1 parent b818f5e commit e91e674
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Expand Up @@ -49,7 +49,7 @@ export default {
text: {
type: String,
required: false,
default: "Add new label",
default: "Create label",
},
},
data: () => ({
Expand Down
Expand Up @@ -18,6 +18,7 @@
<template>
<div class="container">
<div
v-if="visibleEntities.length"
:class="[
'entities__container',
activeEntity ? 'entities__container--multiple' : '',
Expand Down
20 changes: 18 additions & 2 deletions frontend/components/token-classifier/results/EntitiesSelector.vue
@@ -1,7 +1,7 @@
<template>
<span class="entities__selector__container">
<div class="entities__selector">
<ul class="entities__selector__options">
<ul v-if="formattedEntities.length" class="entities__selector__options">
<li
class="entities__selector__option suggestion"
:class="[
Expand Down Expand Up @@ -44,11 +44,16 @@
>
</li>
</ul>
<div v-else class="entities__selector--empty">
<svgicon name="error" width="17" height="17" />
<p>No labels available</p>
</div>
</div>
</span>
</template>

<script>
import "assets/icons/error";
import { mapActions } from "vuex";
export default {
data: () => ({
Expand Down Expand Up @@ -159,7 +164,7 @@ export default {
background: palette(grey, smooth);
font-weight: 600;
padding: 0.8em;
border-radius: 1px;
border-radius: 5px;
&__container {
@include font-size(14px);
line-height: 1em;
Expand Down Expand Up @@ -193,6 +198,17 @@ export default {
cursor: pointer !important;
}
}
&--empty {
display: flex;
align-items: center;
.svg-icon {
margin-right: 0.5em;
}
p {
margin: 0;
font-weight: 400;
}
}
}
}
.entity {
Expand Down

0 comments on commit e91e674

Please sign in to comment.