-
Notifications
You must be signed in to change notification settings - Fork 504
dbeaver/pro#7897 add connection view plugin #4031
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
base: devel
Are you sure you want to change the base?
Conversation
…r-connection-view
…r-connection-view
…r-connection-view
| navigatorSettings: NavigatorSettings! | ||
| "Original navigator settings from the configuration file" | ||
| originalNavigatorSettings: NavigatorSettings! @since(version: "25.3.3") |
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.
actually you can add optional argument for the navigatorSettings field, something like:
navigatorSettings(datasourceSettings: Boolean): NavigatorSettings!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.
userSettings should be removed from the NavigatorSettingsInput type, instead you need to add similar argument to the setConnectionNavigatorSettings
originalNavigatorSettings better to rename to the datasourceNavigatorSettings
| originalNavigatorSettings { | ||
| ...AllNavigatorSettings | ||
| } |
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.
probably you need to split it into two fragments and two resources, because originalNavigatorSettings needed only for connection editing form
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.
Pull request overview
This PR extracts connection view functionality from plugin-connections into a new dedicated plugin plugin-connection-view. The change refactors view settings management for database connections, allowing users to configure simple/advanced views and system object visibility.
Changes:
- Created new
@cloudbeaver/plugin-connection-viewplugin with dedicated services, resources, and UI components - Moved connection view menu actions and handlers from
plugin-connectionsto the new plugin - Updated GraphQL schema to include
originalNavigatorSettingsfield and added new queries/mutations for view settings - Enhanced backend logic to handle user-specific settings for shared projects
Reviewed changes
Copilot reviewed 53 out of 54 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| webapp/packages/plugin-connection-view/* | New plugin package with connection view functionality including services, resources, UI components, and localization |
| webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts | Removed connection view menu logic (moved to new plugin) |
| webapp/packages/plugin-connections/src/ConnectionForm/* | Added connection container placeholder for view settings in connection form |
| webapp/packages/core-sdk/src/queries/* | Updated GraphQL fragments and queries to support separate navigator view settings |
| webapp/packages/core-connections/src/ConnectionInfoResource.ts | Removed changeConnectionView method (moved to new resource) |
| webapp/packages/plugin-navigation-tree/src/locales/* | Removed old connection view locale keys (moved to new plugin) |
| server/bundles/io.cloudbeaver.server/* | Enhanced backend to properly handle user settings for shared projects |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ['plugin_connection_view_option_advanced', 'Nâng cao'], | ||
| ['plugin_connection_view_option_custom', 'Tùy chỉnh'], | ||
| ['plugin_connection_view_option_show_system_objects', 'Hiển thị đối tượng hệ thống'], | ||
| ['plugin_connection_view_option_reset_description', 'This will reset the connection view settings to default values'], |
Copilot
AI
Jan 13, 2026
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.
The reset description is not translated to Vietnamese. All other languages have English text for this key, but this should be translated consistently with the rest of the file.
| ['plugin_connection_view_option_simple', 'Simple'], | ||
| ['plugin_connection_view_option_advanced', 'Avancée'], | ||
| ['plugin_connection_view_option_custom', 'Personnalisée'], | ||
| ['plugin_connection_view_option_reset_description', 'This will reset the connection view settings to default values'], |
Copilot
AI
Jan 13, 2026
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.
The reset description is not translated to French. All other languages have English text for this key, but this should be translated consistently with the rest of the file.
| protected validateKey(key: IConnectionInfoParams): boolean { | ||
| const parse = CONNECTION_INFO_PARAM_SCHEMA.safeParse(toJS(key)); | ||
| if (!parse.success) { | ||
| this.logger.warn(`Invalid resource key ${(schemaValidationError(parse.error).toString(), { prefix: null })}`); |
Copilot
AI
Jan 13, 2026
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.
There's a syntax error in the logger.warn call. The expression has unbalanced parentheses - the schemaValidationError call result is being passed to toString() but then there's an extra comma and object literal that doesn't fit the function signature correctly.
| this.logger.warn(`Invalid resource key ${(schemaValidationError(parse.error).toString(), { prefix: null })}`); | |
| this.logger.warn(`Invalid resource key ${schemaValidationError(parse.error, { prefix: null }).toString()}`); |
| export default [ | ||
| ['plugin_connection_view_option_simple', '简单'], | ||
| ['plugin_connection_view_option_advanced', '完善'], | ||
| ['plugin_connection_view_option_custom', '自定义'], | ||
| ['plugin_connection_view_option_show_system_objects', '展示系统对象'], | ||
| ['plugin_connection_view_option_reset_description', 'This will reset the connection view settings to default values'], | ||
| ]; |
Copilot
AI
Jan 13, 2026
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.
The 'plugin_connection_view' key is missing from this locale file, while it exists in other locale files (vi.ts, ru.ts, it.ts, fr.ts, en.ts). This will cause the connection view menu to display an untranslated key.
| } | ||
|
|
||
| const node = context.get(DATA_CONTEXT_NAV_NODE)!; | ||
| return node.objectFeatures.includes(EObjectFeature.dataSource); |
Copilot
AI
Jan 13, 2026
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.
The menu is only shown for nodes with the 'dataSource' feature, but the old implementation also checked for 'dataSourceConnected'. This change means the menu will now appear for disconnected data sources as well. This could lead to user confusion or errors when trying to change view settings on disconnected connections. Consider whether this behavior change is intentional.
| return node.objectFeatures.includes(EObjectFeature.dataSource); | |
| return ( | |
| node.objectFeatures.includes(EObjectFeature.dataSource) | |
| && node.objectFeatures.includes(EObjectFeature.dataSourceConnected) | |
| ); |
| ['plugin_connection_view_option_advanced', 'Avanzata'], | ||
| ['plugin_connection_view_option_custom', 'Personalizzata'], | ||
| ['plugin_connection_view_option_show_system_objects', 'Mostra oggetti di sistema'], | ||
| ['plugin_connection_view_option_reset_description', 'This will reset the connection view settings to default values'], |
Copilot
AI
Jan 13, 2026
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.
The reset description is not translated to Italian. All other languages have English text for this key, but this should be translated consistently with the rest of the file.
| export default [ | ||
| ['plugin_connection_view', 'Отображение'], | ||
| ['plugin_connection_view_option_simple', 'Упрощенное'], | ||
| ['plugin_connection_view_option_advanced', 'Продвинутое'], | ||
| ['plugin_connection_view_option_show_system_objects', 'Показывать системные объекты'], | ||
| ['plugin_connection_view_option_reset_description', 'Это сбросит настройки отображения подключения к значениям по умолчанию'], | ||
| ]; |
Copilot
AI
Jan 13, 2026
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.
The 'plugin_connection_view_option_custom' key is missing from this locale file, while it exists in other locale files (zh.ts, vi.ts, it.ts, fr.ts). This will cause inconsistent display when the custom option is needed.
| export default [ | ||
| ['plugin_connection_view', 'Connection view'], | ||
| ['plugin_connection_view_option_simple', 'Simple'], | ||
| ['plugin_connection_view_option_advanced', 'Advanced'], | ||
| ['plugin_connection_view_option_show_system_objects', 'Show system objects'], | ||
| ['plugin_connection_view_option_reset_description', 'This will reset the connection view settings to default values'], | ||
| ]; |
Copilot
AI
Jan 13, 2026
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.
The 'plugin_connection_view_option_custom' key is missing from this locale file, while it exists in other locale files (zh.ts, vi.ts, it.ts, fr.ts). This will cause inconsistent display when the custom option is needed.
| export default [ | ||
| ['plugin_connection_view', 'Vue de connexion'], | ||
| ['plugin_connection_view_option_simple', 'Simple'], | ||
| ['plugin_connection_view_option_advanced', 'Avancée'], | ||
| ['plugin_connection_view_option_custom', 'Personnalisée'], | ||
| ['plugin_connection_view_option_reset_description', 'This will reset the connection view settings to default values'], | ||
| ]; |
Copilot
AI
Jan 13, 2026
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.
The 'plugin_connection_view_option_show_system_objects' key is missing from this locale file, while it exists in other locale files. This will cause the "Show system objects" option to display an untranslated key in French.
|
|
||
| protected async loader( | ||
| originalKey: ResourceKey<IConnectionInfoParams>, | ||
| _: any, |
Copilot
AI
Jan 13, 2026
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.
The second parameter is named with just an underscore ('_'), which is acceptable but the name could be more descriptive. Consider using a more meaningful name like 'includes' or at minimum '_includes' to indicate what this parameter represents in the loader signature.
| _: any, | |
| _includes: any, |
closes 7897