From 0924864bf4390c5f19fa5fd8003c8fcf1bfff043 Mon Sep 17 00:00:00 2001 From: Leire Date: Fri, 13 Dec 2024 09:55:47 +0100 Subject: [PATCH] feat: export to hub UI QA (#5747) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This includes some fixes and improvements in the export to hub feature UI - [x] Fix private / public info on exporting - [x] Prevent the dialog from closing when dragging on text inputs - [x] Update exporting dialog styles - [x] New Tooltip plugin - [x] Update translations --------- Co-authored-by: Damián Pumar --- argilla-frontend/assets/icons/export.js | 27 ++ argilla-frontend/assets/icons/index.js | 1 + .../scss/abstract/placeholders/_tooltip.scss | 4 + argilla-frontend/assets/scss/base/base.scss | 2 +- .../base/base-tooltip/BaseFixedTooltip.vue | 189 ++++++++++ .../header/header-bar/ExportToHub.vue | 104 ++++-- .../header-bar/useExportToHubViewModel.ts | 4 +- .../plugins/directives/tooltip.directive.ts | 339 +----------------- argilla-frontend/static/icons/export.svg | 4 + argilla-frontend/translation/de.js | 21 +- argilla-frontend/translation/en.js | 13 +- argilla-frontend/translation/es.js | 12 +- 12 files changed, 345 insertions(+), 375 deletions(-) create mode 100644 argilla-frontend/assets/icons/export.js create mode 100644 argilla-frontend/components/base/base-tooltip/BaseFixedTooltip.vue create mode 100644 argilla-frontend/static/icons/export.svg diff --git a/argilla-frontend/assets/icons/export.js b/argilla-frontend/assets/icons/export.js new file mode 100644 index 0000000000..236f247c5f --- /dev/null +++ b/argilla-frontend/assets/icons/export.js @@ -0,0 +1,27 @@ +/* + * coding=utf-8 + * Copyright 2021-present, the Recognai S.L. team. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-disable */ +var icon = require('vue-svgicon') +icon.register({ + 'export': { + width: 26, + height: 31, + viewBox: '0 0 26 31', + data: '' + } +}) \ No newline at end of file diff --git a/argilla-frontend/assets/icons/index.js b/argilla-frontend/assets/icons/index.js index 53de88bc02..36e92d0233 100644 --- a/argilla-frontend/assets/icons/index.js +++ b/argilla-frontend/assets/icons/index.js @@ -19,6 +19,7 @@ require('./discard') require('./draggable') require('./expand-arrows') require('./exploration') +require('./export') require('./external-link') require('./external') require('./filter') diff --git a/argilla-frontend/assets/scss/abstract/placeholders/_tooltip.scss b/argilla-frontend/assets/scss/abstract/placeholders/_tooltip.scss index c7ffeb54d2..aeff1d1889 100644 --- a/argilla-frontend/assets/scss/abstract/placeholders/_tooltip.scss +++ b/argilla-frontend/assets/scss/abstract/placeholders/_tooltip.scss @@ -177,6 +177,10 @@ $tooltip-border-radius: $border-radius-s; top: auto; transform: none; } + } @else if $position == "none" { + &:after { + display: none; + } } &:before { content: none !important; diff --git a/argilla-frontend/assets/scss/base/base.scss b/argilla-frontend/assets/scss/base/base.scss index 6a5f1f1f96..383ad3cee4 100644 --- a/argilla-frontend/assets/scss/base/base.scss +++ b/argilla-frontend/assets/scss/base/base.scss @@ -54,7 +54,7 @@ body { a, button { - color: var(--fg-secondary); + color: var(--fg-primary); } audio, diff --git a/argilla-frontend/components/base/base-tooltip/BaseFixedTooltip.vue b/argilla-frontend/components/base/base-tooltip/BaseFixedTooltip.vue new file mode 100644 index 0000000000..f7cfe6c82b --- /dev/null +++ b/argilla-frontend/components/base/base-tooltip/BaseFixedTooltip.vue @@ -0,0 +1,189 @@ + + + + + diff --git a/argilla-frontend/components/features/annotation/header/header-bar/ExportToHub.vue b/argilla-frontend/components/features/annotation/header/header-bar/ExportToHub.vue index 61683a57c1..1308838b06 100644 --- a/argilla-frontend/components/features/annotation/header/header-bar/ExportToHub.vue +++ b/argilla-frontend/components/features/annotation/header/header-bar/ExportToHub.vue @@ -2,27 +2,52 @@
{{ $t("button.exportToHub") }} + + {{ + $t("button.exportToHub") + }} + -

- - {{ exportToHubForm.orgOrUsername }}/{{ exportToHubForm.datasetName }} - {{ !exportToHub.isPrivate ? "(private)" : "" }} -

+
+

+

+ + {{ exportToHubForm.orgOrUsername }}/{{ + exportToHubForm.datasetName + }} + +

+

@@ -34,9 +59,7 @@ icon="info" icon-color="var(--fg-tertiary)" v-tooltip="{ - backgroundColor: 'var(--bg-accent-grey-5)', content: $t('exportToHub.ownerTooltip'), - width: 300, }" role="tooltip" :aria-label="$t('exportToHub.ownerTooltip')" @@ -53,9 +76,11 @@ aria-required="true" />
- +