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

[Shared UX] Adoption of Shared UX Route component #150357

Merged
merged 41 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b507053
initial commit
rshen91 Feb 6, 2023
3e073dd
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 6, 2023
2ead4c6
change import Route from @kbn/shared-ux-router and remove useExecutio…
rshen91 Feb 6, 2023
0e26494
Merge remote-tracking branch 'origin/migrate-to-shared-ux-router' int…
rshen91 Feb 6, 2023
015f772
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 6, 2023
910a6ba
remove useExecContext where Route imported from react-router-dom
rshen91 Feb 6, 2023
f9a1458
Merge remote-tracking branch 'origin/migrate-to-shared-ux-router' int…
rshen91 Feb 6, 2023
bf1aaa9
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 6, 2023
0f3875e
migrate all imports of Route
rshen91 Feb 6, 2023
54b919a
Merge remote-tracking branch 'origin/migrate-to-shared-ux-router' int…
rshen91 Feb 6, 2023
7e79084
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 6, 2023
4ddfde6
Merge branch 'main' into migrate-to-shared-ux-router
rshen91 Feb 6, 2023
b32743d
update jest test imports
rshen91 Feb 6, 2023
e9c3203
Merge remote-tracking branch 'origin/migrate-to-shared-ux-router' int…
rshen91 Feb 6, 2023
c99fba0
missed failed test update imports
rshen91 Feb 6, 2023
c8310d3
Merge branch 'main' into migrate-to-shared-ux-router
rshen91 Feb 7, 2023
adfab30
Merge branch 'main' into migrate-to-shared-ux-router
rshen91 Feb 7, 2023
02369d6
merge
rshen91 Feb 9, 2023
c2804e9
Merge remote-tracking branch 'origin/migrate-to-shared-ux-router' int…
rshen91 Feb 9, 2023
378c4a6
Merge branch 'main' into migrate-to-shared-ux-router
rshen91 Feb 9, 2023
dc212be
revert route import for core
rshen91 Feb 9, 2023
5cf5bec
Merge remote-tracking branch 'origin/migrate-to-shared-ux-router' int…
rshen91 Feb 9, 2023
c05a676
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 9, 2023
4cda994
Merge branch 'main' into migrate-to-shared-ux-router
rshen91 Feb 10, 2023
ef5632b
Merge branch 'main' into migrate-to-shared-ux-router
rshen91 Feb 10, 2023
3f26d91
Merge branch 'main' into migrate-to-shared-ux-router
rshen91 Feb 10, 2023
d2c7fdc
merge commit
rshen91 Feb 10, 2023
c5df904
Merge remote-tracking branch 'upstream/main' into migrate-to-shared-u…
rshen91 Feb 13, 2023
6438c9c
add restricted import eslint rule
rshen91 Feb 13, 2023
050b774
add eslint disable for core case
rshen91 Feb 13, 2023
d109c07
fix linting files
rshen91 Feb 13, 2023
0ef4850
more linted files
rshen91 Feb 13, 2023
67c4b93
remove eslint rule for use_monitor_name test file
rshen91 Feb 13, 2023
a2726af
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 13, 2023
3ece3f5
fix import for use_monitor_name_test
rshen91 Feb 13, 2023
2c16bfa
Merge remote-tracking branch 'origin/migrate-to-shared-ux-router' int…
rshen91 Feb 13, 2023
766a997
update other test with the same name
rshen91 Feb 13, 2023
c087f88
Merge branch 'main' into migrate-to-shared-ux-router
rshen91 Feb 13, 2023
0d7a525
Merge branch 'main' into migrate-to-shared-ux-router
rshen91 Feb 13, 2023
b6ee100
Merge branch 'main' into migrate-to-shared-ux-router
rshen91 Feb 14, 2023
2852a5b
Update .eslintrc.js
rshen91 Feb 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/bfetch_explorer/public/containers/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/

import React from 'react';
import { BrowserRouter as Router, Route, Redirect, Switch } from 'react-router-dom';
import { BrowserRouter as Router, Redirect, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { EuiPage } from '@elastic/eui';
import { useDeps } from '../../hooks/use_deps';
import { Sidebar } from './sidebar';
Expand Down
1 change: 1 addition & 0 deletions examples/bfetch_explorer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"@kbn/developer-examples-plugin",
"@kbn/bfetch-plugin",
"@kbn/kibana-react-plugin",
"@kbn/shared-ux-router",
]
}
3 changes: 2 additions & 1 deletion examples/dashboard_embeddable_examples/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router, Route, RouteComponentProps, withRouter } from 'react-router-dom';
import { BrowserRouter as Router, RouteComponentProps, withRouter } from 'react-router-dom';
Copy link
Contributor

Choose a reason for hiding this comment

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

