Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a scrollbar to the duplicate import modal #71

Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## UNRELEASED

### Adds

* Add a scrollbar to the duplicate import modal to handle too many duplicates, and fixed the "Type" column to display the correct document type.

## 2.2.0 (2024-07-12)

### Adds
Expand Down
61 changes: 36 additions & 25 deletions ui/apos/components/AposDuplicateImportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,33 @@

<div class="apos-import-duplicate__section">
<table class="apos-table">
<thead>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

<tr>

Check warning on line 25 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 6.0)

Expected indentation of 16 spaces but found 18 spaces

Check warning on line 25 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 5.0)

Expected indentation of 16 spaces but found 18 spaces

Check warning on line 25 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 6.0)

Expected indentation of 16 spaces but found 18 spaces

Check warning on line 25 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 5.0)

Expected indentation of 16 spaces but found 18 spaces

Check warning on line 25 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 5.0)

Expected indentation of 16 spaces but found 18 spaces

Check warning on line 25 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected indentation of 16 spaces but found 18 spaces

Check warning on line 25 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 6.0)

Expected indentation of 16 spaces but found 18 spaces

Check warning on line 25 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 4.4)

Expected indentation of 16 spaces but found 18 spaces

Check warning on line 25 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected indentation of 16 spaces but found 18 spaces
<th class="apos-table__header">

Check warning on line 26 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 6.0)

Expected indentation of 18 spaces but found 20 spaces

Check warning on line 26 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 5.0)

Expected indentation of 18 spaces but found 20 spaces

Check warning on line 26 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 6.0)

Expected indentation of 18 spaces but found 20 spaces

Check warning on line 26 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 5.0)

Expected indentation of 18 spaces but found 20 spaces

Check warning on line 26 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 5.0)

Expected indentation of 18 spaces but found 20 spaces

Check warning on line 26 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected indentation of 18 spaces but found 20 spaces

Check warning on line 26 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 6.0)

Expected indentation of 18 spaces but found 20 spaces

Check warning on line 26 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 4.4)

Expected indentation of 18 spaces but found 20 spaces

Check warning on line 26 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected indentation of 18 spaces but found 20 spaces
<AposButton

Check warning on line 27 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 6.0)

Expected indentation of 20 spaces but found 22 spaces

Check warning on line 27 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 5.0)

Expected indentation of 20 spaces but found 22 spaces

Check warning on line 27 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 6.0)

Expected indentation of 20 spaces but found 22 spaces

Check warning on line 27 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 5.0)

Expected indentation of 20 spaces but found 22 spaces

Check warning on line 27 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 5.0)

Expected indentation of 20 spaces but found 22 spaces

Check warning on line 27 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected indentation of 20 spaces but found 22 spaces

Check warning on line 27 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 6.0)

Expected indentation of 20 spaces but found 22 spaces

Check warning on line 27 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 4.4)

Expected indentation of 20 spaces but found 22 spaces

Check warning on line 27 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected indentation of 20 spaces but found 22 spaces
class="apos-toggle"

Check warning on line 28 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 28 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 28 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 28 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 28 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 28 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 28 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 28 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 28 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected indentation of 22 spaces but found 24 spaces
:class="{ 'apos-toggle--blank': !checked.length }"

Check warning on line 29 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 29 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 29 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 29 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 29 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 29 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 29 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 29 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 29 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected indentation of 22 spaces but found 24 spaces
data-apos-test="contextMenuTrigger"

Check warning on line 30 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 30 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 30 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 30 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 30 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 30 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 30 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 30 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 30 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected indentation of 22 spaces but found 24 spaces
type="quiet"

Check warning on line 31 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 31 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 31 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 31 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 31 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 31 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 31 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 31 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 31 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected indentation of 22 spaces but found 24 spaces
:text-color="checkboxIconColor"

Check warning on line 32 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 32 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 32 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 32 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 32 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 32 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 32 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 32 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 32 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected indentation of 22 spaces but found 24 spaces
:icon="checkboxIcon"

Check warning on line 33 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 33 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 33 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 33 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 33 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 33 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 33 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 33 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 33 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected indentation of 22 spaces but found 24 spaces
:icon-only="true"

Check warning on line 34 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 34 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 34 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 34 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 34 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 5.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 34 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 34 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (18, 6.0)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 34 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (16, 4.4)

Expected indentation of 22 spaces but found 24 spaces

Check warning on line 34 in ui/apos/components/AposDuplicateImportModal.vue

View workflow job for this annotation

GitHub Actions / build (20, 4.4)

Expected indentation of 22 spaces but found 24 spaces
:icon-size="10"
@click.stop="toggle"
/>
</th>
<th class="apos-table__header">
{{ $t('aposImportExport:title') }}
</th>
<th class="apos-table__header">
{{ $t('aposImportExport:type') }}
</th>
<th class="apos-table__header">
{{ $t('aposImportExport:lastEdited') }}
</th>
</tr>
</thead>
<tbody>
<tr>
<th class="apos-table__header">
<AposButton
class="apos-toggle"
:class="{ 'apos-toggle--blank': !checked.length }"
data-apos-test="contextMenuTrigger"
type="quiet"
:text-color="checkboxIconColor"
:icon="checkboxIcon"
:icon-only="true"
:icon-size="10"
@click.stop="toggle"
/>
</th>
<th class="apos-table__header">
{{ $t('aposImportExport:title') }}
</th>
<th class="apos-table__header">
{{ $t('aposImportExport:type') }}
</th>
<th class="apos-table__header">
{{ $t('aposImportExport:lastEdited') }}
</th>
</tr>
<tr
v-for="doc in duplicatedDocs"
:key="doc.aposDocId"
Expand Down Expand Up @@ -243,7 +245,7 @@
: this.duplicatedDocs.map(({ aposDocId }) => aposDocId);
},
docLabel(doc) {
const moduleOptions = apos.modules[this.type];
const moduleOptions = apos.modules[doc.type];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! 👌

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks


return moduleOptions?.label
? this.$t(moduleOptions?.label)
Expand Down Expand Up @@ -323,6 +325,15 @@
display: flex;
flex-direction: column;
align-items: baseline;
max-height: 210px;
overflow-y: auto;
}

.apos-import-duplicate__section thead {
position: sticky;
top: 0;
z-index: 1;
background-color: var(--a-background-primary);
}

.apos-import-duplicate__section .apos-table__header {
Expand Down
Loading