Skip to content

Commit

Permalink
remove unnecessary changes due to the refactor in 6234
Browse files Browse the repository at this point in the history
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
  • Loading branch information
ruanyl committed Apr 17, 2024
1 parent 1a353cc commit fd3fad3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 22 deletions.
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

0 comments on commit fd3fad3

Please sign in to comment.