-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(dashboard): Apply UI fixes to email and in-app editor #7278
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import { Separator } from '@/components/primitives/separator'; | ||
import { getComponentByType } from '@/components/workflow-editor/steps/component-utils'; | ||
import { EmailPreviewHeader } from '@/components/workflow-editor/steps/email/email-preview'; | ||
import { EmailTabsEditSection } from '@/components/workflow-editor/steps/email/email-tabs-section'; | ||
import { type UiSchema } from '@novu/shared'; | ||
|
||
const subjectKey = 'subject'; | ||
|
@@ -14,13 +13,10 @@ export const EmailEditor = (props: EmailEditorProps) => { | |
|
||
return ( | ||
<> | ||
<EmailPreviewHeader className="p-3" /> | ||
<EmailTabsEditSection>{subject && getComponentByType({ component: subject.component })}</EmailTabsEditSection> | ||
|
||
<EmailPreviewHeader /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think removing the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fixing that now. |
||
<div className="px-8 py-2">{getComponentByType({ component: subject.component })}</div> | ||
<Separator className="bg-neutral-100" /> | ||
<EmailTabsEditSection> | ||
{emailEditor && getComponentByType({ component: emailEditor.component })} | ||
</EmailTabsEditSection> | ||
<div className="pl-6">{emailEditor && getComponentByType({ component: emailEditor.component })}</div> | ||
</> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ import { EmailEditor } from '@/components/workflow-editor/steps/email/email-edit | |
import { EmailEditorPreview } from '@/components/workflow-editor/steps/email/email-editor-preview'; | ||
import { CustomStepControls } from '../controls/custom-step-controls'; | ||
import { EmailTabsEditSection } from '@/components/workflow-editor/steps/email/email-tabs-section'; | ||
import { WorkflowOriginEnum } from '@novu/shared'; | ||
|
||
const tabsContentClassName = 'h-full w-full overflow-y-auto'; | ||
|
||
|
@@ -55,10 +56,16 @@ export const EmailTabs = (props: StepEditorProps) => { | |
</header> | ||
<Separator /> | ||
<TabsContent value="editor" className={tabsContentClassName}> | ||
<EmailEditor uiSchema={uiSchema} /> | ||
<EmailTabsEditSection> | ||
<CustomStepControls dataSchema={dataSchema} origin={workflow.origin} /> | ||
</EmailTabsEditSection> | ||
{workflow.origin === WorkflowOriginEnum.NOVU_CLOUD && ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Show sections based on workflow type avoiding redundant empty divs or the dangling Email Acme header |
||
<EmailTabsEditSection> | ||
<EmailEditor uiSchema={uiSchema} /> | ||
</EmailTabsEditSection> | ||
)} | ||
{workflow.origin === WorkflowOriginEnum.EXTERNAL && ( | ||
<EmailTabsEditSection> | ||
<CustomStepControls dataSchema={dataSchema} origin={workflow.origin} /> | ||
</EmailTabsEditSection> | ||
)} | ||
</TabsContent> | ||
<TabsContent value="preview" className={tabsContentClassName}> | ||
<EmailEditorPreview workflow={workflow} step={step} formValues={form.getValues()} /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix alignment issues between the body and the preview header. Padding and margin should always be on the layout level, not on each component of the preview.