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

remove unnecessary changes due to the refactor in #6234 #331

Merged
merged 2 commits into from
Apr 17, 2024
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
1 change: 0 additions & 1 deletion src/core/public/chrome/chrome_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const createStartContractMock = () => {
getHeaderComponent: jest.fn(),
navLinks: {
getNavLinks$: jest.fn(),
getLinkUpdaters$: jest.fn(),
has: jest.fn(),
get: jest.fn(),
getAll: jest.fn(),
Expand Down
7 changes: 1 addition & 6 deletions src/core/public/chrome/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ export {
ChromeHelpExtensionMenuGitHubLink,
} from './ui/header/header_help_menu';
export { NavType } from './ui';
export {
ChromeNavLink,
ChromeNavLinks,
ChromeNavLinkUpdateableFields,
LinksUpdater,
} from './nav_links';
export { ChromeNavLink, ChromeNavLinks, ChromeNavLinkUpdateableFields } from './nav_links';
export { ChromeRecentlyAccessed, ChromeRecentlyAccessedHistoryItem } from './recently_accessed';
export { ChromeNavControl, ChromeNavControls } from './nav_controls';
export { ChromeDocTitle } from './doc_title';
2 changes: 1 addition & 1 deletion src/core/public/chrome/nav_links/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
*/

export { ChromeNavLink, ChromeNavLinkUpdateableFields } from './nav_link';
export { ChromeNavLinks, NavLinksService, LinksUpdater } from './nav_links_service';
export { ChromeNavLinks, NavLinksService } from './nav_links_service';
13 changes: 1 addition & 12 deletions src/core/public/chrome/nav_links/nav_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ export interface ChromeNavLinks {
*/
getNavLinks$(): Observable<Array<Readonly<ChromeNavLink>>>;

/**
* Get an observable for the current link updaters. Link updater is used to modify the
* nav links, for example, filter the nav links or update a specific nav link's properties.
* {@link LinksUpdater}
*/
getLinkUpdaters$(): BehaviorSubject<LinksUpdater[]>;

/**
* Get the state of a navlink at this point in time.
* @param id
Expand Down Expand Up @@ -119,7 +112,7 @@ export interface ChromeNavLinks {
getForceAppSwitcherNavigation$(): Observable<boolean>;
}

export type LinksUpdater = (navLinks: Map<string, NavLinkWrapper>) => Map<string, NavLinkWrapper>;
type LinksUpdater = (navLinks: Map<string, NavLinkWrapper>) => Map<string, NavLinkWrapper>;

export class NavLinksService {
private readonly stop$ = new ReplaySubject(1);
Expand Down Expand Up @@ -158,10 +151,6 @@ export class NavLinksService {
return navLinks$.pipe(map(sortNavLinks), takeUntil(this.stop$));
},

getLinkUpdaters$: () => {
return linkUpdaters$;
},

get(id: string) {
const link = navLinks$.value.get(id);
return link && link.properties;
Expand Down
2 changes: 0 additions & 2 deletions src/core/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import {
ChromeStart,
ChromeRecentlyAccessed,
ChromeRecentlyAccessedHistoryItem,
LinksUpdater,
NavType,
} from './chrome';
import { FatalErrorsSetup, FatalErrorsStart, FatalErrorInfo } from './fatal_errors';
Expand Down Expand Up @@ -326,7 +325,6 @@ export {
ChromeRecentlyAccessed,
ChromeRecentlyAccessedHistoryItem,
ChromeStart,
LinksUpdater,
IContextContainer,
HandlerFunction,
HandlerContextType,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading