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

CB-6131 get loaders from all tabs, not only visible #3210

Open
wants to merge 10 commits into
base: devel
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export const IGNORED_DEPENDENCIES = ['tslib'];
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export interface INodePackage {
name: string;
version?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export const KNOWN_PEER_DEPS_MAP: Record<string, string[]> = {
'mobx-react-lite': ['mobx', 'react-dom'],
'@testing-library/react': ['@testing-library/dom', 'react-dom'],
Expand Down
3 changes: 1 addition & 2 deletions webapp/packages/core-ui/src/Tabs/TabsState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
...rest
}: TabsStateProps<T>): React.ReactElement | null {
const context = useDataContext();
const props = useMemo(() => rest as any as T, [...Object.values(rest)]);

Check warning on line 59 in webapp/packages/core-ui/src/Tabs/TabsState.tsx

View workflow job for this annotation

GitHub Actions / Frontend / Lint

React Hook useMemo has a missing dependency: 'rest'. Either include it or remove the dependency array

Check warning on line 59 in webapp/packages/core-ui/src/Tabs/TabsState.tsx

View workflow job for this annotation

GitHub Actions / Frontend / Lint

React Hook useMemo has a spread element in its dependency array. This means we can't statically verify whether you've passed the correct dependencies
let displayed: string[] = [];

if (container) {
Expand Down Expand Up @@ -148,7 +148,7 @@
tabId: currentSelectedId,
props,
});
}, [currentSelectedId]);

Check warning on line 151 in webapp/packages/core-ui/src/Tabs/TabsState.tsx

View workflow job for this annotation

GitHub Actions / Frontend / Lint

React Hook useEffect has missing dependencies: 'dynamic.selectedId', 'openExecutor', and 'props'. Either include them or remove the dependency array

const value = useObservableRef<ITabsContext<T>>(
() => ({
Expand Down Expand Up @@ -260,8 +260,7 @@

useAutoLoad(
TabsState,
container
?.getDisplayed(props)
container?.tabInfoList
.map(tab => tab.getLoader?.(context, props))
.filter(isDefined)
.flat() || [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export * from './ACTION_LINK_OBJECT.js';
export * from './KEY_BINDING_LINK_OBJECT.js';
import { objectViewerNavTreeLinkPlugin } from './manifest.js';
Expand Down