@lukeelmers @rshen I'm wondering if there's any value in re-exporting these types from Shared UX, rather than having the two packages repeated everywhere. It would give us the flexibility to change the types, if necessary, and reduce confusion or potential misuse.

If so, we could just run a refer replace, adding 'type' and switching 'react-router-dom' with the new lib...?

Copy link
Member

Choose a reason for hiding this comment

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

No strong opinions from me on that, but I'd say you should only do it if you plan to add an eslint rule to catch anyone who tries to import from react-router-dom directly. And you'd probably want to have a plan for how to deal with new APIs that may get added in the future (would shared ux just export everything, or only certain things? etc)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

6438c9c for eslint rule added thanks!

import { Route } from '@kbn/shared-ux-router';

import {
EuiPage,
Expand Down
1 change: 1 addition & 0 deletions examples/dashboard_embeddable_examples/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"@kbn/kibana-react-plugin",
"@kbn/embeddable-examples-plugin",
"@kbn/developer-examples-plugin",
"@kbn/shared-ux-router",
]
}
4 changes: 2 additions & 2 deletions examples/embeddable_explorer/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router, Route, withRouter, RouteComponentProps } from 'react-router-dom';

import { BrowserRouter as Router, withRouter, RouteComponentProps } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { EuiPage, EuiPageSideBar_Deprecated as EuiPageSideBar, EuiSideNav } from '@elastic/eui';

import { EmbeddableStart } from '@kbn/embeddable-plugin/public';
Expand Down
1 change: 1 addition & 0 deletions examples/embeddable_explorer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
"@kbn/inspector-plugin",
"@kbn/embeddable-examples-plugin",
"@kbn/developer-examples-plugin",
"@kbn/shared-ux-router",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import React from 'react';
import { FormattedMessage, I18nProvider } from '@kbn/i18n-react';
import { Router, Switch, Route } from 'react-router-dom';
import { Router, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';

import {
EuiPage,
Expand Down
1 change: 1 addition & 0 deletions examples/guided_onboarding_example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@kbn/i18n-react",
"@kbn/i18n",
"@kbn/guided-onboarding",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
3 changes: 2 additions & 1 deletion examples/locator_examples/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import ReactDOM from 'react-dom';
import { EuiPageBody } from '@elastic/eui';
import { EuiPageContent_Deprecated as EuiPageContent } from '@elastic/eui';
import { EuiPageContentBody_Deprecated as EuiPageContentBody } from '@elastic/eui';
import { Route, Switch, Redirect, Router, useLocation } from 'react-router-dom';
import { Switch, Redirect, Router, useLocation } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { createBrowserHistory } from 'history';
import { EuiText } from '@elastic/eui';
import { AppMountParameters } from '@kbn/core/public';
Expand Down
1 change: 1 addition & 0 deletions examples/locator_examples/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"@kbn/share-plugin",
"@kbn/utility-types",
"@kbn/kibana-utils-plugin",
"@kbn/shared-ux-router",
]
}
3 changes: 2 additions & 1 deletion examples/response_stream/public/containers/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/

import React from 'react';
import { BrowserRouter as Router, Route, Redirect, Switch } from 'react-router-dom';
import { BrowserRouter as Router, Redirect, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { EuiPage } from '@elastic/eui';
import { useDeps } from '../../hooks/use_deps';
import { Sidebar } from './sidebar';
Expand Down
1 change: 1 addition & 0 deletions examples/response_stream/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"@kbn/kibana-react-plugin",
"@kbn/aiops-utils",
"@kbn/config-schema",
"@kbn/shared-ux-router",
]
}
3 changes: 2 additions & 1 deletion examples/search_examples/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, Redirect } from 'react-router-dom';
import { Router, Redirect } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { I18nProvider } from '@kbn/i18n-react';
import { AppMountParameters, CoreStart } from '@kbn/core/public';
import { RedirectAppLinks } from '@kbn/kibana-react-plugin/public';
Expand Down
1 change: 1 addition & 0 deletions examples/search_examples/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
"@kbn/i18n",
"@kbn/core-mount-utils-browser-internal",
"@kbn/config-schema",
"@kbn/shared-ux-router",
]
}
3 changes: 2 additions & 1 deletion examples/state_containers_examples/public/todo/todo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/

