-
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
chore(dashboard): a few more fixes #6985
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,4 +1,4 @@ | ||
import { useMemo } from 'react'; | ||
import { useEffect, useMemo } from 'react'; | ||
import { motion } from 'framer-motion'; | ||
import { useNavigate, useParams } from 'react-router-dom'; | ||
|
||
|
@@ -16,6 +16,7 @@ import { useFetchStep } from '@/hooks/use-fetch-step'; | |
import { VisuallyHidden } from '@/components/primitives/visually-hidden'; | ||
import { PageMeta } from '@/components/page-meta'; | ||
import { getStepBase62Id } from '@/utils/step'; | ||
import { EXCLUDED_EDITOR_TYPES } from '@/utils/constants'; | ||
|
||
const transitionSetting = { ease: [0.29, 0.83, 0.57, 0.99], duration: 0.4 }; | ||
|
||
|
@@ -34,9 +35,21 @@ export const EditStepSidebar = () => { | |
); | ||
|
||
const handleCloseSidebar = () => { | ||
navigate('../', { relative: 'path' }); | ||
navigate('..', { relative: 'path' }); | ||
}; | ||
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. removed |
||
|
||
const isNotSupportedEditorType = EXCLUDED_EDITOR_TYPES.includes(stepType ?? ''); | ||
|
||
useEffect(() => { | ||
if (isNotSupportedEditorType) { | ||
navigate('..', { relative: 'path' }); | ||
} | ||
}, [isNotSupportedEditorType, navigate]); | ||
|
||
if (isNotSupportedEditorType) { | ||
return null; | ||
} | ||
|
||
Comment on lines
+43
to
+51
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. if step type is not supported, we should not allow opening the editor |
||
return ( | ||
<> | ||
<PageMeta title={`Edit ${step?.name}`} /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ import { | |
AlertDialogTitle, | ||
} from '@/components/primitives/alert-dialog'; | ||
|
||
const tabsContentClassName = 'h-full w-full px-3 py-3.5'; | ||
const tabsContentClassName = 'h-full w-full px-3 py-3.5 overflow-y-auto'; | ||
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. scrollbar for the In-App Editor drawer content when there is not enough space |
||
|
||
export const InAppTabs = ({ workflow, step }: { workflow: WorkflowResponseDto; step: StepDataDto }) => { | ||
const { stepSlug = '', workflowSlug = '' } = useParams<{ workflowSlug: string; stepSlug: string }>(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
import { StepTypeEnum } from '@novu/shared'; | ||
|
||
export const AUTOCOMPLETE_PASSWORD_MANAGERS_OFF = { | ||
autoComplete: 'off', | ||
'data-1p-ignore': true, | ||
'data-form-type': 'other', | ||
}; | ||
|
||
export const EXCLUDED_EDITOR_TYPES: string[] = [ | ||
StepTypeEnum.DIGEST, | ||
StepTypeEnum.DELAY, | ||
StepTypeEnum.TRIGGER, | ||
StepTypeEnum.CUSTOM, | ||
]; |
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.
do not show the
Configure {channel} template
button for the step types: digest, delay, custom, trigger