Skip to content

Commit

Permalink
MWPW-156766 & MWPW-160238
Browse files Browse the repository at this point in the history
  • Loading branch information
Blainegunn committed Oct 14, 2024
1 parent 82eae51 commit 4c69c57
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
1 change: 1 addition & 0 deletions acrobat/blocks/verb-widget/icons.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 3 additions & 15 deletions acrobat/blocks/verb-widget/verb-widget.css
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,10 @@
}

.verb-errorBtn {
position: absolute;
right: 0;
top: 0;
}

.verb-errorBtn::after {
content: '';
background-image: url('/acrobat/img/icons/ui/close.svg');
background-repeat: no-repeat;
background-size: 45px 50px;
display: flex;
align-items: center;
justify-content: center;
width: 50px;
height: 50px;
cursor: pointer;
position: absolute;
right: 10px;
bottom: 0;
}

.verb-errorIcon {
Expand Down
12 changes: 11 additions & 1 deletion acrobat/blocks/verb-widget/verb-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ export default async function init(element) {
const errorStateText = createTag('p', { class: 'verb-errorText' });
const errorIcon = createTag('div', { class: 'verb-errorIcon' });
const errorCloseBtn = createTag('div', { class: 'verb-errorBtn' });
const closeIconSvg = createSvgElement('CLOSE_ICON');
if (closeIconSvg) {
closeIconSvg.classList.add('close-icon');
errorCloseBtn.prepend(closeIconSvg);
}

widget.append(widgetContainer);
widgetContainer.append(widgetRow);
Expand Down Expand Up @@ -245,11 +250,15 @@ export default async function init(element) {
});

// Errors, Analytics & Logging
const lanaOptions = {
sampleRate: 1,
tags: 'DC_Milo,Project Unity (DC)',
};

const handleError = (str) => {
errorState.classList.add('verb-error');
errorState.classList.remove('hide');
errorStateText.textContent = str;

setTimeout(() => {
errorState.classList.remove('verb-error');
errorState.classList.add('hide');
Expand Down Expand Up @@ -289,6 +298,7 @@ export default async function init(element) {
|| e.detail?.code.includes('error_duplicate_asset')) {
handleError(e.detail?.message);
verbAnalytics('error', VERB);
window.lana?.log(`Error Status: ${e.detail?.message}, Error Message: ${e.detail?.status}`, lanaOptions);
}

// acrobat:verb-fillsign:error:page_count_missing_from_metadata_api
Expand Down

0 comments on commit 4c69c57

Please sign in to comment.