+
+
+
- { identifierResult === CHOICE && (
-
- { isSearching ?
: (
+ { identifierResult === CHOICE && (
+
+ { isSearching ? : (
+
+ ) }
+
+ ) }
+ { !isTouchOrSmall && (
+
- ) }
- )}
+ ) }
);
diff --git a/src/js/component/ui/modal.jsx b/src/js/component/ui/modal.jsx
index 2499c479..2ab27a00 100644
--- a/src/js/component/ui/modal.jsx
+++ b/src/js/component/ui/modal.jsx
@@ -2,6 +2,8 @@ import cx from 'classnames';
import PropTypes from 'prop-types';
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useRef } from 'react';
import ReactModal from 'react-modal';
+import { createPortal} from 'react-dom';
+
import { useSelector } from 'react-redux';
import { usePrevious } from 'web-common/hooks';
import { getScrollbarWidth, pick } from 'web-common/utils';
@@ -51,20 +53,26 @@ const Modal = forwardRef((props, ref) => {
}
}, [isOpen, wasOpen]);
- return (
+ return isBusy ? createPortal(
+
, document.querySelector(`.${containterClassName}`)
+ ) : (
document.querySelector(`.${containterClassName}`) }
- className= { cx('modal modal-content', className) }
- overlayClassName={ cx({ 'loading': isBusy }, 'modal-backdrop', overlayClassName) }
+ className={cx('modal modal-content', className) }
+ overlayClassName={cx('modal-backdrop', overlayClassName) }
isOpen={ isOpen }
closeTimeoutMS={ isTouchOrSmall ? 200 : null }
{ ...pick(rest, ['contentLabel', 'onRequestClose', 'shouldFocusAfterRender', 'shouldCloseOnOverlayClick', 'shouldCloseOnEsc', 'shouldReturnFocusAfterClose']) }
>
- { isBusy ? : children }
+ { children }
);
});
diff --git a/src/js/reducers/identifier.js b/src/js/reducers/identifier.js
index 5969462c..6205ca1c 100644
--- a/src/js/reducers/identifier.js
+++ b/src/js/reducers/identifier.js
@@ -12,7 +12,9 @@ const defaultState = {
items: null,
identifier: null,
identifierIsUrl: null,
+ import: false,
next: null,
+ message: null
}
const identifier = (state = defaultState, action) => {
@@ -32,6 +34,7 @@ const identifier = (state = defaultState, action) => {
result: null,
item: null,
items: null,
+ import: action.import,
next: null,
};
case RECEIVE_ADD_BY_IDENTIFIER:
@@ -44,7 +47,9 @@ const identifier = (state = defaultState, action) => {
result: action.result,
item: action.item || null,
items: action.items || null,
+ import: action.import,
next: action.next,
+ message: action.message,
};
case ERROR_ADD_BY_IDENTIFIER:
return {
@@ -56,6 +61,7 @@ const identifier = (state = defaultState, action) => {
item: null,
items: null,
identifierIsUrl: null,
+ import: action.import,
next: null,
};
case REQUEST_IDENTIFIER_MORE:
diff --git a/src/scss/components/_tabs.scss b/src/scss/components/_tabs.scss
index 84cc4694..79040fba 100644
--- a/src/scss/components/_tabs.scss
+++ b/src/scss/components/_tabs.scss
@@ -3,6 +3,7 @@
border-bottom: $border-width solid $tabs-border-color;
&.justified {
+ flex: 1 1 auto;
width: 100%;
}
@@ -16,7 +17,6 @@
color: $tab-inactive-color;
cursor: pointer;
display: inline;
- flex: 1 1 auto;
font-family: inherit;
font-size: $font-size-base;
font-weight: inherit;
diff --git a/src/scss/components/modal/_identifier-picker.scss b/src/scss/components/modal/_identifier-picker.scss
index aa50f839..f09ce9a1 100644
--- a/src/scss/components/modal/_identifier-picker.scss
+++ b/src/scss/components/modal/_identifier-picker.scss
@@ -1,8 +1,18 @@
-//
-// Multiple choice dialog
-//
-
.identifier-picker-modal {
+ .modal-body {
+ overflow: auto;
+ max-height: calc(100vh - 96px);
+
+ @include mouse-and-bp-up(md) {
+ max-height: calc(90vh - 96px - 32px); // 90% of the screen, accounting for the modal header and modal margin
+ }
+ }
+
+ .modal-footer-left {
+ .btn-link + .btn-link {
+ margin-left: $space-sm;
+ }
+ }
.results {
margin: 0 - $modal-inner-padding;
diff --git a/src/scss/components/modal/_react-modal.scss b/src/scss/components/modal/_react-modal.scss
index 6b205059..a7c2acd2 100644
--- a/src/scss/components/modal/_react-modal.scss
+++ b/src/scss/components/modal/_react-modal.scss
@@ -27,13 +27,14 @@
align-items: center;
.modal {
+ border: none;
display: flex;
align-items: center;
justify-content: center;
}
.icon-spin {
- color: $modal-icon-spin-color;
+ color: var(--color-backdrop-spinner);
}
}
}
@@ -92,24 +93,24 @@
padding-left: $modal-inner-padding;
padding-right: $modal-inner-padding;
- @include touch-or-bp-down(sm) {
- height: $modal-header-height + $border-width;
- background-color: $modal-touch-header-bg;
+ &-left,
+ &-right {
+ flex: 1 0 0;
+ }
- &-left,
- &-right {
- flex: 1 0 0;
- }
+ &-center {
+ flex: 2 0 0;
+ max-width: 50%;
+ text-align: center;
+ }
- &-center {
- flex: 2 0 0;
- max-width: 50%;
- text-align: center;
- }
+ &-right {
+ text-align: right;
+ }
- &-right {
- text-align: right;
- }
+ @include touch-or-bp-down(sm) {
+ height: $modal-header-height + $border-width;
+ background-color: $modal-touch-header-bg;
}
@include mouse-and-bp-up(md) {
diff --git a/src/scss/themes/_common.scss b/src/scss/themes/_common.scss
index 80d5169c..fd99d393 100644
--- a/src/scss/themes/_common.scss
+++ b/src/scss/themes/_common.scss
@@ -205,7 +205,6 @@ $modal-header-bg: $shade-0;
$modal-touch-header-bg: $shade-1;
$modal-form-header-bg: var(--color-shade-1-darker);
$modal-border-color: $shade-2;
-$modal-icon-spin-color: $shade-0;
// Toolbar
$tool-group-separator-color: $shade-2;
diff --git a/src/scss/themes/_dark.scss b/src/scss/themes/_dark.scss
index e9c19a11..bf45ff52 100644
--- a/src/scss/themes/_dark.scss
+++ b/src/scss/themes/_dark.scss
@@ -82,6 +82,7 @@ $-colors: (
color-nav-sidebar-border: #252525,
color-identifier-badge-hover-border: #b9b8b5,
color-backdrop: rgba(0, 0, 0, 0.6),
+ color-backdrop-spinner: #fff,
accent-red-on-shade-1: #c52f37,
primary-on-shade-1: #e3e3e3,
color-nav-sidebar: #111,
diff --git a/src/scss/themes/_light.scss b/src/scss/themes/_light.scss
index e07fadd1..a85b049d 100644
--- a/src/scss/themes/_light.scss
+++ b/src/scss/themes/_light.scss
@@ -84,6 +84,7 @@ $-colors: (
color-nav-sidebar-border: #252525,
color-identifier-badge-hover-border: #b9b8b5,
color-backdrop: rgba(0, 0, 0, 0.4),
+ color-backdrop-spinner: #fff,
accent-red-on-shade-1: #db2c3a, // only differs from accent-red in dark theme
primary-on-shade-1: #252525,
color-nav-sidebar: #111,
diff --git a/src/static/icons/16/import.svg b/src/static/icons/16/import.svg
new file mode 100644
index 00000000..868ceb3c
--- /dev/null
+++ b/src/static/icons/16/import.svg
@@ -0,0 +1,7 @@
+
+
diff --git a/test/snapshots/desktop-items-list-macos-safari.png b/test/snapshots/desktop-items-list-macos-safari.png
index fbe6df6a..40430b6a 100644
Binary files a/test/snapshots/desktop-items-list-macos-safari.png and b/test/snapshots/desktop-items-list-macos-safari.png differ
diff --git a/test/snapshots/desktop-items-list-windows-chrome-small-desktop.png b/test/snapshots/desktop-items-list-windows-chrome-small-desktop.png
index 1d1b3ee2..a064e162 100644
Binary files a/test/snapshots/desktop-items-list-windows-chrome-small-desktop.png and b/test/snapshots/desktop-items-list-windows-chrome-small-desktop.png differ
diff --git a/test/snapshots/desktop-items-list-windows-chrome.png b/test/snapshots/desktop-items-list-windows-chrome.png
index 77790ebb..d0371dfc 100644
Binary files a/test/snapshots/desktop-items-list-windows-chrome.png and b/test/snapshots/desktop-items-list-windows-chrome.png differ