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

Stacked headers and navigational search #72331

Merged
merged 99 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
abc98ba
search renders but doesn't work
Jul 17, 2020
012c193
rendering in-progress
Jul 20, 2020
76ae0e3
can now navigate to search and cmd+k works
Jul 21, 2020
4a8ca95
Fixing i18n and cross-os keyboard shortcut
Jul 23, 2020
84dbd98
updating jest snapshots
Jul 23, 2020
e2b39c3
Merge remote-tracking branch 'upstream/master' into search-header
Jul 23, 2020
41908f5
adding docs
Jul 23, 2020
35256fb
test fixes
Jul 23, 2020
c4acc04
fix header size in tests
Jul 23, 2020
58be5fd
update public api docs
Jul 29, 2020
faf0616
test fix attempt 1
Jul 30, 2020
5d3fdcd
test fix attempt 2
Jul 30, 2020
191dcc5
Merge remote-tracking branch 'upstream/master' into search-header
Jul 30, 2020
35608a1
fixing ts issues
Jul 30, 2020
f756b3b
plugin test in place
Jul 30, 2020
efda989
new test
Jul 31, 2020
35b80b7
move focus on new page and remove loading state
Aug 4, 2020
ad565d2
tests, tests, and alphabetizing initial list
Aug 5, 2020
5544b76
fixing bugs
Aug 6, 2020
acdec95
i18n fixes
Aug 10, 2020
f3f4e67
functional test and bug fixes
Aug 11, 2020
54708dc
keyboard shortcut fix
Aug 11, 2020
cb71f83
jest snapshot update
Aug 12, 2020
0564cb0
Merge remote-tracking branch 'upstream/master' into search-header
Aug 12, 2020
f064043
clear search after navigate
Aug 12, 2020
1c1a766
typecheck
Aug 12, 2020
cc66bf4
UX fixes
Aug 13, 2020
1feb24c
clearning out old nav
Aug 17, 2020
7b7a925
adding jest tests
Aug 18, 2020
f6ca2c2
Merge remote-tracking branch 'upstream/master' into search-header
Aug 18, 2020
52f5fc0
removing leftover empty sass files
Aug 18, 2020
b72b9ff
fixing all the tests
Aug 18, 2020
03fac9f
changing keyboard shortcut
Aug 18, 2020
9009e31
more test failure fixes
Aug 18, 2020
aa76b9e
Merge remote-tracking branch 'upstream/master' into search-header
Aug 19, 2020
122e70c
fixing tests again
Aug 19, 2020
cdb8d3d
removing unused imports
Aug 19, 2020
7706622
Update plugins to show parent, solution icons in search results
ryankeairns Aug 20, 2020
8be739b
Merge pull request #4 from ryankeairns/rk/nav-search-logos
Aug 20, 2020
09501a6
Merge remote-tracking branch 'upstream/master' into search-header
Aug 26, 2020
ac8db18
adding autogenerated plugin list
Aug 26, 2020
369903b
Merge remote-tracking branch 'upstream/master' into search-header
Aug 26, 2020
82efd41
snapshot updates
Aug 26, 2020
da39311
Merge remote-tracking branch 'upstream/master' into search-header
Aug 26, 2020
2d25c89
Merge remote-tracking branch 'upstream/master' into search-header
Aug 27, 2020
86ad1d3
add passing test
Aug 27, 2020
db88ced
adding tests for searching behavior
Aug 28, 2020
c5372b0
Merge remote-tracking branch 'upstream/master' into search-header
Aug 28, 2020
a2a1a22
Merge remote-tracking branch 'upstream/master' into search-header
Aug 31, 2020
9de5e9b
EUI search template
Sep 1, 2020
8217b62
Merge remote-tracking branch 'upstream/master' into search-header
Sep 1, 2020
d684023
fixing graph test
Sep 1, 2020
84020f2
misc cleanup
Sep 1, 2020
1a7367e
Merge remote-tracking branch 'upstream/master' into search-header
Sep 1, 2020
ddc57dd
Merge remote-tracking branch 'upstream/master' into search-header
Sep 1, 2020
8e6d3e5
add and wire HeaderActionMenu component
pgayvallet Sep 2, 2020
7b8125d
fix event type
pgayvallet Sep 2, 2020
b208bde
fireproof MountPointPortal against concurrent react / portal target u…
pgayvallet Sep 2, 2020
abbc1b3
wire setHeaderActionMenu API to dashboard app TopNavMenu
pgayvallet Sep 2, 2020
8f8eacc
[Reporting] Add functional test for Reports in non-default spaces (#7…
tsullivan Sep 1, 2020
5fc63b0
test fixes
Sep 2, 2020
905adaa
test fixes v2
Sep 2, 2020
95aecea
Merge remote-tracking branch 'upstream/master' into search-header
Sep 2, 2020
1235272
test rename
Sep 2, 2020
fc76d58
test fix v3
Sep 2, 2020
3e671f1
Merge remote-tracking branch 'upstream/master' into search-header
pgayvallet Sep 3, 2020
4e9ce62
wire setHeaderActionMenu to lens app TopNavMenu
pgayvallet Sep 3, 2020
f48d2bf
wire setHeaderActionMenu to maps app TopNavMenu
pgayvallet Sep 3, 2020
02fde93
wire setHeaderActionMenu to visualize app TopNavMenu
pgayvallet Sep 3, 2020
20108e5
Merge remote-tracking branch 'upstream/master' into search-header
pgayvallet Sep 3, 2020
ecacf98
Merge remote-tracking branch 'upstream/master' into search-header
pgayvallet Sep 3, 2020
2ecd226
adapt kbn-top-nav ng component and wire setHeaderActionMenu to discov…
pgayvallet Sep 3, 2020
1fab8ca
search box styles update
Sep 3, 2020
e8e2fed
add debounce
Sep 4, 2020
1e256fc
Merge remote-tracking branch 'upstream/master' into search-header
Sep 4, 2020
dda9841
adapt setHeaderActionMenu to graph app TopNavMenu
pgayvallet Sep 4, 2020
d38e8fb
Merge remote-tracking branch 'upstream/master' into search-header
pgayvallet Sep 4, 2020
3fe5a5c
update logo for security administration
ryankeairns Sep 4, 2020
f309ee7
Merge pull request #5 from ryankeairns/search-header
Sep 4, 2020
fc5fb78
Addresses PR feedback
Sep 4, 2020
51f130f
fixes canvas fullscreen
Sep 4, 2020
e17d2d8
Merge remote-tracking branch 'upstream/master' into search-header
Sep 4, 2020
2f04848
i18n fix
Sep 5, 2020
f7bb671
Merge remote-tracking branch 'upstream/master' into search-header
Sep 8, 2020
c94d60e
Canvas fullscreen fix
Sep 8, 2020
c30aa17
Merge remote-tracking branch 'upstream/master' into search-header
Sep 8, 2020
e6b46d0
addressing PR feedback
Sep 9, 2020
3538475
Merge remote-tracking branch 'upstream/master' into search-header
Sep 9, 2020
dede90e
maps topnavmenu fix after bad merge
Sep 9, 2020
5bd40cf
fix keyboard shortcut for linux
Sep 10, 2020
d4fe0c3
Use EuiHeaderLink(s) for TopNavMenu
Sep 10, 2020
302eb79
Merge pull request #6 from cchaos/cchaos-search-header
Sep 10, 2020
e367824
test fix for new top nav
Sep 10, 2020
71a78f8
css cleanup
Sep 10, 2020
e882849
css var change
Sep 10, 2020
e33f1f8
PR feedback
Sep 14, 2020
8eee3ce
Merge remote-tracking branch 'upstream/master' into search-header
Sep 14, 2020
ea4825b
type fix
Sep 14, 2020
880a540
translation fix
Sep 14, 2020
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
598 changes: 598 additions & 0 deletions docs/developer/architecture/code-exploration.asciidoc

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ and actions.
or dashboards from the Kibana instance, from both server and client-side plugins


|{kib-repo}blob/{branch}/x-pack/plugins/global_search_bar/README.md[globalSearchBar]
|The GlobalSearchBar plugin provides a search interface for navigating Kibana. (It is the UI to the GlobalSearch plugin.)


|{kib-repo}blob/{branch}/x-pack/plugins/global_search_providers[globalSearchProviders]
|WARNING: Missing README.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ chrome.navControls.registerLeft({

| Method | Description |
| --- | --- |
| [registerLeft(navControl)](./kibana-plugin-core-public.chromenavcontrols.registerleft.md) | Register a nav control to be presented on the left side of the chrome header. |
| [registerRight(navControl)](./kibana-plugin-core-public.chromenavcontrols.registerright.md) | Register a nav control to be presented on the right side of the chrome header. |
| [registerCenter(navControl)](./kibana-plugin-core-public.chromenavcontrols.registercenter.md) | Register a nav control to be presented on the top-center side of the chrome header. |
| [registerLeft(navControl)](./kibana-plugin-core-public.chromenavcontrols.registerleft.md) | Register a nav control to be presented on the bottom-left side of the chrome header. |
| [registerRight(navControl)](./kibana-plugin-core-public.chromenavcontrols.registerright.md) | Register a nav control to be presented on the top-right side of the chrome header. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ChromeNavControls](./kibana-plugin-core-public.chromenavcontrols.md) &gt; [registerCenter](./kibana-plugin-core-public.chromenavcontrols.registercenter.md)

## ChromeNavControls.registerCenter() method

Register a nav control to be presented on the top-center side of the chrome header.

<b>Signature:</b>

```typescript
registerCenter(navControl: ChromeNavControl): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| navControl | <code>ChromeNavControl</code> | |

<b>Returns:</b>

`void`

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## ChromeNavControls.registerLeft() method

Register a nav control to be presented on the left side of the chrome header.
Register a nav control to be presented on the bottom-left side of the chrome header.

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## ChromeNavControls.registerRight() method

Register a nav control to be presented on the right side of the chrome header.
Register a nav control to be presented on the top-right side of the chrome header.

<b>Signature:</b>

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ core.chrome.setHelpExtension(elem => {
| [getHelpExtension$()](./kibana-plugin-core-public.chromestart.gethelpextension_.md) | Get an observable of the current custom help conttent |
| [getIsNavDrawerLocked$()](./kibana-plugin-core-public.chromestart.getisnavdrawerlocked_.md) | Get an observable of the current locked state of the nav drawer. |
| [getIsVisible$()](./kibana-plugin-core-public.chromestart.getisvisible_.md) | Get an observable of the current visibility state of the chrome. |
| [getNavType$()](./kibana-plugin-core-public.chromestart.getnavtype_.md) | Get the navigation type TODO \#64541 Can delete |
| [removeApplicationClass(className)](./kibana-plugin-core-public.chromestart.removeapplicationclass.md) | Remove a className added with <code>addApplicationClass()</code>. If className is unknown it is ignored. |
| [setAppTitle(appTitle)](./kibana-plugin-core-public.chromestart.setapptitle.md) | Sets the current app's title |
| [setBadge(badge)](./kibana-plugin-core-public.chromestart.setbadge.md) | Override the current badge |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export const schema = Joi.object()
// settings for the find service
layout: Joi.object()
.keys({
fixedHeaderHeight: Joi.number().default(50),
fixedHeaderHeight: Joi.number().default(100),
})
.default(),

Expand Down
4 changes: 3 additions & 1 deletion src/core/public/application/ui/app_container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ export const AppContainer: FunctionComponent<Props> = ({
// eslint-disable-next-line no-console
console.error(e);
} finally {
setShowSpinner(false);
if (elementRef.current) {
setShowSpinner(false);
}
myasonik marked this conversation as resolved.
Show resolved Hide resolved
setIsMounting(false);
}
};
Expand Down
13 changes: 3 additions & 10 deletions src/core/public/chrome/chrome_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@
* under the License.
*/
import { BehaviorSubject } from 'rxjs';
import {
ChromeBadge,
ChromeBrand,
ChromeBreadcrumb,
ChromeService,
InternalChromeStart,
NavType,
} from './';
import { ChromeBadge, ChromeBrand, ChromeBreadcrumb, ChromeService, InternalChromeStart } from './';

const createStartContractMock = () => {
const startContract: DeeplyMockedKeys<InternalChromeStart> = {
Expand All @@ -50,8 +43,10 @@ const createStartContractMock = () => {
},
navControls: {
registerLeft: jest.fn(),
registerCenter: jest.fn(),
registerRight: jest.fn(),
getLeft$: jest.fn(),
getCenter$: jest.fn(),
getRight$: jest.fn(),
},
setAppTitle: jest.fn(),
Expand All @@ -70,7 +65,6 @@ const createStartContractMock = () => {
setHelpExtension: jest.fn(),
setHelpSupportUrl: jest.fn(),
getIsNavDrawerLocked$: jest.fn(),
getNavType$: jest.fn(),
getCustomNavLink$: jest.fn(),
setCustomNavLink: jest.fn(),
};
Expand All @@ -83,7 +77,6 @@ const createStartContractMock = () => {
startContract.getCustomNavLink$.mockReturnValue(new BehaviorSubject(undefined));
startContract.getHelpExtension$.mockReturnValue(new BehaviorSubject(undefined));
startContract.getIsNavDrawerLocked$.mockReturnValue(new BehaviorSubject(false));
startContract.getNavType$.mockReturnValue(new BehaviorSubject('modern' as NavType));
return startContract;
};

Expand Down
16 changes: 1 addition & 15 deletions src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import { ChromeNavControls, NavControlsService } from './nav_controls';
import { ChromeNavLinks, NavLinksService, ChromeNavLink } from './nav_links';
import { ChromeRecentlyAccessed, RecentlyAccessedService } from './recently_accessed';
import { Header } from './ui';
import { NavType } from './ui/header';
import { ChromeHelpExtensionMenuLink } from './ui/header/header_help_menu';
export { ChromeNavControls, ChromeRecentlyAccessed, ChromeDocTitle };

Expand Down Expand Up @@ -172,10 +171,6 @@ export class ChromeService {

const getIsNavDrawerLocked$ = isNavDrawerLocked$.pipe(takeUntil(this.stop$));

// TODO #64541
// Can delete
const getNavType$ = uiSettings.get$('pageNavigation').pipe(takeUntil(this.stop$));

const isIE = () => {
const ua = window.navigator.userAgent;
const msie = ua.indexOf('MSIE '); // IE 10 or older
Expand Down Expand Up @@ -241,10 +236,10 @@ export class ChromeService {
navLinks$={navLinks.getNavLinks$()}
recentlyAccessed$={recentlyAccessed.get$()}
navControlsLeft$={navControls.getLeft$()}
navControlsCenter$={navControls.getCenter$()}
navControlsRight$={navControls.getRight$()}
onIsLockedUpdate={setIsNavDrawerLocked}
isLocked$={getIsNavDrawerLocked$}
navType$={getNavType$}
/>
),

Expand Down Expand Up @@ -305,8 +300,6 @@ export class ChromeService {

getIsNavDrawerLocked$: () => getIsNavDrawerLocked$,

getNavType$: () => getNavType$,

getCustomNavLink$: () => customNavLink$.pipe(takeUntil(this.stop$)),

setCustomNavLink: (customNavLink?: ChromeNavLink) => {
Expand Down Expand Up @@ -468,13 +461,6 @@ export interface ChromeStart {
* Get an observable of the current locked state of the nav drawer.
*/
getIsNavDrawerLocked$(): Observable<boolean>;

/**
* Get the navigation type
* TODO #64541
* Can delete
*/
getNavType$(): Observable<NavType>;
}

/** @internal */
Expand Down
17 changes: 15 additions & 2 deletions src/core/public/chrome/nav_controls/nav_controls_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,18 @@ export interface ChromeNavControl {
* @public
*/
export interface ChromeNavControls {
/** Register a nav control to be presented on the left side of the chrome header. */
/** Register a nav control to be presented on the bottom-left side of the chrome header. */
registerLeft(navControl: ChromeNavControl): void;
/** Register a nav control to be presented on the right side of the chrome header. */
/** Register a nav control to be presented on the top-right side of the chrome header. */
registerRight(navControl: ChromeNavControl): void;
/** Register a nav control to be presented on the top-center side of the chrome header. */
registerCenter(navControl: ChromeNavControl): void;
/** @internal */
getLeft$(): Observable<ChromeNavControl[]>;
/** @internal */
getRight$(): Observable<ChromeNavControl[]>;
/** @internal */
getCenter$(): Observable<ChromeNavControl[]>;
}

/** @internal */
Expand All @@ -62,6 +66,7 @@ export class NavControlsService {
public start() {
const navControlsLeft$ = new BehaviorSubject<ReadonlySet<ChromeNavControl>>(new Set());
const navControlsRight$ = new BehaviorSubject<ReadonlySet<ChromeNavControl>>(new Set());
const navControlsCenter$ = new BehaviorSubject<ReadonlySet<ChromeNavControl>>(new Set());

return {
// In the future, registration should be moved to the setup phase. This
Expand All @@ -72,6 +77,9 @@ export class NavControlsService {
registerRight: (navControl: ChromeNavControl) =>
navControlsRight$.next(new Set([...navControlsRight$.value.values(), navControl])),

registerCenter: (navControl: ChromeNavControl) =>
navControlsCenter$.next(new Set([...navControlsCenter$.value.values(), navControl])),

getLeft$: () =>
navControlsLeft$.pipe(
map((controls) => sortBy([...controls.values()], 'order')),
Expand All @@ -82,6 +90,11 @@ export class NavControlsService {
map((controls) => sortBy([...controls.values()], 'order')),
takeUntil(this.stop$)
),
getCenter$: () =>
navControlsCenter$.pipe(
map((controls) => sortBy([...controls.values()], 'order')),
takeUntil(this.stop$)
),
};
}

Expand Down
Loading