diff --git a/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx b/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx
index 95d26e74a..4d18ca3cd 100644
--- a/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx
+++ b/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx
@@ -268,7 +268,9 @@ export const EnvelopeEditorFieldsPage = () => {
});
};
- if (!editorConfig.general?.allowAddFieldsStep && !editorConfig.general?.allowAddContentsStep) {
+ const { allowContents } = editorConfig.actions;
+
+ if (!editorConfig.general?.allowAddFieldsStep) {
return null;
}
@@ -371,7 +373,7 @@ export const EnvelopeEditorFieldsPage = () => {
customPageRenderer={EnvelopeEditorFieldsPageRenderer}
scrollParentRef={scrollableContainerRef}
errorMessage={PDF_VIEWER_ERROR_MESSAGES.editor}
- toolbar={['zoom', 'fields', 'contents']}
+ toolbar={allowContents ? ['zoom', 'fields', 'contents'] : ['zoom', 'fields']}
/>
) : (
@@ -391,7 +393,7 @@ export const EnvelopeEditorFieldsPage = () => {
{currentEnvelopeItem && envelope.recipients.length > 0 && (
onEditorTabChange(value as EnvelopeEditorTab)}>
- {editorConfig.general?.allowAddFieldsStep && editorConfig.general?.allowAddContentsStep && (
+ {allowContents && (
{
{/* Contents tab */}
-
-
-
- Add Content
-
+ {allowContents && (
+
+
+
+
- {/* Content details section. */}
-
- {selectedContent && (
-
-
+ {/* Content details section. */}
+
+ {selectedContent && (
+
+
-
-
- {_(ContentSettingsTypeTranslations[selectedContent.contentMeta.type])}
-
+
+
+ {_(ContentSettingsTypeTranslations[selectedContent.contentMeta.type])}
+
- {match(selectedContent.contentMeta.type)
- .with(EnvelopeContentType.TEXT, () => )
- .with(EnvelopeContentType.LINE, () => )
- .with(EnvelopeContentType.SHAPE, () => )
- .with(EnvelopeContentType.HIGHLIGHT, () => )
- .with(EnvelopeContentType.IMAGE, () => (
-
- ))
- .exhaustive()}
-
-
- )}
-
-
+ {match(selectedContent.contentMeta.type)
+ .with(EnvelopeContentType.TEXT, () =>
)
+ .with(EnvelopeContentType.LINE, () =>
)
+ .with(EnvelopeContentType.SHAPE, () =>
)
+ .with(EnvelopeContentType.HIGHLIGHT, () =>
)
+ .with(EnvelopeContentType.IMAGE, () => (
+
+ ))
+ .exhaustive()}
+
+
+ )}
+
+
+ )}
)}
diff --git a/apps/remix/app/components/general/envelope-editor/envelope-editor.tsx b/apps/remix/app/components/general/envelope-editor/envelope-editor.tsx
index 03fee92b2..f715669e4 100644
--- a/apps/remix/app/components/general/envelope-editor/envelope-editor.tsx
+++ b/apps/remix/app/components/general/envelope-editor/envelope-editor.tsx
@@ -90,13 +90,7 @@ export const EnvelopeEditor = () => {
const [searchParams, setSearchParams] = useSearchParams();
const {
- general: {
- minimizeLeftSidebar,
- allowUploadAndRecipientStep,
- allowAddFieldsStep,
- allowAddContentsStep,
- allowPreviewStep,
- },
+ general: { minimizeLeftSidebar, allowUploadAndRecipientStep, allowAddFieldsStep, allowPreviewStep },
actions: {
allowDistributing,
allowDirectLink,
@@ -114,7 +108,7 @@ export const EnvelopeEditor = () => {
steps.push(UPLOAD_STEP);
}
- if (allowAddFieldsStep || allowAddContentsStep) {
+ if (allowAddFieldsStep) {
steps.push(ADD_FIELDS_STEP);
}
@@ -530,16 +524,11 @@ export const EnvelopeEditor = () => {
pageToRender,
allowUploadAndRecipientStep,
allowAddFieldsStep,
- allowAddContentsStep,
allowPreviewStep,
})
.with({ pageToRender: 'loading' }, () =>
)
.with({ pageToRender: 'upload', allowUploadAndRecipientStep: true }, () =>
)
- .with(
- { pageToRender: 'addFields', allowAddFieldsStep: true },
- { pageToRender: 'addFields', allowAddContentsStep: true },
- () =>
,
- )
+ .with({ pageToRender: 'addFields', allowAddFieldsStep: true }, () =>
)
.with({ pageToRender: 'preview', allowPreviewStep: true }, () =>
)
.otherwise(() => null)}
diff --git a/apps/remix/app/routes/embed+/playground.tsx b/apps/remix/app/routes/embed+/playground.tsx
index 55a8bddfd..d443d1bfd 100644
--- a/apps/remix/app/routes/embed+/playground.tsx
+++ b/apps/remix/app/routes/embed+/playground.tsx
@@ -50,7 +50,6 @@ export default function EmbedPlaygroundPage() {
allowConfigureEnvelopeTitle: true,
allowUploadAndRecipientStep: true,
allowAddFieldsStep: true,
- allowAddContentsStep: true,
allowPreviewStep: true,
minimizeLeftSidebar: true,
});
@@ -68,6 +67,7 @@ export default function EmbedPlaygroundPage() {
});
const [actionsFeatures, setActionsFeatures] = useState({
+ allowContents: true,
allowAttachments: true,
allowDistributing: false,
allowDirectLink: false,
diff --git a/packages/lib/client-only/providers/envelope-editor-provider.tsx b/packages/lib/client-only/providers/envelope-editor-provider.tsx
index e3dc6f3e8..21be26d90 100644
--- a/packages/lib/client-only/providers/envelope-editor-provider.tsx
+++ b/packages/lib/client-only/providers/envelope-editor-provider.tsx
@@ -206,9 +206,7 @@ export const EnvelopeEditorProvider = ({
};
}, [isCscMode, providedEditorConfig]);
- const [selectedEditorTab, setSelectedEditorTab] = useState