Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Nov 8, 2024
1 parent 2362bc7 commit 087c00a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions framework/core/js/src/forum/components/GlobalSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import GlobalDiscussionsSearchSource from './GlobalDiscussionsSearchSource';
import GlobalUsersSearchSource from './GlobalUsersSearchSource';
import GlobalPostsSearchSource from './GlobalPostsSearchSource';
import AbstractGlobalSearch, {
type SearchAttrs,
type SearchAttrs as BaseSearchAttrs,
type GlobalSearchSource as BaseGlobalSearchSource,
} from '../../common/components/AbstractGlobalSearch';

export interface GlobalSearchSource extends BaseGlobalSearchSource {}

export default class GlobalSearch extends AbstractGlobalSearch {
export interface SearchAttrs extends BaseSearchAttrs {}

export default class GlobalSearch<Attrs extends SearchAttrs = SearchAttrs> extends AbstractGlobalSearch<Attrs> {
static initAttrs(attrs: SearchAttrs) {
attrs.label = app.translator.trans('core.forum.header.search_placeholder', {}, true);
attrs.a11yRoleLabel = app.translator.trans('core.forum.header.search_role_label', {}, true);
Expand Down
4 changes: 4 additions & 0 deletions framework/core/js/src/forum/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export interface SearchAttrs extends ComponentAttrs {
}

/**
* @todo: 2.0 refactored the global search UI and no longer uses this component
* The component was kept to support extension usage of it on a local scope.
* We need to extract this component into a separate UI package instead as it is no longer needed by core.
*
* The `Search` component displays a menu of as-you-type results from a variety
* of sources.
*
Expand Down

0 comments on commit 087c00a

Please sign in to comment.