import React, { useEffect, useMemo } from 'react';
import { Link, Route, Router, Switch, useLocation } from 'react-router-dom';
import { Link, Router, Switch, useLocation } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { History } from 'history';
import {
EuiButton,
Expand Down
1 change: 1 addition & 0 deletions examples/state_containers_examples/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
"@kbn/data-views-plugin",
"@kbn/developer-examples-plugin",
"@kbn/es-query",
"@kbn/shared-ux-router",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/

import React, { FunctionComponent, useMemo } from 'react';
import { Route, RouteComponentProps, Router, Switch } from 'react-router-dom';
import { RouteComponentProps, Router, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
Copy link
Contributor

@pgayvallet pgayvallet Feb 8, 2023

Choose a reason for hiding this comment

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

Core's internal rendering and routing system is supposed to remain an implementation detail. Are we certain we want to use our custom Router component for our AppRouter?

Just so I understand, what will be the upsides? The main risk I see here is to increase the risk of cyclic dependencies in the future between internal/types core packages and shared ux packages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Route from @kbn/shared-ux-router is a wrapper around the react-router-dom but other imports haven't been migrated. This PR is the component that is now shared-ux-router #131805
One of the perks of using the @kbn/shared-ux-router is that we won't need to use useExecutionContext since the component already handles it. @majagrubic @clintandrewhall is there any context I'm missing? Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

If that's the component coming from #131805, then I think we don't need it for Core's internal router. But waiting for @majagrubic or @clintandrewhall's answer, in case I missed anything

Copy link
Contributor

@clintandrewhall clintandrewhall Feb 9, 2023

Choose a reason for hiding this comment

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

@pgayvallet if I'm following you here, you want core internals to continue using Route from react-router-dom...? And the reason would be to reduce complexity, I assume. I'm ok with that, so long as @lukeelmers doesn't forsee an issue with execution context being missing... and I'm with you: I don't think it does.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, yeah I hadn't noticed the change to core here. I don't think we need it for the internal router, as long as downstream apps are using it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dc212be for changes thank you!

Copy link
Contributor

Choose a reason for hiding this comment

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

And the reason would be to reduce complexity, I assume

Mostly to remove a risk of cyclic dependency between shared-ux component/packages and core 'internal' packages, yeah.

Thanks for making the change @rshen91

import { History } from 'history';
import { EMPTY, Observable } from 'rxjs';
import useObservable from 'react-use/lib/useObservable';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@kbn/test-jest-helpers",
"@kbn/core-custom-branding-browser",
"@kbn/core-custom-branding-browser-mocks",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-test-jest-helpers/src/router_helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/

import React, { Component, ComponentType } from 'react';
import { MemoryRouter, Route, withRouter } from 'react-router-dom';
import { MemoryRouter, withRouter } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { History, LocationDescriptor } from 'history';

const stringifyPath = (path: LocationDescriptor): string => {
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-test-jest-helpers/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"kbn_references": [
"@kbn/i18n-react",
"@kbn/axe-config",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Switch, Route, Redirect, RouteChildrenProps } from 'react-router-dom';
import { Router, Switch, Redirect, RouteChildrenProps } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';

import { i18n } from '@kbn/i18n';
import { I18nProvider } from '@kbn/i18n-react';
Expand Down
1 change: 1 addition & 0 deletions src/plugins/advanced_settings/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@kbn/i18n-react",
"@kbn/expect",
"@kbn/monaco",
"@kbn/shared-ux-router",
"@kbn/core-ui-settings-browser-mocks",
"@kbn/core-application-browser",
"@kbn/core-ui-settings-browser",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import React from 'react';
import { History } from 'history';
import { parse, ParsedQuery } from 'query-string';
import { render, unmountComponentAtNode } from 'react-dom';
import { Switch, Route, RouteComponentProps, HashRouter, Redirect } from 'react-router-dom';
import { Switch, RouteComponentProps, HashRouter, Redirect } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';

import {
TableListViewKibanaDependencies,
Expand Down
1 change: 1 addition & 0 deletions src/plugins/dashboard/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"@kbn/task-manager-plugin",
"@kbn/core-execution-context-common",
"@kbn/core-custom-branding-browser",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Switch, Route, Redirect } from 'react-router-dom';
import { Router, Switch, Redirect } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';

import { i18n } from '@kbn/i18n';
import { I18nProvider } from '@kbn/i18n-react';
Expand Down
1 change: 1 addition & 0 deletions src/plugins/data_view_management/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@kbn/shared-ux-link-redirect-app",
"@kbn/utility-types-jest",
"@kbn/config-schema",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
16 changes: 3 additions & 13 deletions src/plugins/dev_tools/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@
import React, { useEffect, useRef } from 'react';
import { Observable } from 'rxjs';
import ReactDOM from 'react-dom';
import {
HashRouter as Router,
Switch,
Route,
Redirect,
RouteComponentProps,
} from 'react-router-dom';
import { HashRouter as Router, Switch, Redirect, RouteComponentProps } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { EuiTab, EuiTabs, EuiToolTip, EuiBetaBadge } from '@elastic/eui';
import { I18nProvider } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
Expand All @@ -28,7 +23,7 @@ import type {
CoreTheme,
ExecutionContextStart,
} from '@kbn/core/public';
import { KibanaThemeProvider, useExecutionContext } from '@kbn/kibana-react-plugin/public';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import type { DocTitleService, BreadcrumbService } from './services';

import { DevToolApp } from './dev_tool';
Expand Down Expand Up @@ -79,11 +74,6 @@ function DevToolsWrapper({
breadcrumbService.setBreadcrumbs(activeDevTool.title);
}, [activeDevTool, docTitleService, breadcrumbService]);

useExecutionContext(appServices.executionContext, {
type: 'application',
page: activeDevTool.id,
});

return (
<main className="devApp">
<EuiTabs style={{ paddingLeft: euiThemeVars.euiSizeS }} size="l">
Expand Down
1 change: 1 addition & 0 deletions src/plugins/dev_tools/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@kbn/i18n",
"@kbn/ui-theme",
"@kbn/kibana-react-plugin",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/
import React from 'react';
import { shallow } from 'enzyme';
import { Route, RouteProps } from 'react-router-dom';
import { RouteProps } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { createSearchSessionMock } from '../__mocks__/search_session';
import { discoverServiceMock as mockDiscoverServices } from '../__mocks__/services';
import { discoverRouter } from './discover_router';
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/discover/public/application/discover_router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* Side Public License, v 1.
*/

import { Redirect, Route, Router, Switch } from 'react-router-dom';
import { Redirect, Router, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import React from 'react';
import { History } from 'history';
import { EuiErrorBoundary } from '@elastic/eui';
Expand Down
1 change: 1 addition & 0 deletions src/plugins/discover/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"@kbn/rison",
"@kbn/config-schema",
"@kbn/storybook",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route } from 'react-router-dom';
import { Router } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { toMountPoint } from '@kbn/kibana-react-plugin/public';
import { I18nProvider, FormattedRelative } from '@kbn/i18n-react';
import type { CoreStart } from '@kbn/core/public';
Expand Down
1 change: 1 addition & 0 deletions src/plugins/files_management/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@kbn/kibana-react-plugin",
"@kbn/i18n-react",
"@kbn/shared-ux-file-image",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/kibana_overview/public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import React, { useEffect, useState } from 'react';
import { Observable } from 'rxjs';
import { I18nProvider } from '@kbn/i18n-react';
import { HashRouter as Router, Switch, Route } from 'react-router-dom';
import { HashRouter as Router, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { CoreStart } from '@kbn/core/public';
import { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public';
import { FetchResult } from '@kbn/newsfeed-plugin/public';
Expand Down
1 change: 1 addition & 0 deletions src/plugins/kibana_overview/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@kbn/shared-ux-page-analytics-no-data",
"@kbn/shared-ux-avatar-solution",
"@kbn/shared-ux-link-redirect-app",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/

import React, { memo } from 'react';
import { Route, Router, Switch, Redirect } from 'react-router-dom';
import { Router, Switch, Redirect } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { AppMountParameters, ChromeBreadcrumb, ScopedHistory } from '@kbn/core/public';
import { ManagementAppWrapper } from '../management_app_wrapper';
import { ManagementLandingPage } from '../landing';
Expand Down
1 change: 1 addition & 0 deletions src/plugins/management/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@kbn/i18n",
"@kbn/i18n-react",
"@kbn/shared-ux-page-kibana-template",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import React, { lazy, Suspense } from 'react';
import ReactDOM from 'react-dom';
import { Router, Switch, Route } from 'react-router-dom';
import { Router, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { I18nProvider } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
import { EuiLoadingSpinner } from '@elastic/eui';
Expand Down
1 change: 1 addition & 0 deletions src/plugins/saved_objects_management/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@kbn/config-schema",
"@kbn/core-custom-branding-browser-mocks",
"@kbn/core-custom-branding-browser",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/visualizations/public/visualize_app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import './app.scss';
import React, { useEffect, useCallback, useState } from 'react';
import { Route, Switch, useLocation } from 'react-router-dom';
import { Switch, useLocation } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { EuiLoadingSpinner } from '@elastic/eui';
import { AppMountParameters, CoreStart } from '@kbn/core/public';
import type { DataViewEditorStart } from '@kbn/data-view-editor-plugin/public';
Expand Down
1 change: 1 addition & 0 deletions src/plugins/visualizations/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@kbn/core-overlays-browser",
"@kbn/config-schema",
"@kbn/usage-collection-plugin",
"@kbn/shared-ux-router",
],
"exclude": [
"target/**/*",
Expand Down
8 changes: 8 additions & 0 deletions test/common/fixtures/plugins/coverage/kibana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "coverageFixtures",
"owner": { "name": "Kibana Operations", "githubTeam": "kibana-operations" },
"version": "kibana",
"server": false,
"ui": true
}

Loading