-
Notifications
You must be signed in to change notification settings - Fork 10
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: add connect to DB dialog #1838
Conversation
209df57
to
2243d04
Compare
const copyItem: ActionsSet[0] = { | ||
text: i18n('actions.copyPath'), | ||
action: actions.copyPath, | ||
iconEnd: <Copy />, | ||
}; | ||
const connectToDBItem = { | ||
text: i18n('actions.connectToDB'), | ||
action: actions.getConnectToDBDialog, | ||
iconEnd: <PlugConnection />, | ||
}; |
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.
const rootNodeType = isDomain(rootPath, rootType) | ||
? 'database' | ||
: mapPathTypeToNavigationTreeType(rootType); |
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.
Treat domain as database to show how to connect dialog for it
<ComponentsProvider registry={componentsRegistry}> | ||
<NiceModal.Provider>{children}</NiceModal.Provider> | ||
</ComponentsProvider> |
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.
Components from ComponentsProvider
weren't available inside NiceModal
2243d04
to
41b4141
Compare
top: 13px; | ||
right: 14px; |
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.
top
and right
to match with code area of syntax highlighter
const darkTheme: Record<string, React.CSSProperties> = { | ||
...dark, | ||
'pre[class*="language-"]': { | ||
...dark['pre[class*="language-"]'], | ||
background: vscDarkPlus['pre[class*="language-"]'].background, | ||
scrollbarColor: `var(--g-color-scroll-handle) transparent`, | ||
}, | ||
'code[class*="language-"]': { | ||
...dark['code[class*="language-"]'], | ||
whiteSpace: 'pre', | ||
}, | ||
}; | ||
|
||
const lightTheme: Record<string, React.CSSProperties> = { | ||
...light, | ||
'pre[class*="language-"]': { | ||
...light['pre[class*="language-"]'], | ||
background: 'var(--g-color-base-misc-light)', | ||
scrollbarColor: `var(--g-color-scroll-handle) transparent`, | ||
}, | ||
'code[class*="language-"]': { | ||
...light['code[class*="language-"]'], | ||
whiteSpace: 'pre', | ||
}, | ||
}; |
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.
Use the same style as for the YQL snippets but with some exceptions
41b4141
to
16f9fb5
Compare
16f9fb5
to
568c360
Compare
SyntaxHighlighter.registerLanguage('php', php); | ||
SyntaxHighlighter.registerLanguage('python', python); | ||
|
||
type ConnectToDBSyntaxHighlighterProps = { |
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.
With interface
there is TS error Exported variable 'ConnectToDBSyntaxHighlighterLazy' has or is using name 'ConnectToDBSyntaxHighlighterProps' from external module
Closes #1367, closes #1839
Test stand: https://nda.ya.ru/t/rHe1yYZK7BPzpK
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
😟 No changes in tests. 😕
Bundle Size: 🔺
Current: 80.18 MB | Main: 80.06 MB
Diff: +0.12 MB (0.15%)
ℹ️ CI Information