Improve document upload UX and refactor wizard layout
Enhanced the `CreateEnvelopeWizardPopup` component: - Added a new grid layout (`sender-create-wizard__body-layout`) to separate main content and side panel. - Introduced a collapsible side panel for document upload and preview. - Replaced old upload logic with `PdfFileDropZone` and added support for displaying document metadata (name, size) and replacement hints. - Added asynchronous document preview rendering with `EnsureDocumentPreviewPreparedAsync`. Localization updates: - Added new localized strings for document upload hints in `de-DE`, `en-US`, and `fr-FR`. CSS updates: - Styled the new layout and side panel with transitions. - Updated `PdfFileDropZone` styles for different states (e.g., document uploaded). Refactored code for better maintainability and improved user feedback during document upload and preview preparation.
This commit is contained in:
@@ -1103,6 +1103,20 @@
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.sender-create-wizard__body-layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
|
||||
gap: 0.85rem;
|
||||
align-items: stretch;
|
||||
min-height: min(66vh, 620px);
|
||||
transition: grid-template-columns 220ms ease 0.2s, gap 220ms ease 0.2s;
|
||||
}
|
||||
|
||||
.sender-create-wizard__body-layout--document {
|
||||
grid-template-columns: minmax(0, 1fr) 0;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.sender-create-wizard-popup .dxbl-popup-content {
|
||||
max-height: min(78vh, 760px);
|
||||
overflow: auto;
|
||||
@@ -1121,6 +1135,7 @@
|
||||
border-radius: 10px;
|
||||
background: rgba(126, 34, 206, 0.04);
|
||||
padding: 0.75rem;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sender-create-wizard__stepper {
|
||||
@@ -1214,6 +1229,47 @@
|
||||
margin-top: 0.7rem;
|
||||
}
|
||||
|
||||
.sender-create-wizard__step-layout {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sender-create-wizard__step-main {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sender-create-wizard__wizard-side {
|
||||
min-width: 0;
|
||||
max-width: 280px;
|
||||
border: 1px solid rgba(126, 34, 206, 0.12);
|
||||
border-radius: 10px;
|
||||
background: rgba(126, 34, 206, 0.04);
|
||||
padding: 0.75rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: stretch;
|
||||
opacity: 1;
|
||||
transition: opacity 220ms ease 0.2s, transform 220ms ease 0.2s;
|
||||
}
|
||||
|
||||
.sender-create-wizard__wizard-side--hidden {
|
||||
opacity: 0;
|
||||
transform: translateX(12px);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.sender-create-wizard__body-layout--document .sender-create-wizard__wizard-side {
|
||||
max-width: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
border-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sender-create-wizard__wizard-side .sender-pdf-dropzone {
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.sender-create-wizard__meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -1658,6 +1714,11 @@
|
||||
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
|
||||
}
|
||||
|
||||
.sender-pdf-dropzone--has-document {
|
||||
border-color: rgba(16, 185, 129, 0.55);
|
||||
background: linear-gradient(180deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.07));
|
||||
}
|
||||
|
||||
.sender-pdf-dropzone--disabled {
|
||||
opacity: 0.55;
|
||||
cursor: not-allowed;
|
||||
@@ -1680,6 +1741,18 @@
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.sender-pdf-dropzone__doc-name {
|
||||
font-size: 0.82rem;
|
||||
font-weight: 700;
|
||||
color: #065f46;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.sender-pdf-dropzone__doc-size {
|
||||
font-size: 0.76rem;
|
||||
color: #047857;
|
||||
}
|
||||
|
||||
.sender-pdf-dropzone__input {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -1786,6 +1859,16 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sender-create-wizard__body-layout {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 0.7rem;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.sender-create-wizard__wizard-side {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.sender-create-wizard__receiver-remove-btn {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user