feedback fixups

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2022-04-11 16:40:47 +02:00
parent ab230a433f
commit b7d035cc29
12 changed files with 35 additions and 48 deletions
+4 -4
View File
@@ -119,12 +119,13 @@ export const SettingsModal: (props: {
children: JSX.Element;
}) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "TemplateBackstageLogoProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "TemplateBackstageLogo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const TemplateBackstageLogo: (props: {
classes: Classes;
}) => JSX.Element;
export const TemplateBackstageLogo: (
props: TemplateBackstageLogoProps,
) => JSX.Element;
// Warning: (ae-missing-release-tag) "TemplateBackstageLogoIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -136,7 +137,6 @@ export const WelcomeTitle: () => JSX.Element;
// Warnings were encountered during analysis:
//
// src/assets/TemplateBackstageLogo.d.ts:7:5 - (ae-forgotten-export) The symbol "Classes" needs to be exported by the entry point index.d.ts
// src/extensions.d.ts:6:5 - (ae-forgotten-export) The symbol "RendererProps" needs to be exported by the entry point index.d.ts
// src/extensions.d.ts:27:5 - (ae-forgotten-export) The symbol "ComponentParts" needs to be exported by the entry point index.d.ts
```
@@ -21,7 +21,11 @@ type Classes = {
path: string;
};
export const TemplateBackstageLogo = (props: { classes: Classes }) => {
type TemplateBackstageLogoProps = {
classes: Classes;
};
export const TemplateBackstageLogo = (props: TemplateBackstageLogoProps) => {
return (
<svg
className={props.classes.svg}
+3 -1
View File
@@ -1 +1,3 @@
# search react
# Backstage Search
A search plugin library which holds functionality the [search plugin](/plugins/search/README.md) itself and other frontend plugins (e.g. [techdocs](/plugins/techdocs/README.md), [home](/plugins/home/README.md)) depend on.
+3 -6
View File
@@ -29,11 +29,6 @@ export function SearchApiProviderForStorybook(
// @public (undocumented)
export const searchApiRef: ApiRef<SearchApi>;
// Warning: (ae-forgotten-export) The symbol "SearchContextValue" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export const SearchContext: React_2.Context<SearchContextValue | undefined>;
// @public (undocumented)
export const SearchContextProvider: ({
initialState,
@@ -49,7 +44,7 @@ export const SearchContextProviderForStorybook: (
props: ComponentProps<typeof SearchContextProvider> & QueryResultProps,
) => JSX.Element;
// @public
// @public (undocumented)
export type SearchContextState = {
term: string;
types: string[];
@@ -57,6 +52,8 @@ export type SearchContextState = {
pageCursor?: string;
};
// Warning: (ae-forgotten-export) The symbol "SearchContextValue" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export const useSearch: () => SearchContextValue;
+2 -2
View File
@@ -44,8 +44,8 @@
"devDependencies": {
"@backstage/test-utils": "^1.0.1-next.1",
"@testing-library/react": "^12.1.3",
"@testing-library/react-hooks": "^8.0.0",
"@testing-library/jest-dom": "^5.16.4"
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/jest-dom": "^5.10.1"
},
"files": [
"dist"
@@ -40,7 +40,6 @@ type SearchContextValue = {
} & SearchContextState;
/**
* The initial state of `SearchContextProvider`.
*
* @public
*/
@@ -58,6 +57,10 @@ export const SearchContext = createContext<SearchContextValue | undefined>(
undefined,
);
/**
* The initial state of `SearchContextProvider`.
*
*/
const searchInitialState: SearchContextState = {
term: '',
pageCursor: undefined,
+9 -2
View File
@@ -14,5 +14,12 @@
* limitations under the License.
*/
export * from './api';
export * from './context';
export { searchApiRef } from './api';
export type { SearchApi } from './api';
export {
SearchContextProvider,
useSearch,
SearchContextProviderForStorybook,
SearchApiProviderForStorybook,
} from './context';
export type { SearchContextState } from './context';
-3
View File
@@ -81,7 +81,6 @@ export type HomePageSearchBarProps = Partial<
// @public (undocumented)
export const Router: () => JSX.Element;
// Warning: (tsdoc-at-sign-in-word) The "@" character looks like part of a TSDoc tag; use a backslash to escape it
// Warning: (ae-missing-release-tag) "SearchApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
@@ -90,7 +89,6 @@ export interface SearchApi {
query(query: SearchQuery): Promise<SearchResultSet>;
}
// Warning: (tsdoc-at-sign-in-word) The "@" character looks like part of a TSDoc tag; use a backslash to escape it
// Warning: (ae-missing-release-tag) "searchApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
@@ -140,7 +138,6 @@ export const SearchBarNext: ({
// @public
export type SearchBarProps = Partial<SearchBarBaseProps>;
// Warning: (tsdoc-at-sign-in-word) The "@" character looks like part of a TSDoc tag; use a backslash to escape it
// Warning: (ae-missing-release-tag) "SearchContextProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
+2 -2
View File
@@ -25,14 +25,14 @@ import { SearchQuery, SearchResultSet } from '@backstage/plugin-search-common';
import qs from 'qs';
/**
* @deprecated import from "@backstage/plugin-search-react" instead
* @deprecated import from `@backstage/plugin-search-react` instead
*/
export const searchApiRef = createApiRef<SearchApi>({
id: 'plugin.search.queryservice',
});
/**
* @deprecated import from "@backstage/plugin-search-react" instead
* @deprecated import from `@backstage/plugin-search-react` instead
*/
export interface SearchApi {
query(query: SearchQuery): Promise<SearchResultSet>;
@@ -52,7 +52,7 @@ export type SearchContextState = {
};
/**
* @deprecated import from "@backstage/plugin-search-react" instead
* @deprecated import from `@backstage/plugin-search-react` instead
*/
export const SearchContext = createContext<SearchContextValue | undefined>(
undefined,
@@ -66,7 +66,7 @@ const searchInitialState: SearchContextState = {
};
/**
* @deprecated import from "@backstage/plugin-search-react" instead
* @deprecated import from `@backstage/plugin-search-react` instead
*/
export const SearchContextProvider = ({
initialState = searchInitialState,