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

[Rename] navigation plugin #121

Merged
merged 1 commit into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "navigation",
"version": "kibana",
"version": "opensearchDashboards",
"server": false,
"ui": true,
"requiredPlugins": ["data"],
"requiredBundles": ["kibanaReact"]
"requiredBundles": ["opensearchDashboardsReact"]
}
2 changes: 1 addition & 1 deletion src/plugins/navigation/public/top_nav_menu/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.kbnTopNavMenu {
.osdTopNavMenu {
margin-right: $euiSizeXS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import React from 'react';
import { I18nStart } from 'kibana/public';
import { I18nStart } from 'opensearch-dashboards/public';
import { DataPublicPluginStart } from 'src/plugins/data/public';
import { TopNavMenuProps, TopNavMenu } from './top_nav_menu';
import { RegisteredTopNavMenuData } from './top_nav_menu_data';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import React from 'react';
import { ReactWrapper } from 'enzyme';
import { act } from 'react-dom/test-utils';
import { MountPoint } from 'kibana/public';
import { MountPoint } from 'opensearch-dashboards/public';
import { TopNavMenu } from './top_nav_menu';
import { TopNavMenuData } from './top_nav_menu_data';
import { shallowWithIntl, mountWithIntl } from 'test_utils/enzyme_helpers';
Expand All @@ -32,7 +32,7 @@ const dataShim = {
};

describe('TopNavMenu', () => {
const WRAPPER_SELECTOR = '.kbnTopNavMenu__wrapper';
const WRAPPER_SELECTOR = '.osdTopNavMenu__wrapper';
const TOP_NAV_ITEM_SELECTOR = 'TopNavMenuItem';
const SEARCH_BAR_SELECTOR = 'SearchBar';
const menuItems: TopNavMenuData[] = [
Expand Down Expand Up @@ -109,7 +109,7 @@ describe('TopNavMenu', () => {
className={'myCoolClass'}
/>
);
expect(component.find('.kbnTopNavMenu').length).toBe(1);
expect(component.find('.osdTopNavMenu').length).toBe(1);
expect(component.find('.myCoolClass').length).toBeTruthy();
});

Expand Down
8 changes: 4 additions & 4 deletions src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { EuiHeaderLinks } from '@elastic/eui';
import classNames from 'classnames';

import { MountPoint } from '../../../../core/public';
import { MountPointPortal } from '../../../kibana_react/public';
import { MountPointPortal } from '../../../opensearch_dashboards_react/public';
import {
StatefulSearchBarProps,
DataPublicPluginStart,
Expand All @@ -32,7 +32,7 @@ import { TopNavMenuData } from './top_nav_menu_data';
import { TopNavMenuItem } from './top_nav_menu_item';

export type TopNavMenuProps = StatefulSearchBarProps &
Omit<SearchBarProps, 'kibana' | 'intl' | 'timeHistory'> & {
Omit<SearchBarProps, 'opensearchDashboards' | 'intl' | 'timeHistory'> & {
config?: TopNavMenuData[];
showSearchBar?: boolean;
showQueryBar?: boolean;
Expand Down Expand Up @@ -103,8 +103,8 @@ export function TopNavMenu(props: TopNavMenuProps): ReactElement | null {

function renderLayout() {
const { setMenuMountPoint } = props;
const menuClassName = classNames('kbnTopNavMenu', props.className);
const wrapperClassName = 'kbnTopNavMenu__wrapper';
const menuClassName = classNames('osdTopNavMenu', props.className);
const wrapperClassName = 'osdTopNavMenu__wrapper';
if (setMenuMountPoint) {
return (
<>
Expand Down