-
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
feat(dashboard): workflow trigger integration instructions MRK-317 #7612
Changes from all commits
08f6809
d802e73
873e6c3
4a85c51
98718d0
a58ded1
9c956ca
9beb535
fd6465a
1d145d1
ebc08fe
79a7bc3
5e91a00
3316eed
ffa5d91
fe00433
4873891
e24ef28
708e987
6f066fa
e409051
eac51c4
309c572
90d718d
2dd0c95
f484041
24ee0e7
d60336c
3d936a5
97868e3
6d6aec2
5278236
0b77c58
fdc4efa
3a68369
101bc5a
0bf3712
efb13ab
86b502c
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,6 +1,6 @@ | ||
import { ReactNode } from 'react'; | ||
import { ExternalToast, toast } from 'sonner'; | ||
import { Toast, ToastIcon, ToastProps } from './sonner'; | ||
import { ReactNode } from 'react'; | ||
|
||
export const showToast = ({ | ||
options, | ||
|
@@ -33,7 +33,7 @@ export const showSuccessToast = (message: string, position: 'bottom-center' | 't | |
export const showErrorToast = ( | ||
message: string, | ||
title?: string, | ||
position: 'bottom-center' | 'top-center' = 'bottom-center' | ||
position: 'bottom-center' | 'top-center' | 'bottom-right' = 'bottom-right' | ||
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. make the default to right side |
||
) => { | ||
showToast({ | ||
title, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,5 @@ | ||
import { Editor } from '@/components/primitives/editor'; | ||
import { LanguageName, loadLanguage } from '@uiw/codemirror-extensions-langs'; | ||
import { EditorView } from '@uiw/react-codemirror'; | ||
import { useMemo } from 'react'; | ||
import type { SnippetLanguage } from './types'; | ||
import { CodeBlock, Language } from '../../primitives/code-block'; | ||
|
||
const basicSetup = { lineNumbers: true }; | ||
|
||
export const SnippetEditor = ({ | ||
language, | ||
value, | ||
readOnly = false, | ||
}: { | ||
language: SnippetLanguage; | ||
value: string; | ||
readOnly?: boolean; | ||
}) => { | ||
const editorLanguage: LanguageName = language === 'framework' ? 'typescript' : language; | ||
|
||
const extensions = useMemo(() => { | ||
const res = [EditorView.lineWrapping]; | ||
const langExtension = loadLanguage(editorLanguage)?.extension; | ||
if (langExtension) { | ||
res.push(langExtension); | ||
} | ||
return res; | ||
}, [editorLanguage]); | ||
|
||
return ( | ||
<Editor | ||
readOnly={readOnly} | ||
lang={editorLanguage} | ||
className="h-full" | ||
value={value} | ||
extensions={extensions} | ||
basicSetup={basicSetup} | ||
multiline | ||
/> | ||
); | ||
export const SnippetEditor = ({ language, value }: { language: Language; value: string }) => { | ||
return <CodeBlock theme="light" className="h-full overflow-auto" language={language} code={value} />; | ||
}; | ||
Comment on lines
+3
to
+4
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've updated it to use the code block reusable component instead of the current code mirror implementation to consolidate look and feel across all the snippets in the app |
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.
I've updated the code-block component to be used across all the dashboard areas including workflow trigger page