-
Notifications
You must be signed in to change notification settings - Fork 923
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[navigation] feat: Render dev tools inside a modal (#7938)
* feat: render the content inside a modal Signed-off-by: SuZhou-Joe <[email protected]> * Changeset file for PR #7938 created/updated * feat: use memory router when opened in modal Signed-off-by: SuZhou-Joe <[email protected]> * feat: update Signed-off-by: SuZhou-Joe <[email protected]> * feat: update buttons Signed-off-by: SuZhou-Joe <[email protected]> * feat: update Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimize layout Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimize layout Signed-off-by: SuZhou-Joe <[email protected]> * fix: vertical scrollbar issue Signed-off-by: SuZhou-Joe <[email protected]> * feat: update test Signed-off-by: SuZhou-Joe <[email protected]> * feat: update Signed-off-by: SuZhou-Joe <[email protected]> * feat: update Signed-off-by: SuZhou-Joe <[email protected]> * feat: update order Signed-off-by: SuZhou-Joe <[email protected]> * fix: update snapshot Signed-off-by: SuZhou-Joe <[email protected]> --------- Signed-off-by: SuZhou-Joe <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
1ca52b2
commit baccf53
Showing
14 changed files
with
669 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
feat: | ||
- Change dev tools to a modal ([#7938](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7938)) |
76 changes: 76 additions & 0 deletions
76
src/plugins/console/public/application/components/__snapshots__/top_nav_menu.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
src/plugins/console/public/application/components/top_nav_menu.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { MenuItemPosition, TopNavMenu, TopNavMenuItem } from './top_nav_menu'; | ||
import { render } from '@testing-library/react'; | ||
|
||
describe('TopNavMenu Component', () => { | ||
const mockedItems: TopNavMenuItem[] = [ | ||
{ | ||
id: 'foo', | ||
label: 'foo', | ||
description: 'foo', | ||
onClick: jest.fn(), | ||
testId: 'foo', | ||
position: MenuItemPosition.LEFT, | ||
}, | ||
{ | ||
id: 'bar', | ||
label: 'bar', | ||
description: 'bar', | ||
onClick: jest.fn(), | ||
testId: 'bar', | ||
position: MenuItemPosition.RIGHT, | ||
}, | ||
]; | ||
it('should render correctly when not use updatedUX', () => { | ||
const { container } = render(<TopNavMenu items={mockedItems} useUpdatedUX={false} />); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
it('should render correctly when use updatedUX', () => { | ||
const { container } = render(<TopNavMenu items={mockedItems} useUpdatedUX />); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 0 additions & 115 deletions
115
src/plugins/console/public/application/containers/main/get_top_nav.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.