Skip to content
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

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Conversation

artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Jan 17, 2025

Closes #1367, closes #1839

Test stand: https://nda.ya.ru/t/rHe1yYZK7BPzpK

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
262 260 0 2 0

😟 No changes in tests. 😕

Bundle Size: 🔺

Current: 80.18 MB | Main: 80.06 MB
Diff: +0.12 MB (0.15%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@artemmufazalov artemmufazalov force-pushed the 1367-db-connection-snippets branch 2 times, most recently from 209df57 to 2243d04 Compare January 24, 2025 07:54
Comment on lines +164 to +173
const copyItem: ActionsSet[0] = {
text: i18n('actions.copyPath'),
action: actions.copyPath,
iconEnd: <Copy />,
};
const connectToDBItem = {
text: i18n('actions.connectToDB'),
action: actions.getConnectToDBDialog,
iconEnd: <PlugConnection />,
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-01-24 at 11 09 26

Comment on lines +55 to +57
const rootNodeType = isDomain(rootPath, rootType)
? 'database'
: mapPathTypeToNavigationTreeType(rootType);
Copy link
Member Author

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

Comment on lines +38 to +40
<ComponentsProvider registry={componentsRegistry}>
<NiceModal.Provider>{children}</NiceModal.Provider>
</ComponentsProvider>
Copy link
Member Author

@artemmufazalov artemmufazalov Jan 24, 2025

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

@artemmufazalov artemmufazalov force-pushed the 1367-db-connection-snippets branch from 2243d04 to 41b4141 Compare January 24, 2025 08:33
Comment on lines +19 to +20
top: 13px;
right: 14px;
Copy link
Member Author

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

Comment on lines +34 to +58
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',
},
};
Copy link
Member Author

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

@artemmufazalov artemmufazalov force-pushed the 1367-db-connection-snippets branch from 41b4141 to 16f9fb5 Compare January 24, 2025 08:39
@artemmufazalov artemmufazalov force-pushed the 1367-db-connection-snippets branch from 16f9fb5 to 568c360 Compare January 24, 2025 08:49
SyntaxHighlighter.registerLanguage('php', php);
SyntaxHighlighter.registerLanguage('python', python);

type ConnectToDBSyntaxHighlighterProps = {
Copy link
Member Author

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

@artemmufazalov artemmufazalov marked this pull request as ready for review January 24, 2025 08:55
@artemmufazalov artemmufazalov added this pull request to the merge queue Jan 27, 2025
Merged via the queue into main with commit ba22a39 Jan 27, 2025
8 checks passed
@artemmufazalov artemmufazalov deleted the 1367-db-connection-snippets branch January 27, 2025 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to connect: add btn to header and use icons in context menu Connection string
2 participants