diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= b/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= index 1cf86403cdc..fe8f8fcbc9b 100755 --- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= +++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= @@ -17,7 +17,6 @@ client/http-client/package.json=1413453754 client/jetbrains/package.json=1441482894 client/observability-client/package.json=-463261822 client/observability-server/package.json=1984976913 -client/search-ui/package.json=-602996280 client/search/package.json=-467983686 client/shared/package.json=1160771529 client/storybook/package.json=-1924844575 diff --git a/.bazelignore b/.bazelignore index 7369b37914a..a53f3c83517 100644 --- a/.bazelignore +++ b/.bazelignore @@ -12,7 +12,6 @@ client/http-client/node_modules client/jetbrains/node_modules client/observability-client/node_modules client/observability-server/node_modules -client/search-ui/node_modules client/shared/node_modules client/storybook/node_modules client/template-parser/node_modules diff --git a/.eslintrc.js b/.eslintrc.js index aa7db6b1716..da90a3fee6c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -69,7 +69,7 @@ const config = { See https://handbook.sourcegraph.com/community/faq#is-all-of-sourcegraph-open-source for more information.`, }, { - group: ['@sourcegraph/search-ui/src/experimental'], + group: ['@sourcegraph/branded/src/search-ui/experimental'], message: 'The experimental search input is not available for general use. If you have questions about it reach out to the search product team.', }, @@ -83,7 +83,7 @@ See https://handbook.sourcegraph.com/community/faq#is-all-of-sourcegraph-open-so '!@sourcegraph/shared/src/*', '!@sourcegraph/shared/src/testing/*', '!@sourcegraph/web/src/SourcegraphWebApp.scss', - '!@sourcegraph/search-ui/src/experimental', + '!@sourcegraph/branded/src/search-ui/experimental', '!@sourcegraph/*/src/testing', '!@sourcegraph/*/src/stories', ], diff --git a/WORKSPACE b/WORKSPACE index 9ee09d34dcf..21f5b551a6c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -74,7 +74,6 @@ npm_translate_lock( "//:client/jetbrains/package.json", "//:client/observability-client/package.json", "//:client/observability-server/package.json", - "//:client/search-ui/package.json", "//:client/shared/package.json", "//:client/storybook/package.json", "//:client/template-parser/package.json", diff --git a/client/README.md b/client/README.md index 3090aa7c099..30539a543ab 100644 --- a/client/README.md +++ b/client/README.md @@ -12,7 +12,6 @@ - **branded**: Contains React components and implements the visual design language we use across our web app and e.g. in the options menu of the browser extension. Over time, components from `shared` and `branded` packages should be moved into the `wildcard` package. - **wildcard**: Package that encapsulates storybook configuration and contains our Wildcard design system components. If we're using a component in two or more different areas (e.g. `web-app` and `browser-extension`) then it should live in the `wildcard` package. Otherwise the components should be better colocated with the code where they're actually used. - **search**: Search-related code that may be shared between all clients, both branded (e.g. web, VS Code extension) and unbranded (e.g. browser extension) -- **search-ui**: Search UI components with branded styling that are shared between clients. For example, the `` component that is used in both the web application and VS Code extension. - **storybook**: Storybook configuration. ## Further migration plan diff --git a/client/branded/package.json b/client/branded/package.json index de7ad95d66c..28a0c1f60c7 100644 --- a/client/branded/package.json +++ b/client/branded/package.json @@ -8,5 +8,7 @@ "lint:js": "yarn run -T eslint --cache '**/*.[jt]s?(x)'", "lint:css": "yarn run -T stylelint 'src/**/*.scss' --quiet", "test": "yarn run -T jest" - } + }, + "sideEffects": false, + "main": "./src/index.ts" } diff --git a/client/branded/src/components/panel/views/FileLocations.tsx b/client/branded/src/components/panel/views/FileLocations.tsx index 9c89b44c6fc..27a1e801751 100644 --- a/client/branded/src/components/panel/views/FileLocations.tsx +++ b/client/branded/src/components/panel/views/FileLocations.tsx @@ -9,7 +9,6 @@ import { catchError, distinctUntilChanged, map, startWith, switchMap } from 'rxj import { asError, ErrorLike, isErrorLike, isDefined, property, logger } from '@sourcegraph/common' import { Location } from '@sourcegraph/extension-api-types' -import { FileContentSearchResult } from '@sourcegraph/search-ui' import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { Badged } from '@sourcegraph/shared/src/codeintel/legacy-extensions/api' import { VirtualList } from '@sourcegraph/shared/src/components/VirtualList' @@ -19,6 +18,8 @@ import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryServi import { parseRepoURI } from '@sourcegraph/shared/src/util/url' import { LoadingSpinner, Alert, Icon } from '@sourcegraph/wildcard' +import { FileContentSearchResult } from '../../../search-ui' + import styles from './FileLocations.module.scss' export const FileLocationsError: React.FunctionComponent> = ({ diff --git a/client/branded/src/index.ts b/client/branded/src/index.ts new file mode 100644 index 00000000000..509655c97ed --- /dev/null +++ b/client/branded/src/index.ts @@ -0,0 +1 @@ +export * from './search-ui' diff --git a/client/branded/src/search-ui/README.md b/client/branded/src/search-ui/README.md new file mode 100644 index 00000000000..dad0a328542 --- /dev/null +++ b/client/branded/src/search-ui/README.md @@ -0,0 +1,3 @@ +# Search UI + +This contains search UI components with branded styling that are shared between clients. For example, the `` component that is used in both the web application and VS Code extension. diff --git a/client/search-ui/src/CODENOTIFY b/client/branded/src/search-ui/components/CODENOTIFY similarity index 100% rename from client/search-ui/src/CODENOTIFY rename to client/branded/src/search-ui/components/CODENOTIFY diff --git a/client/search-ui/src/components/CodeExcerpt.module.scss b/client/branded/src/search-ui/components/CodeExcerpt.module.scss similarity index 100% rename from client/search-ui/src/components/CodeExcerpt.module.scss rename to client/branded/src/search-ui/components/CodeExcerpt.module.scss diff --git a/client/search-ui/src/components/CodeExcerpt.test.tsx b/client/branded/src/search-ui/components/CodeExcerpt.test.tsx similarity index 100% rename from client/search-ui/src/components/CodeExcerpt.test.tsx rename to client/branded/src/search-ui/components/CodeExcerpt.test.tsx diff --git a/client/search-ui/src/components/CodeExcerpt.tsx b/client/branded/src/search-ui/components/CodeExcerpt.tsx similarity index 100% rename from client/search-ui/src/components/CodeExcerpt.tsx rename to client/branded/src/search-ui/components/CodeExcerpt.tsx diff --git a/client/search-ui/src/components/CodeHostIcon.tsx b/client/branded/src/search-ui/components/CodeHostIcon.tsx similarity index 100% rename from client/search-ui/src/components/CodeHostIcon.tsx rename to client/branded/src/search-ui/components/CodeHostIcon.tsx diff --git a/client/search-ui/src/components/CommitSearchResult.tsx b/client/branded/src/search-ui/components/CommitSearchResult.tsx similarity index 97% rename from client/search-ui/src/components/CommitSearchResult.tsx rename to client/branded/src/search-ui/components/CommitSearchResult.tsx index 50bc1b97362..4973ae6d475 100644 --- a/client/search-ui/src/components/CommitSearchResult.tsx +++ b/client/branded/src/search-ui/components/CommitSearchResult.tsx @@ -3,12 +3,13 @@ import React from 'react' import VisuallyHidden from '@reach/visually-hidden' import classNames from 'classnames' -import { Timestamp } from '@sourcegraph/branded/src/components/Timestamp' import { displayRepoName } from '@sourcegraph/shared/src/components/RepoLink' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { CommitMatch, getCommitMatchUrl, getRepositoryUrl } from '@sourcegraph/shared/src/search/stream' import { Link, Code } from '@sourcegraph/wildcard' +import { Timestamp } from '../../components/Timestamp' + import { CommitSearchResultMatch } from './CommitSearchResultMatch' import { ResultContainer } from './ResultContainer' diff --git a/client/search-ui/src/components/CommitSearchResultMatch.module.scss b/client/branded/src/search-ui/components/CommitSearchResultMatch.module.scss similarity index 100% rename from client/search-ui/src/components/CommitSearchResultMatch.module.scss rename to client/branded/src/search-ui/components/CommitSearchResultMatch.module.scss diff --git a/client/search-ui/src/components/CommitSearchResultMatch.tsx b/client/branded/src/search-ui/components/CommitSearchResultMatch.tsx similarity index 100% rename from client/search-ui/src/components/CommitSearchResultMatch.tsx rename to client/branded/src/search-ui/components/CommitSearchResultMatch.tsx diff --git a/client/search-ui/src/components/CopyPathAction.module.scss b/client/branded/src/search-ui/components/CopyPathAction.module.scss similarity index 100% rename from client/search-ui/src/components/CopyPathAction.module.scss rename to client/branded/src/search-ui/components/CopyPathAction.module.scss diff --git a/client/search-ui/src/components/CopyPathAction.tsx b/client/branded/src/search-ui/components/CopyPathAction.tsx similarity index 100% rename from client/search-ui/src/components/CopyPathAction.tsx rename to client/branded/src/search-ui/components/CopyPathAction.tsx diff --git a/client/search-ui/src/components/FileContentSearchResult.test.tsx b/client/branded/src/search-ui/components/FileContentSearchResult.test.tsx similarity index 100% rename from client/search-ui/src/components/FileContentSearchResult.test.tsx rename to client/branded/src/search-ui/components/FileContentSearchResult.test.tsx diff --git a/client/search-ui/src/components/FileContentSearchResult.tsx b/client/branded/src/search-ui/components/FileContentSearchResult.tsx similarity index 100% rename from client/search-ui/src/components/FileContentSearchResult.tsx rename to client/branded/src/search-ui/components/FileContentSearchResult.tsx diff --git a/client/search-ui/src/components/FileMatchChildren.module.scss b/client/branded/src/search-ui/components/FileMatchChildren.module.scss similarity index 100% rename from client/search-ui/src/components/FileMatchChildren.module.scss rename to client/branded/src/search-ui/components/FileMatchChildren.module.scss diff --git a/client/search-ui/src/components/FileMatchChildren.test.tsx b/client/branded/src/search-ui/components/FileMatchChildren.test.tsx similarity index 100% rename from client/search-ui/src/components/FileMatchChildren.test.tsx rename to client/branded/src/search-ui/components/FileMatchChildren.test.tsx diff --git a/client/search-ui/src/components/FileMatchChildren.tsx b/client/branded/src/search-ui/components/FileMatchChildren.tsx similarity index 100% rename from client/search-ui/src/components/FileMatchChildren.tsx rename to client/branded/src/search-ui/components/FileMatchChildren.tsx diff --git a/client/search-ui/src/components/FilePathSearchResult.tsx b/client/branded/src/search-ui/components/FilePathSearchResult.tsx similarity index 100% rename from client/search-ui/src/components/FilePathSearchResult.tsx rename to client/branded/src/search-ui/components/FilePathSearchResult.tsx diff --git a/client/search-ui/src/components/LastSyncedIcon.module.scss b/client/branded/src/search-ui/components/LastSyncedIcon.module.scss similarity index 100% rename from client/search-ui/src/components/LastSyncedIcon.module.scss rename to client/branded/src/search-ui/components/LastSyncedIcon.module.scss diff --git a/client/search-ui/src/components/LastSyncedIcon.tsx b/client/branded/src/search-ui/components/LastSyncedIcon.tsx similarity index 100% rename from client/search-ui/src/components/LastSyncedIcon.tsx rename to client/branded/src/search-ui/components/LastSyncedIcon.tsx diff --git a/client/search-ui/src/components/LegacyResultContainer.module.scss b/client/branded/src/search-ui/components/LegacyResultContainer.module.scss similarity index 100% rename from client/search-ui/src/components/LegacyResultContainer.module.scss rename to client/branded/src/search-ui/components/LegacyResultContainer.module.scss diff --git a/client/search-ui/src/components/LegacyResultContainer.test.tsx b/client/branded/src/search-ui/components/LegacyResultContainer.test.tsx similarity index 100% rename from client/search-ui/src/components/LegacyResultContainer.test.tsx rename to client/branded/src/search-ui/components/LegacyResultContainer.test.tsx diff --git a/client/search-ui/src/components/LegacyResultContainer.tsx b/client/branded/src/search-ui/components/LegacyResultContainer.tsx similarity index 100% rename from client/search-ui/src/components/LegacyResultContainer.tsx rename to client/branded/src/search-ui/components/LegacyResultContainer.tsx diff --git a/client/search-ui/src/components/RepoFileLink.test.tsx b/client/branded/src/search-ui/components/RepoFileLink.test.tsx similarity index 100% rename from client/search-ui/src/components/RepoFileLink.test.tsx rename to client/branded/src/search-ui/components/RepoFileLink.test.tsx diff --git a/client/search-ui/src/components/RepoFileLink.tsx b/client/branded/src/search-ui/components/RepoFileLink.tsx similarity index 100% rename from client/search-ui/src/components/RepoFileLink.tsx rename to client/branded/src/search-ui/components/RepoFileLink.tsx diff --git a/client/search-ui/src/components/RepoSearchResult.tsx b/client/branded/src/search-ui/components/RepoSearchResult.tsx similarity index 100% rename from client/search-ui/src/components/RepoSearchResult.tsx rename to client/branded/src/search-ui/components/RepoSearchResult.tsx diff --git a/client/search-ui/src/components/ResultContainer.module.scss b/client/branded/src/search-ui/components/ResultContainer.module.scss similarity index 100% rename from client/search-ui/src/components/ResultContainer.module.scss rename to client/branded/src/search-ui/components/ResultContainer.module.scss diff --git a/client/search-ui/src/components/ResultContainer.tsx b/client/branded/src/search-ui/components/ResultContainer.tsx similarity index 100% rename from client/search-ui/src/components/ResultContainer.tsx rename to client/branded/src/search-ui/components/ResultContainer.tsx diff --git a/client/search-ui/src/components/SearchResult.module.scss b/client/branded/src/search-ui/components/SearchResult.module.scss similarity index 100% rename from client/search-ui/src/components/SearchResult.module.scss rename to client/branded/src/search-ui/components/SearchResult.module.scss diff --git a/client/search-ui/src/components/SearchResultStar.module.scss b/client/branded/src/search-ui/components/SearchResultStar.module.scss similarity index 100% rename from client/search-ui/src/components/SearchResultStar.module.scss rename to client/branded/src/search-ui/components/SearchResultStar.module.scss diff --git a/client/search-ui/src/components/SearchResultStar.tsx b/client/branded/src/search-ui/components/SearchResultStar.tsx similarity index 100% rename from client/search-ui/src/components/SearchResultStar.tsx rename to client/branded/src/search-ui/components/SearchResultStar.tsx diff --git a/client/search-ui/src/components/SymbolSearchResult.module.scss b/client/branded/src/search-ui/components/SymbolSearchResult.module.scss similarity index 100% rename from client/search-ui/src/components/SymbolSearchResult.module.scss rename to client/branded/src/search-ui/components/SymbolSearchResult.module.scss diff --git a/client/search-ui/src/components/SymbolSearchResult.tsx b/client/branded/src/search-ui/components/SymbolSearchResult.tsx similarity index 100% rename from client/search-ui/src/components/SymbolSearchResult.tsx rename to client/branded/src/search-ui/components/SymbolSearchResult.tsx diff --git a/client/search-ui/src/components/SyntaxHighlightedSearchQuery.story.tsx b/client/branded/src/search-ui/components/SyntaxHighlightedSearchQuery.story.tsx similarity index 94% rename from client/search-ui/src/components/SyntaxHighlightedSearchQuery.story.tsx rename to client/branded/src/search-ui/components/SyntaxHighlightedSearchQuery.story.tsx index a99580e27f9..2d473958b8b 100644 --- a/client/search-ui/src/components/SyntaxHighlightedSearchQuery.story.tsx +++ b/client/branded/src/search-ui/components/SyntaxHighlightedSearchQuery.story.tsx @@ -7,7 +7,7 @@ import { BrandedStory } from '@sourcegraph/wildcard/src/stories' import { SyntaxHighlightedSearchQuery } from './SyntaxHighlightedSearchQuery' const config: Meta = { - title: 'search-ui/SyntaxHighlightedSearchQuery', + title: 'branded/search-ui/SyntaxHighlightedSearchQuery', parameters: { chromatic: { viewports: [480] }, }, diff --git a/client/search-ui/src/components/SyntaxHighlightedSearchQuery.test.tsx b/client/branded/src/search-ui/components/SyntaxHighlightedSearchQuery.test.tsx similarity index 100% rename from client/search-ui/src/components/SyntaxHighlightedSearchQuery.test.tsx rename to client/branded/src/search-ui/components/SyntaxHighlightedSearchQuery.test.tsx diff --git a/client/search-ui/src/components/SyntaxHighlightedSearchQuery.tsx b/client/branded/src/search-ui/components/SyntaxHighlightedSearchQuery.tsx similarity index 100% rename from client/search-ui/src/components/SyntaxHighlightedSearchQuery.tsx rename to client/branded/src/search-ui/components/SyntaxHighlightedSearchQuery.tsx diff --git a/client/search-ui/src/components/__snapshots__/RepoFileLink.test.tsx.snap b/client/branded/src/search-ui/components/__snapshots__/RepoFileLink.test.tsx.snap similarity index 100% rename from client/search-ui/src/components/__snapshots__/RepoFileLink.test.tsx.snap rename to client/branded/src/search-ui/components/__snapshots__/RepoFileLink.test.tsx.snap diff --git a/client/search-ui/src/components/__snapshots__/SyntaxHighlightedSearchQuery.test.tsx.snap b/client/branded/src/search-ui/components/__snapshots__/SyntaxHighlightedSearchQuery.test.tsx.snap similarity index 100% rename from client/search-ui/src/components/__snapshots__/SyntaxHighlightedSearchQuery.test.tsx.snap rename to client/branded/src/search-ui/components/__snapshots__/SyntaxHighlightedSearchQuery.test.tsx.snap diff --git a/client/search-ui/src/components/codeLinkNavigation.ts b/client/branded/src/search-ui/components/codeLinkNavigation.ts similarity index 100% rename from client/search-ui/src/components/codeLinkNavigation.ts rename to client/branded/src/search-ui/components/codeLinkNavigation.ts diff --git a/client/search-ui/src/components/index.ts b/client/branded/src/search-ui/components/index.ts similarity index 100% rename from client/search-ui/src/components/index.ts rename to client/branded/src/search-ui/components/index.ts diff --git a/client/search-ui/src/documentation/ModalVideo.module.scss b/client/branded/src/search-ui/documentation/ModalVideo.module.scss similarity index 100% rename from client/search-ui/src/documentation/ModalVideo.module.scss rename to client/branded/src/search-ui/documentation/ModalVideo.module.scss diff --git a/client/search-ui/src/documentation/ModalVideo.tsx b/client/branded/src/search-ui/documentation/ModalVideo.tsx similarity index 100% rename from client/search-ui/src/documentation/ModalVideo.tsx rename to client/branded/src/search-ui/documentation/ModalVideo.tsx diff --git a/client/search-ui/src/experimental.ts b/client/branded/src/search-ui/experimental.ts similarity index 100% rename from client/search-ui/src/experimental.ts rename to client/branded/src/search-ui/experimental.ts diff --git a/client/search-ui/src/index.ts b/client/branded/src/search-ui/index.ts similarity index 100% rename from client/search-ui/src/index.ts rename to client/branded/src/search-ui/index.ts diff --git a/client/search-ui/src/input/CodeMirrorQueryInput.module.scss b/client/branded/src/search-ui/input/CodeMirrorQueryInput.module.scss similarity index 100% rename from client/search-ui/src/input/CodeMirrorQueryInput.module.scss rename to client/branded/src/search-ui/input/CodeMirrorQueryInput.module.scss diff --git a/client/search-ui/src/input/CodeMirrorQueryInput.tsx b/client/branded/src/search-ui/input/CodeMirrorQueryInput.tsx similarity index 100% rename from client/search-ui/src/input/CodeMirrorQueryInput.tsx rename to client/branded/src/search-ui/input/CodeMirrorQueryInput.tsx diff --git a/client/search-ui/src/input/LazyQueryInput.module.scss b/client/branded/src/search-ui/input/LazyQueryInput.module.scss similarity index 100% rename from client/search-ui/src/input/LazyQueryInput.module.scss rename to client/branded/src/search-ui/input/LazyQueryInput.module.scss diff --git a/client/search-ui/src/input/LazyQueryInput.test.tsx b/client/branded/src/search-ui/input/LazyQueryInput.test.tsx similarity index 100% rename from client/search-ui/src/input/LazyQueryInput.test.tsx rename to client/branded/src/search-ui/input/LazyQueryInput.test.tsx diff --git a/client/search-ui/src/input/LazyQueryInput.tsx b/client/branded/src/search-ui/input/LazyQueryInput.tsx similarity index 100% rename from client/search-ui/src/input/LazyQueryInput.tsx rename to client/branded/src/search-ui/input/LazyQueryInput.tsx diff --git a/client/search-ui/src/input/QueryInput.ts b/client/branded/src/search-ui/input/QueryInput.ts similarity index 100% rename from client/search-ui/src/input/QueryInput.ts rename to client/branded/src/search-ui/input/QueryInput.ts diff --git a/client/search-ui/src/input/SearchBox.module.scss b/client/branded/src/search-ui/input/SearchBox.module.scss similarity index 100% rename from client/search-ui/src/input/SearchBox.module.scss rename to client/branded/src/search-ui/input/SearchBox.module.scss diff --git a/client/search-ui/src/input/SearchBox.story.tsx b/client/branded/src/search-ui/input/SearchBox.story.tsx similarity index 98% rename from client/search-ui/src/input/SearchBox.story.tsx rename to client/branded/src/search-ui/input/SearchBox.story.tsx index c4209ada655..79e0a32adbb 100644 --- a/client/search-ui/src/input/SearchBox.story.tsx +++ b/client/branded/src/search-ui/input/SearchBox.story.tsx @@ -14,7 +14,7 @@ import { BrandedStory } from '@sourcegraph/wildcard/src/stories' import { SearchBox, SearchBoxProps } from './SearchBox' const config: Meta = { - title: 'search-ui/input/SearchBox', + title: 'branded/search-ui/input/SearchBox', parameters: { chromatic: { viewports: [575, 700], disableSnapshot: false }, }, diff --git a/client/search-ui/src/input/SearchBox.tsx b/client/branded/src/search-ui/input/SearchBox.tsx similarity index 100% rename from client/search-ui/src/input/SearchBox.tsx rename to client/branded/src/search-ui/input/SearchBox.tsx diff --git a/client/search-ui/src/input/SearchButton.module.scss b/client/branded/src/search-ui/input/SearchButton.module.scss similarity index 100% rename from client/search-ui/src/input/SearchButton.module.scss rename to client/branded/src/search-ui/input/SearchButton.module.scss diff --git a/client/search-ui/src/input/SearchButton.tsx b/client/branded/src/search-ui/input/SearchButton.tsx similarity index 100% rename from client/search-ui/src/input/SearchButton.tsx rename to client/branded/src/search-ui/input/SearchButton.tsx diff --git a/client/search-ui/src/input/SearchContextDropdown.module.scss b/client/branded/src/search-ui/input/SearchContextDropdown.module.scss similarity index 100% rename from client/search-ui/src/input/SearchContextDropdown.module.scss rename to client/branded/src/search-ui/input/SearchContextDropdown.module.scss diff --git a/client/search-ui/src/input/SearchContextDropdown.test.tsx b/client/branded/src/search-ui/input/SearchContextDropdown.test.tsx similarity index 100% rename from client/search-ui/src/input/SearchContextDropdown.test.tsx rename to client/branded/src/search-ui/input/SearchContextDropdown.test.tsx diff --git a/client/search-ui/src/input/SearchContextDropdown.tsx b/client/branded/src/search-ui/input/SearchContextDropdown.tsx similarity index 100% rename from client/search-ui/src/input/SearchContextDropdown.tsx rename to client/branded/src/search-ui/input/SearchContextDropdown.tsx diff --git a/client/search-ui/src/input/SearchContextMenu.module.scss b/client/branded/src/search-ui/input/SearchContextMenu.module.scss similarity index 100% rename from client/search-ui/src/input/SearchContextMenu.module.scss rename to client/branded/src/search-ui/input/SearchContextMenu.module.scss diff --git a/client/search-ui/src/input/SearchContextMenu.story.tsx b/client/branded/src/search-ui/input/SearchContextMenu.story.tsx similarity index 97% rename from client/search-ui/src/input/SearchContextMenu.story.tsx rename to client/branded/src/search-ui/input/SearchContextMenu.story.tsx index c1d29c1c3aa..48c3793ae4b 100644 --- a/client/search-ui/src/input/SearchContextMenu.story.tsx +++ b/client/branded/src/search-ui/input/SearchContextMenu.story.tsx @@ -19,7 +19,7 @@ const decorator: DecoratorFn = story => ( ) const config: Meta = { - title: 'search-ui/input/SearchContextMenu', + title: 'branded/search-ui/input/SearchContextMenu', parameters: { chromatic: { viewports: [500], disableSnapshot: false }, design: { diff --git a/client/search-ui/src/input/SearchContextMenu.test.tsx b/client/branded/src/search-ui/input/SearchContextMenu.test.tsx similarity index 100% rename from client/search-ui/src/input/SearchContextMenu.test.tsx rename to client/branded/src/search-ui/input/SearchContextMenu.test.tsx diff --git a/client/search-ui/src/input/SearchContextMenu.tsx b/client/branded/src/search-ui/input/SearchContextMenu.tsx similarity index 100% rename from client/search-ui/src/input/SearchContextMenu.tsx rename to client/branded/src/search-ui/input/SearchContextMenu.tsx diff --git a/client/search-ui/src/input/SearchContextMenuItem.story.tsx b/client/branded/src/search-ui/input/SearchContextMenuItem.story.tsx similarity index 96% rename from client/search-ui/src/input/SearchContextMenuItem.story.tsx rename to client/branded/src/search-ui/input/SearchContextMenuItem.story.tsx index fd6869ba675..98c440381c3 100644 --- a/client/search-ui/src/input/SearchContextMenuItem.story.tsx +++ b/client/branded/src/search-ui/input/SearchContextMenuItem.story.tsx @@ -12,7 +12,7 @@ const decorator: DecoratorFn = story => ( ) const config: Meta = { - title: 'search-ui/input/SearchContextMenuItem', + title: 'branded/search-ui/input/SearchContextMenuItem', parameters: { chromatic: { viewports: [1200], disableSnapshot: false }, }, diff --git a/client/search-ui/src/input/SearchHelpDropdownButton.module.scss b/client/branded/src/search-ui/input/SearchHelpDropdownButton.module.scss similarity index 100% rename from client/search-ui/src/input/SearchHelpDropdownButton.module.scss rename to client/branded/src/search-ui/input/SearchHelpDropdownButton.module.scss diff --git a/client/search-ui/src/input/SearchHelpDropdownButton.tsx b/client/branded/src/search-ui/input/SearchHelpDropdownButton.tsx similarity index 100% rename from client/search-ui/src/input/SearchHelpDropdownButton.tsx rename to client/branded/src/search-ui/input/SearchHelpDropdownButton.tsx diff --git a/client/search-ui/src/input/SearchHistoryDropdown.module.scss b/client/branded/src/search-ui/input/SearchHistoryDropdown.module.scss similarity index 100% rename from client/search-ui/src/input/SearchHistoryDropdown.module.scss rename to client/branded/src/search-ui/input/SearchHistoryDropdown.module.scss diff --git a/client/search-ui/src/input/SearchHistoryDropdown.tsx b/client/branded/src/search-ui/input/SearchHistoryDropdown.tsx similarity index 98% rename from client/search-ui/src/input/SearchHistoryDropdown.tsx rename to client/branded/src/search-ui/input/SearchHistoryDropdown.tsx index d22c8ee5600..85f309f9067 100644 --- a/client/search-ui/src/input/SearchHistoryDropdown.tsx +++ b/client/branded/src/search-ui/input/SearchHistoryDropdown.tsx @@ -11,7 +11,6 @@ import React, { import { mdiClockOutline } from '@mdi/js' import classNames from 'classnames' -import { Timestamp } from '@sourcegraph/branded/src/components/Timestamp' import { pluralize } from '@sourcegraph/common' import { RecentSearch } from '@sourcegraph/shared/src/settings/temporary/recentSearches' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' @@ -27,6 +26,7 @@ import { usePopoverContext, } from '@sourcegraph/wildcard' +import { Timestamp } from '../../components/Timestamp' import { SyntaxHighlightedSearchQuery } from '../components' import styles from './SearchHistoryDropdown.module.scss' diff --git a/client/search-ui/src/input/__snapshots__/LazyQueryInput.test.tsx.snap b/client/branded/src/search-ui/input/__snapshots__/LazyQueryInput.test.tsx.snap similarity index 100% rename from client/search-ui/src/input/__snapshots__/LazyQueryInput.test.tsx.snap rename to client/branded/src/search-ui/input/__snapshots__/LazyQueryInput.test.tsx.snap diff --git a/client/search-ui/src/input/__snapshots__/SearchContextMenu.test.tsx.snap b/client/branded/src/search-ui/input/__snapshots__/SearchContextMenu.test.tsx.snap similarity index 100% rename from client/search-ui/src/input/__snapshots__/SearchContextMenu.test.tsx.snap rename to client/branded/src/search-ui/input/__snapshots__/SearchContextMenu.test.tsx.snap diff --git a/client/search-ui/src/input/codemirror/README.md b/client/branded/src/search-ui/input/codemirror/README.md similarity index 100% rename from client/search-ui/src/input/codemirror/README.md rename to client/branded/src/search-ui/input/codemirror/README.md diff --git a/client/search-ui/src/input/codemirror/completion.test.ts b/client/branded/src/search-ui/input/codemirror/completion.test.ts similarity index 100% rename from client/search-ui/src/input/codemirror/completion.test.ts rename to client/branded/src/search-ui/input/codemirror/completion.test.ts diff --git a/client/search-ui/src/input/codemirror/completion.ts b/client/branded/src/search-ui/input/codemirror/completion.ts similarity index 100% rename from client/search-ui/src/input/codemirror/completion.ts rename to client/branded/src/search-ui/input/codemirror/completion.ts diff --git a/client/search-ui/src/input/codemirror/history.ts b/client/branded/src/search-ui/input/codemirror/history.ts similarity index 100% rename from client/search-ui/src/input/codemirror/history.ts rename to client/branded/src/search-ui/input/codemirror/history.ts diff --git a/client/search-ui/src/input/codemirror/index.ts b/client/branded/src/search-ui/input/codemirror/index.ts similarity index 100% rename from client/search-ui/src/input/codemirror/index.ts rename to client/branded/src/search-ui/input/codemirror/index.ts diff --git a/client/search-ui/src/input/codemirror/loading-indicator.ts b/client/branded/src/search-ui/input/codemirror/loading-indicator.ts similarity index 100% rename from client/search-ui/src/input/codemirror/loading-indicator.ts rename to client/branded/src/search-ui/input/codemirror/loading-indicator.ts diff --git a/client/search-ui/src/input/codemirror/parsedQuery.ts b/client/branded/src/search-ui/input/codemirror/parsedQuery.ts similarity index 100% rename from client/search-ui/src/input/codemirror/parsedQuery.ts rename to client/branded/src/search-ui/input/codemirror/parsedQuery.ts diff --git a/client/search-ui/src/input/codemirror/syntax-highlighting.ts b/client/branded/src/search-ui/input/codemirror/syntax-highlighting.ts similarity index 100% rename from client/search-ui/src/input/codemirror/syntax-highlighting.ts rename to client/branded/src/search-ui/input/codemirror/syntax-highlighting.ts diff --git a/client/search-ui/src/input/experimental/CodeMirrorQueryInputWrapper.module.scss b/client/branded/src/search-ui/input/experimental/CodeMirrorQueryInputWrapper.module.scss similarity index 100% rename from client/search-ui/src/input/experimental/CodeMirrorQueryInputWrapper.module.scss rename to client/branded/src/search-ui/input/experimental/CodeMirrorQueryInputWrapper.module.scss diff --git a/client/search-ui/src/input/experimental/CodeMirrorQueryInputWrapper.tsx b/client/branded/src/search-ui/input/experimental/CodeMirrorQueryInputWrapper.tsx similarity index 100% rename from client/search-ui/src/input/experimental/CodeMirrorQueryInputWrapper.tsx rename to client/branded/src/search-ui/input/experimental/CodeMirrorQueryInputWrapper.tsx diff --git a/client/search-ui/src/input/experimental/LazyCodeMirrorQueryInput.tsx b/client/branded/src/search-ui/input/experimental/LazyCodeMirrorQueryInput.tsx similarity index 100% rename from client/search-ui/src/input/experimental/LazyCodeMirrorQueryInput.tsx rename to client/branded/src/search-ui/input/experimental/LazyCodeMirrorQueryInput.tsx diff --git a/client/search-ui/src/input/experimental/README.md b/client/branded/src/search-ui/input/experimental/README.md similarity index 100% rename from client/search-ui/src/input/experimental/README.md rename to client/branded/src/search-ui/input/experimental/README.md diff --git a/client/search-ui/src/input/experimental/Suggestions.module.scss b/client/branded/src/search-ui/input/experimental/Suggestions.module.scss similarity index 100% rename from client/search-ui/src/input/experimental/Suggestions.module.scss rename to client/branded/src/search-ui/input/experimental/Suggestions.module.scss diff --git a/client/search-ui/src/input/experimental/Suggestions.tsx b/client/branded/src/search-ui/input/experimental/Suggestions.tsx similarity index 100% rename from client/search-ui/src/input/experimental/Suggestions.tsx rename to client/branded/src/search-ui/input/experimental/Suggestions.tsx diff --git a/client/search-ui/src/input/experimental/index.ts b/client/branded/src/search-ui/input/experimental/index.ts similarity index 100% rename from client/search-ui/src/input/experimental/index.ts rename to client/branded/src/search-ui/input/experimental/index.ts diff --git a/client/search-ui/src/input/experimental/suggestionsExtension.ts b/client/branded/src/search-ui/input/experimental/suggestionsExtension.ts similarity index 100% rename from client/search-ui/src/input/experimental/suggestionsExtension.ts rename to client/branded/src/search-ui/input/experimental/suggestionsExtension.ts diff --git a/client/search-ui/src/input/toggles/CopyQueryButton.tsx b/client/branded/src/search-ui/input/toggles/CopyQueryButton.tsx similarity index 100% rename from client/search-ui/src/input/toggles/CopyQueryButton.tsx rename to client/branded/src/search-ui/input/toggles/CopyQueryButton.tsx diff --git a/client/search-ui/src/input/toggles/QueryInputToggle.tsx b/client/branded/src/search-ui/input/toggles/QueryInputToggle.tsx similarity index 100% rename from client/search-ui/src/input/toggles/QueryInputToggle.tsx rename to client/branded/src/search-ui/input/toggles/QueryInputToggle.tsx diff --git a/client/search-ui/src/input/toggles/SmartSearchToggle.module.scss b/client/branded/src/search-ui/input/toggles/SmartSearchToggle.module.scss similarity index 100% rename from client/search-ui/src/input/toggles/SmartSearchToggle.module.scss rename to client/branded/src/search-ui/input/toggles/SmartSearchToggle.module.scss diff --git a/client/search-ui/src/input/toggles/SmartSearchToggle.tsx b/client/branded/src/search-ui/input/toggles/SmartSearchToggle.tsx similarity index 100% rename from client/search-ui/src/input/toggles/SmartSearchToggle.tsx rename to client/branded/src/search-ui/input/toggles/SmartSearchToggle.tsx diff --git a/client/search-ui/src/input/toggles/Toggles.module.scss b/client/branded/src/search-ui/input/toggles/Toggles.module.scss similarity index 100% rename from client/search-ui/src/input/toggles/Toggles.module.scss rename to client/branded/src/search-ui/input/toggles/Toggles.module.scss diff --git a/client/search-ui/src/input/toggles/Toggles.test.tsx b/client/branded/src/search-ui/input/toggles/Toggles.test.tsx similarity index 100% rename from client/search-ui/src/input/toggles/Toggles.test.tsx rename to client/branded/src/search-ui/input/toggles/Toggles.test.tsx diff --git a/client/search-ui/src/input/toggles/Toggles.tsx b/client/branded/src/search-ui/input/toggles/Toggles.tsx similarity index 100% rename from client/search-ui/src/input/toggles/Toggles.tsx rename to client/branded/src/search-ui/input/toggles/Toggles.tsx diff --git a/client/search-ui/src/input/toggles/__snapshots__/Toggles.test.tsx.snap b/client/branded/src/search-ui/input/toggles/__snapshots__/Toggles.test.tsx.snap similarity index 100% rename from client/search-ui/src/input/toggles/__snapshots__/Toggles.test.tsx.snap rename to client/branded/src/search-ui/input/toggles/__snapshots__/Toggles.test.tsx.snap diff --git a/client/search-ui/src/input/toggles/index.ts b/client/branded/src/search-ui/input/toggles/index.ts similarity index 100% rename from client/search-ui/src/input/toggles/index.ts rename to client/branded/src/search-ui/input/toggles/index.ts diff --git a/client/search-ui/src/results/AnnotatedSearchExample.module.scss b/client/branded/src/search-ui/results/AnnotatedSearchExample.module.scss similarity index 100% rename from client/search-ui/src/results/AnnotatedSearchExample.module.scss rename to client/branded/src/search-ui/results/AnnotatedSearchExample.module.scss diff --git a/client/search-ui/src/results/AnnotatedSearchExample.tsx b/client/branded/src/search-ui/results/AnnotatedSearchExample.tsx similarity index 100% rename from client/search-ui/src/results/AnnotatedSearchExample.tsx rename to client/branded/src/search-ui/results/AnnotatedSearchExample.tsx diff --git a/client/search-ui/src/results/NoResultsPage.module.scss b/client/branded/src/search-ui/results/NoResultsPage.module.scss similarity index 100% rename from client/search-ui/src/results/NoResultsPage.module.scss rename to client/branded/src/search-ui/results/NoResultsPage.module.scss diff --git a/client/search-ui/src/results/NoResultsPage.tsx b/client/branded/src/search-ui/results/NoResultsPage.tsx similarity index 100% rename from client/search-ui/src/results/NoResultsPage.tsx rename to client/branded/src/search-ui/results/NoResultsPage.tsx diff --git a/client/search-ui/src/results/StreamingSearchResultsFooter.tsx b/client/branded/src/search-ui/results/StreamingSearchResultsFooter.tsx similarity index 100% rename from client/search-ui/src/results/StreamingSearchResultsFooter.tsx rename to client/branded/src/search-ui/results/StreamingSearchResultsFooter.tsx diff --git a/client/search-ui/src/results/StreamingSearchResultsList.module.scss b/client/branded/src/search-ui/results/StreamingSearchResultsList.module.scss similarity index 100% rename from client/search-ui/src/results/StreamingSearchResultsList.module.scss rename to client/branded/src/search-ui/results/StreamingSearchResultsList.module.scss diff --git a/client/search-ui/src/results/StreamingSearchResultsList.tsx b/client/branded/src/search-ui/results/StreamingSearchResultsList.tsx similarity index 100% rename from client/search-ui/src/results/StreamingSearchResultsList.tsx rename to client/branded/src/search-ui/results/StreamingSearchResultsList.tsx diff --git a/client/search-ui/src/results/progress/StreamingProgress.story.tsx b/client/branded/src/search-ui/results/progress/StreamingProgress.story.tsx similarity index 99% rename from client/search-ui/src/results/progress/StreamingProgress.story.tsx rename to client/branded/src/search-ui/results/progress/StreamingProgress.story.tsx index 14785de68a6..a5d004680b1 100644 --- a/client/search-ui/src/results/progress/StreamingProgress.story.tsx +++ b/client/branded/src/search-ui/results/progress/StreamingProgress.story.tsx @@ -7,7 +7,7 @@ import { BrandedStory } from '@sourcegraph/wildcard/src/stories' import { StreamingProgress } from './StreamingProgress' const config: Meta = { - title: 'search-ui/results/progress/StreamingProgress', + title: 'branded/search-ui/results/progress/StreamingProgress', parameters: { design: { type: 'figma', diff --git a/client/search-ui/src/results/progress/StreamingProgress.tsx b/client/branded/src/search-ui/results/progress/StreamingProgress.tsx similarity index 100% rename from client/search-ui/src/results/progress/StreamingProgress.tsx rename to client/branded/src/search-ui/results/progress/StreamingProgress.tsx diff --git a/client/search-ui/src/results/progress/StreamingProgressCount.module.scss b/client/branded/src/search-ui/results/progress/StreamingProgressCount.module.scss similarity index 100% rename from client/search-ui/src/results/progress/StreamingProgressCount.module.scss rename to client/branded/src/search-ui/results/progress/StreamingProgressCount.module.scss diff --git a/client/search-ui/src/results/progress/StreamingProgressCount.test.tsx b/client/branded/src/search-ui/results/progress/StreamingProgressCount.test.tsx similarity index 100% rename from client/search-ui/src/results/progress/StreamingProgressCount.test.tsx rename to client/branded/src/search-ui/results/progress/StreamingProgressCount.test.tsx diff --git a/client/search-ui/src/results/progress/StreamingProgressCount.tsx b/client/branded/src/search-ui/results/progress/StreamingProgressCount.tsx similarity index 100% rename from client/search-ui/src/results/progress/StreamingProgressCount.tsx rename to client/branded/src/search-ui/results/progress/StreamingProgressCount.tsx diff --git a/client/search-ui/src/results/progress/StreamingProgressSkippedButton.module.scss b/client/branded/src/search-ui/results/progress/StreamingProgressSkippedButton.module.scss similarity index 100% rename from client/search-ui/src/results/progress/StreamingProgressSkippedButton.module.scss rename to client/branded/src/search-ui/results/progress/StreamingProgressSkippedButton.module.scss diff --git a/client/search-ui/src/results/progress/StreamingProgressSkippedButton.test.tsx b/client/branded/src/search-ui/results/progress/StreamingProgressSkippedButton.test.tsx similarity index 100% rename from client/search-ui/src/results/progress/StreamingProgressSkippedButton.test.tsx rename to client/branded/src/search-ui/results/progress/StreamingProgressSkippedButton.test.tsx diff --git a/client/search-ui/src/results/progress/StreamingProgressSkippedButton.tsx b/client/branded/src/search-ui/results/progress/StreamingProgressSkippedButton.tsx similarity index 100% rename from client/search-ui/src/results/progress/StreamingProgressSkippedButton.tsx rename to client/branded/src/search-ui/results/progress/StreamingProgressSkippedButton.tsx diff --git a/client/search-ui/src/results/progress/StreamingProgressSkippedPopover.module.scss b/client/branded/src/search-ui/results/progress/StreamingProgressSkippedPopover.module.scss similarity index 100% rename from client/search-ui/src/results/progress/StreamingProgressSkippedPopover.module.scss rename to client/branded/src/search-ui/results/progress/StreamingProgressSkippedPopover.module.scss diff --git a/client/search-ui/src/results/progress/StreamingProgressSkippedPopover.story.tsx b/client/branded/src/search-ui/results/progress/StreamingProgressSkippedPopover.story.tsx similarity index 98% rename from client/search-ui/src/results/progress/StreamingProgressSkippedPopover.story.tsx rename to client/branded/src/search-ui/results/progress/StreamingProgressSkippedPopover.story.tsx index 628cfcad0c5..4783f2a116e 100644 --- a/client/search-ui/src/results/progress/StreamingProgressSkippedPopover.story.tsx +++ b/client/branded/src/search-ui/results/progress/StreamingProgressSkippedPopover.story.tsx @@ -6,7 +6,7 @@ import { BrandedStory } from '@sourcegraph/wildcard/src/stories' import { StreamingProgressSkippedPopover } from './StreamingProgressSkippedPopover' const config: Meta = { - title: 'search-ui/results/progress/StreamingProgressSkippedPopover', + title: 'branded/search-ui/results/progress/StreamingProgressSkippedPopover', parameters: { design: { type: 'figma', diff --git a/client/search-ui/src/results/progress/StreamingProgressSkippedPopover.test.tsx b/client/branded/src/search-ui/results/progress/StreamingProgressSkippedPopover.test.tsx similarity index 100% rename from client/search-ui/src/results/progress/StreamingProgressSkippedPopover.test.tsx rename to client/branded/src/search-ui/results/progress/StreamingProgressSkippedPopover.test.tsx diff --git a/client/search-ui/src/results/progress/StreamingProgressSkippedPopover.tsx b/client/branded/src/search-ui/results/progress/StreamingProgressSkippedPopover.tsx similarity index 100% rename from client/search-ui/src/results/progress/StreamingProgressSkippedPopover.tsx rename to client/branded/src/search-ui/results/progress/StreamingProgressSkippedPopover.tsx diff --git a/client/search-ui/src/results/progress/__snapshots__/StreamingProgressCount.test.tsx.snap b/client/branded/src/search-ui/results/progress/__snapshots__/StreamingProgressCount.test.tsx.snap similarity index 100% rename from client/search-ui/src/results/progress/__snapshots__/StreamingProgressCount.test.tsx.snap rename to client/branded/src/search-ui/results/progress/__snapshots__/StreamingProgressCount.test.tsx.snap diff --git a/client/search-ui/src/results/progress/__snapshots__/StreamingProgressSkippedPopover.test.tsx.snap b/client/branded/src/search-ui/results/progress/__snapshots__/StreamingProgressSkippedPopover.test.tsx.snap similarity index 100% rename from client/search-ui/src/results/progress/__snapshots__/StreamingProgressSkippedPopover.test.tsx.snap rename to client/branded/src/search-ui/results/progress/__snapshots__/StreamingProgressSkippedPopover.test.tsx.snap diff --git a/client/search-ui/src/results/sidebar/FilterLink.test.tsx b/client/branded/src/search-ui/results/sidebar/FilterLink.test.tsx similarity index 100% rename from client/search-ui/src/results/sidebar/FilterLink.test.tsx rename to client/branded/src/search-ui/results/sidebar/FilterLink.test.tsx diff --git a/client/search-ui/src/results/sidebar/FilterLink.tsx b/client/branded/src/search-ui/results/sidebar/FilterLink.tsx similarity index 100% rename from client/search-ui/src/results/sidebar/FilterLink.tsx rename to client/branded/src/search-ui/results/sidebar/FilterLink.tsx diff --git a/client/search-ui/src/results/sidebar/QuickLink.test.tsx b/client/branded/src/search-ui/results/sidebar/QuickLink.test.tsx similarity index 100% rename from client/search-ui/src/results/sidebar/QuickLink.test.tsx rename to client/branded/src/search-ui/results/sidebar/QuickLink.test.tsx diff --git a/client/search-ui/src/results/sidebar/QuickLink.tsx b/client/branded/src/search-ui/results/sidebar/QuickLink.tsx similarity index 100% rename from client/search-ui/src/results/sidebar/QuickLink.tsx rename to client/branded/src/search-ui/results/sidebar/QuickLink.tsx diff --git a/client/search-ui/src/results/sidebar/SearchFilterSection.module.scss b/client/branded/src/search-ui/results/sidebar/SearchFilterSection.module.scss similarity index 100% rename from client/search-ui/src/results/sidebar/SearchFilterSection.module.scss rename to client/branded/src/search-ui/results/sidebar/SearchFilterSection.module.scss diff --git a/client/search-ui/src/results/sidebar/SearchFilterSection.test.tsx b/client/branded/src/search-ui/results/sidebar/SearchFilterSection.test.tsx similarity index 100% rename from client/search-ui/src/results/sidebar/SearchFilterSection.test.tsx rename to client/branded/src/search-ui/results/sidebar/SearchFilterSection.test.tsx diff --git a/client/search-ui/src/results/sidebar/SearchFilterSection.tsx b/client/branded/src/search-ui/results/sidebar/SearchFilterSection.tsx similarity index 100% rename from client/search-ui/src/results/sidebar/SearchFilterSection.tsx rename to client/branded/src/search-ui/results/sidebar/SearchFilterSection.tsx diff --git a/client/search-ui/src/results/sidebar/SearchReference.module.scss b/client/branded/src/search-ui/results/sidebar/SearchReference.module.scss similarity index 100% rename from client/search-ui/src/results/sidebar/SearchReference.module.scss rename to client/branded/src/search-ui/results/sidebar/SearchReference.module.scss diff --git a/client/search-ui/src/results/sidebar/SearchReference.tsx b/client/branded/src/search-ui/results/sidebar/SearchReference.tsx similarity index 100% rename from client/search-ui/src/results/sidebar/SearchReference.tsx rename to client/branded/src/search-ui/results/sidebar/SearchReference.tsx diff --git a/client/search-ui/src/results/sidebar/SearchSidebar.module.scss b/client/branded/src/search-ui/results/sidebar/SearchSidebar.module.scss similarity index 100% rename from client/search-ui/src/results/sidebar/SearchSidebar.module.scss rename to client/branded/src/search-ui/results/sidebar/SearchSidebar.module.scss diff --git a/client/search-ui/src/results/sidebar/SearchSidebar.tsx b/client/branded/src/search-ui/results/sidebar/SearchSidebar.tsx similarity index 100% rename from client/search-ui/src/results/sidebar/SearchSidebar.tsx rename to client/branded/src/search-ui/results/sidebar/SearchSidebar.tsx diff --git a/client/search-ui/src/results/sidebar/SearchTypeLink.tsx b/client/branded/src/search-ui/results/sidebar/SearchTypeLink.tsx similarity index 100% rename from client/search-ui/src/results/sidebar/SearchTypeLink.tsx rename to client/branded/src/search-ui/results/sidebar/SearchTypeLink.tsx diff --git a/client/search-ui/src/results/sidebar/__snapshots__/FilterLink.test.tsx.snap b/client/branded/src/search-ui/results/sidebar/__snapshots__/FilterLink.test.tsx.snap similarity index 100% rename from client/search-ui/src/results/sidebar/__snapshots__/FilterLink.test.tsx.snap rename to client/branded/src/search-ui/results/sidebar/__snapshots__/FilterLink.test.tsx.snap diff --git a/client/search-ui/src/results/sidebar/__snapshots__/QuickLink.test.tsx.snap b/client/branded/src/search-ui/results/sidebar/__snapshots__/QuickLink.test.tsx.snap similarity index 100% rename from client/search-ui/src/results/sidebar/__snapshots__/QuickLink.test.tsx.snap rename to client/branded/src/search-ui/results/sidebar/__snapshots__/QuickLink.test.tsx.snap diff --git a/client/search-ui/src/results/sidebar/helpers.test.ts b/client/branded/src/search-ui/results/sidebar/helpers.test.ts similarity index 100% rename from client/search-ui/src/results/sidebar/helpers.test.ts rename to client/branded/src/search-ui/results/sidebar/helpers.test.ts diff --git a/client/search-ui/src/results/sidebar/helpers.ts b/client/branded/src/search-ui/results/sidebar/helpers.ts similarity index 100% rename from client/search-ui/src/results/sidebar/helpers.ts rename to client/branded/src/search-ui/results/sidebar/helpers.ts diff --git a/client/search-ui/src/results/sidebar/revisions.ts b/client/branded/src/search-ui/results/sidebar/revisions.ts similarity index 100% rename from client/search-ui/src/results/sidebar/revisions.ts rename to client/branded/src/search-ui/results/sidebar/revisions.ts diff --git a/client/search-ui/src/results/use-items-to-show.test.ts b/client/branded/src/search-ui/results/use-items-to-show.test.ts similarity index 100% rename from client/search-ui/src/results/use-items-to-show.test.ts rename to client/branded/src/search-ui/results/use-items-to-show.test.ts diff --git a/client/search-ui/src/results/use-items-to-show.ts b/client/branded/src/search-ui/results/use-items-to-show.ts similarity index 100% rename from client/search-ui/src/results/use-items-to-show.ts rename to client/branded/src/search-ui/results/use-items-to-show.ts diff --git a/client/search-ui/src/results/useSearchResultsKeyboardNavigation.ts b/client/branded/src/search-ui/results/useSearchResultsKeyboardNavigation.ts similarity index 100% rename from client/search-ui/src/results/useSearchResultsKeyboardNavigation.ts rename to client/branded/src/search-ui/results/useSearchResultsKeyboardNavigation.ts diff --git a/client/search-ui/src/util/events.ts b/client/branded/src/search-ui/util/events.ts similarity index 100% rename from client/search-ui/src/util/events.ts rename to client/branded/src/search-ui/util/events.ts diff --git a/client/search-ui/src/util/index.ts b/client/branded/src/search-ui/util/index.ts similarity index 100% rename from client/search-ui/src/util/index.ts rename to client/branded/src/search-ui/util/index.ts diff --git a/client/search-ui/src/util/stars.ts b/client/branded/src/search-ui/util/stars.ts similarity index 100% rename from client/search-ui/src/util/stars.ts rename to client/branded/src/search-ui/util/stars.ts diff --git a/client/branded/tsconfig.json b/client/branded/tsconfig.json index 12b772a29c6..8386ab09233 100644 --- a/client/branded/tsconfig.json +++ b/client/branded/tsconfig.json @@ -17,8 +17,10 @@ { "path": "../shared" }, { "path": "../storybook" }, { "path": "../common" }, + { "path": "../http-client" }, { "path": "../codeintellify" }, { "path": "../client-api" }, + { "path": "../observability-client" }, { "path": "../wildcard" }, ], } diff --git a/client/jetbrains/tsconfig.json b/client/jetbrains/tsconfig.json index 61c7aaf373f..2bc275fb09f 100644 --- a/client/jetbrains/tsconfig.json +++ b/client/jetbrains/tsconfig.json @@ -15,13 +15,7 @@ "strict": true, "jsx": "react-jsx", }, - "references": [ - { "path": "../shared" }, - { "path": "../common" }, - { "path": "../branded" }, - { "path": "../search-ui" }, - { "path": "../wildcard" }, - ], + "references": [{ "path": "../shared" }, { "path": "../common" }, { "path": "../branded" }, { "path": "../wildcard" }], "include": ["./package.json", "**/*", ".*", "**/*.d.ts"], "exclude": ["node_modules", "../../node_modules", ".vscode-test", "out", "dist", "src", "gradle"], } diff --git a/client/jetbrains/webview/src/search/StatusBar.tsx b/client/jetbrains/webview/src/search/StatusBar.tsx index cc0a6cdc14e..e1bddbff3d4 100644 --- a/client/jetbrains/webview/src/search/StatusBar.tsx +++ b/client/jetbrains/webview/src/search/StatusBar.tsx @@ -1,6 +1,6 @@ import React from 'react' -import { StreamingProgressCount } from '@sourcegraph/search-ui' +import { StreamingProgressCount } from '@sourcegraph/branded' import { Progress, StreamingResultsState } from '@sourcegraph/shared/src/search/stream' import styles from './StatusBar.module.scss' diff --git a/client/jetbrains/webview/src/search/input/JetBrainsSearchBox.tsx b/client/jetbrains/webview/src/search/input/JetBrainsSearchBox.tsx index 27505e6de7b..bbabc3db5a0 100644 --- a/client/jetbrains/webview/src/search/input/JetBrainsSearchBox.tsx +++ b/client/jetbrains/webview/src/search/input/JetBrainsSearchBox.tsx @@ -5,8 +5,8 @@ import React, { useCallback, useState } from 'react' import classNames from 'classnames' -import { IEditor, LazyQueryInput } from '@sourcegraph/search-ui/src/input/LazyQueryInput' -import { SearchContextDropdown } from '@sourcegraph/search-ui/src/input/SearchContextDropdown' +import { IEditor, LazyQueryInput } from '@sourcegraph/branded' +import { SearchContextDropdown } from '@sourcegraph/branded/src/search-ui/input/SearchContextDropdown' import { AuthenticatedUser } from '@sourcegraph/shared/src/auth' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { QueryState, SearchContextInputProps, SubmitSearchProps } from '@sourcegraph/shared/src/search' diff --git a/client/jetbrains/webview/src/search/input/JetBrainsToggles.tsx b/client/jetbrains/webview/src/search/input/JetBrainsToggles.tsx index c0ac89d7dbb..9b1702d9e98 100644 --- a/client/jetbrains/webview/src/search/input/JetBrainsToggles.tsx +++ b/client/jetbrains/webview/src/search/input/JetBrainsToggles.tsx @@ -6,8 +6,8 @@ import React, { useCallback, useMemo } from 'react' import { mdiCodeBrackets, mdiFormatLetterCase, mdiLightningBolt, mdiRegex } from '@mdi/js' import classNames from 'classnames' +import { QueryInputToggle } from '@sourcegraph/branded/src/search-ui/input/toggles/QueryInputToggle' import { isErrorLike } from '@sourcegraph/common' -import { QueryInputToggle } from '@sourcegraph/search-ui/src/input/toggles/QueryInputToggle' import { CaseSensitivityProps, SearchContextProps, diff --git a/client/jetbrains/webview/src/search/results/CommitSearchResult.tsx b/client/jetbrains/webview/src/search/results/CommitSearchResult.tsx index f9acf22d69f..75de878cbc4 100644 --- a/client/jetbrains/webview/src/search/results/CommitSearchResult.tsx +++ b/client/jetbrains/webview/src/search/results/CommitSearchResult.tsx @@ -2,8 +2,8 @@ import React from 'react' import SourceCommitIcon from 'mdi-react/SourceCommitIcon' +import { formatRepositoryStarCount, SearchResultStar } from '@sourcegraph/branded' import { Timestamp } from '@sourcegraph/branded/src/components/Timestamp' -import { formatRepositoryStarCount, SearchResultStar } from '@sourcegraph/search-ui' import { CommitMatch } from '@sourcegraph/shared/src/search/stream' import { Code } from '@sourcegraph/wildcard' diff --git a/client/jetbrains/webview/src/search/results/FileSearchResult.tsx b/client/jetbrains/webview/src/search/results/FileSearchResult.tsx index befcdf64771..48101f67339 100644 --- a/client/jetbrains/webview/src/search/results/FileSearchResult.tsx +++ b/client/jetbrains/webview/src/search/results/FileSearchResult.tsx @@ -3,7 +3,7 @@ import React from 'react' import AlphaSBoxIcon from 'mdi-react/AlphaSBoxIcon' import FileDocumentIcon from 'mdi-react/FileDocumentIcon' -import { formatRepositoryStarCount, SearchResultStar } from '@sourcegraph/search-ui' +import { formatRepositoryStarCount, SearchResultStar } from '@sourcegraph/branded' import { ContentMatch, SymbolMatch } from '@sourcegraph/shared/src/search/stream' import { isSettingsValid, SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { SymbolKind } from '@sourcegraph/shared/src/symbols/SymbolKind' diff --git a/client/jetbrains/webview/src/search/results/PathSearchResult.tsx b/client/jetbrains/webview/src/search/results/PathSearchResult.tsx index 67c331689dc..c1476dcfa6e 100644 --- a/client/jetbrains/webview/src/search/results/PathSearchResult.tsx +++ b/client/jetbrains/webview/src/search/results/PathSearchResult.tsx @@ -2,7 +2,7 @@ import React from 'react' import FileDocumentIcon from 'mdi-react/FileDocumentIcon' -import { formatRepositoryStarCount, SearchResultStar } from '@sourcegraph/search-ui' +import { formatRepositoryStarCount, SearchResultStar } from '@sourcegraph/branded' import { PathMatch } from '@sourcegraph/shared/src/search/stream' import { RepoName } from './RepoName' diff --git a/client/jetbrains/webview/src/search/results/RepoSearchResult.tsx b/client/jetbrains/webview/src/search/results/RepoSearchResult.tsx index ed5edfe9e13..a1cc01823fa 100644 --- a/client/jetbrains/webview/src/search/results/RepoSearchResult.tsx +++ b/client/jetbrains/webview/src/search/results/RepoSearchResult.tsx @@ -2,7 +2,7 @@ import React from 'react' import SourceRepositoryIcon from 'mdi-react/SourceRepositoryIcon' -import { formatRepositoryStarCount, SearchResultStar } from '@sourcegraph/search-ui' +import { formatRepositoryStarCount, SearchResultStar } from '@sourcegraph/branded' import { RepositoryMatch } from '@sourcegraph/shared/src/search/stream' import { RepoName } from './RepoName' diff --git a/client/jetbrains/webview/src/search/results/SearchResultLayout.tsx b/client/jetbrains/webview/src/search/results/SearchResultLayout.tsx index efa98320dd1..826663a4b9f 100644 --- a/client/jetbrains/webview/src/search/results/SearchResultLayout.tsx +++ b/client/jetbrains/webview/src/search/results/SearchResultLayout.tsx @@ -3,7 +3,7 @@ import React from 'react' import classNames from 'classnames' import { MdiReactIconComponentType } from 'mdi-react' -import { CodeHostIcon } from '@sourcegraph/search-ui' +import { CodeHostIcon } from '@sourcegraph/branded' import { Icon } from '@sourcegraph/wildcard' import styles from './SearchResultLayout.module.scss' diff --git a/client/search-ui/.bazelignore b/client/search-ui/.bazelignore deleted file mode 100644 index 52c902c991f..00000000000 --- a/client/search-ui/.bazelignore +++ /dev/null @@ -1,2 +0,0 @@ -# TODO(bazel): remove when no longer generated into src -src/graphql-operations.ts diff --git a/client/search-ui/.eslintignore b/client/search-ui/.eslintignore deleted file mode 100644 index 97a7ee57081..00000000000 --- a/client/search-ui/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -out/ -src/graphql-operations.ts diff --git a/client/search-ui/.eslintrc.js b/client/search-ui/.eslintrc.js deleted file mode 100644 index 23c93898412..00000000000 --- a/client/search-ui/.eslintrc.js +++ /dev/null @@ -1,12 +0,0 @@ -// @ts-check - -const baseConfig = require('../../.eslintrc.js') - -module.exports = { - extends: '../../.eslintrc.js', - parserOptions: { - ...baseConfig.parserOptions, - project: [__dirname + '/tsconfig.json'], - }, - overrides: baseConfig.overrides, -} diff --git a/client/search-ui/BUILD.bazel b/client/search-ui/BUILD.bazel deleted file mode 100644 index 2a3aab3c3ce..00000000000 --- a/client/search-ui/BUILD.bazel +++ /dev/null @@ -1,6 +0,0 @@ -load("//client/shared/dev:tools.bzl", "module_style_typings") - -module_style_typings( - name = "module_style_typings", - deps = ["//client/wildcard"], -) diff --git a/client/search-ui/README.md b/client/search-ui/README.md deleted file mode 100644 index 535de3c88d4..00000000000 --- a/client/search-ui/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Search UI package - -This package contains search UI components with branded styling that are shared between clients. For example, the `` component that is used in both the web application and VS Code extension. diff --git a/client/search-ui/babel.config.js b/client/search-ui/babel.config.js deleted file mode 100644 index 73a95d310cd..00000000000 --- a/client/search-ui/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-check - -module.exports = { - extends: '../../babel.config.js', -} diff --git a/client/search-ui/globals.d.ts b/client/search-ui/globals.d.ts deleted file mode 100644 index 86f714f28f3..00000000000 --- a/client/search-ui/globals.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module '*.scss' { - const cssModule: string - export default cssModule -} -declare module '*.css' { - const cssModule: string - export default cssModule -} diff --git a/client/search-ui/jest.config.js b/client/search-ui/jest.config.js deleted file mode 100644 index d5149c625e6..00000000000 --- a/client/search-ui/jest.config.js +++ /dev/null @@ -1,13 +0,0 @@ -// @ts-check - -const config = require('../../jest.config.base') - -const exportedConfig = { - ...config, - displayName: 'common', - rootDir: __dirname, - roots: [''], - verbose: true, -} - -module.exports = exportedConfig diff --git a/client/search-ui/package.json b/client/search-ui/package.json deleted file mode 100644 index 95d4f491721..00000000000 --- a/client/search-ui/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "private": true, - "name": "@sourcegraph/search-ui", - "version": "0.0.1", - "description": "Branded Sourcegraph search UI components", - "main": "./src/index.ts", - "sideEffects": false, - "license": "Apache-2.0", - "scripts": { - "storybook": "STORIES_GLOB='client/search-ui/src/**/*.story.tsx' yarn workspace @sourcegraph/storybook run start", - "lint:js": "yarn run -T eslint --cache 'src/**/*.[jt]s?(x)'", - "test": "yarn run -T jest" - } -} diff --git a/client/search-ui/tsconfig.json b/client/search-ui/tsconfig.json deleted file mode 100644 index c4e5fb3184e..00000000000 --- a/client/search-ui/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "module": "commonjs", - "sourceRoot": "src", - "rootDir": ".", - "outDir": "./out", - "baseUrl": "./src", - "jsx": "react-jsx", - }, - "include": ["./src/**/*", "./*.ts"], - "exclude": ["../../node_modules", "./node_modules", "./out"], - "references": [ - { "path": "../shared" }, - { "path": "../branded" }, - { "path": "../http-client" }, - { "path": "../common" }, - { "path": "../observability-client" }, - { "path": "../wildcard" }, - ], -} diff --git a/client/storybook/src/main.ts b/client/storybook/src/main.ts index 74fd9e770c3..7b1bb8e826e 100644 --- a/client/storybook/src/main.ts +++ b/client/storybook/src/main.ts @@ -42,7 +42,7 @@ const getStoriesGlob = (): string[] => { // Due to an issue with constant recompiling (https://github.com/storybookjs/storybook/issues/14342) // we need to make the globs more specific (`(web|shared..)` also doesn't work). Once the above issue // is fixed, this can be removed and watched for `client/**/*.story.tsx` again. - const directoriesWithStories = ['branded', 'browser', 'jetbrains/webview', 'shared', 'web', 'wildcard', 'search-ui'] + const directoriesWithStories = ['branded', 'browser', 'jetbrains/webview', 'shared', 'web', 'wildcard'] const storiesGlobs = directoriesWithStories.map(packageDirectory => path.resolve(ROOT_PATH, `client/${packageDirectory}/src/**/*.story.tsx`) ) diff --git a/client/vscode/src/webview/search-panel/SearchHomeView.tsx b/client/vscode/src/webview/search-panel/SearchHomeView.tsx index a984694db20..7de40c0cd96 100644 --- a/client/vscode/src/webview/search-panel/SearchHomeView.tsx +++ b/client/vscode/src/webview/search-panel/SearchHomeView.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames' import { Observable } from 'rxjs' import { useDeepCompareEffectNoCheck } from 'use-deep-compare-effect' -import { SearchBox } from '@sourcegraph/search-ui' +import { SearchBox } from '@sourcegraph/branded' import { wrapRemoteObservable } from '@sourcegraph/shared/src/api/client/api/common' import { getUserSearchContextNamespaces, QueryState, SearchMode } from '@sourcegraph/shared/src/search' import { collectMetrics } from '@sourcegraph/shared/src/search/query/metrics' diff --git a/client/vscode/src/webview/search-panel/SearchResultsView.tsx b/client/vscode/src/webview/search-panel/SearchResultsView.tsx index 698d98769d7..5c78136996b 100644 --- a/client/vscode/src/webview/search-panel/SearchResultsView.tsx +++ b/client/vscode/src/webview/search-panel/SearchResultsView.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames' import { Observable } from 'rxjs' import { useDeepCompareEffectNoCheck } from 'use-deep-compare-effect' -import { IEditor, SearchBox, StreamingProgress, StreamingSearchResultsList } from '@sourcegraph/search-ui' +import { IEditor, SearchBox, StreamingProgress, StreamingSearchResultsList } from '@sourcegraph/branded' import { wrapRemoteObservable } from '@sourcegraph/shared/src/api/client/api/common' import { FetchFileParameters, fetchHighlightedFileLineRanges } from '@sourcegraph/shared/src/backend/file' import { getUserSearchContextNamespaces, QueryState, SearchMode } from '@sourcegraph/shared/src/search' diff --git a/client/vscode/src/webview/search-panel/alias/CommitSearchResult.tsx b/client/vscode/src/webview/search-panel/alias/CommitSearchResult.tsx index 83d05738be4..3972f6c0a19 100644 --- a/client/vscode/src/webview/search-panel/alias/CommitSearchResult.tsx +++ b/client/vscode/src/webview/search-panel/alias/CommitSearchResult.tsx @@ -2,8 +2,8 @@ import React from 'react' import VisuallyHidden from '@reach/visually-hidden' +import { SearchResultStyles as styles, LegacyResultContainer, CommitSearchResultMatch } from '@sourcegraph/branded' import { Timestamp } from '@sourcegraph/branded/src/components/Timestamp' -import { SearchResultStyles as styles, LegacyResultContainer, CommitSearchResultMatch } from '@sourcegraph/search-ui' import { displayRepoName } from '@sourcegraph/shared/src/components/RepoLink' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { CommitMatch, getCommitMatchUrl } from '@sourcegraph/shared/src/search/stream' diff --git a/client/vscode/src/webview/search-panel/alias/FileMatchChildren.tsx b/client/vscode/src/webview/search-panel/alias/FileMatchChildren.tsx index c4b4b327556..ed51133d09d 100644 --- a/client/vscode/src/webview/search-panel/alias/FileMatchChildren.tsx +++ b/client/vscode/src/webview/search-panel/alias/FileMatchChildren.tsx @@ -5,6 +5,7 @@ import * as H from 'history' import { Observable } from 'rxjs' import { map } from 'rxjs/operators' +import { LastSyncedIcon, FileMatchChildrenStyles as styles, CodeExcerpt } from '@sourcegraph/branded' import { HoverMerged } from '@sourcegraph/client-api' import { Hoverifier } from '@sourcegraph/codeintellify' import { @@ -12,7 +13,6 @@ import { appendSubtreeQueryParameter, toPositionOrRangeQueryParameter, } from '@sourcegraph/common' -import { LastSyncedIcon, FileMatchChildrenStyles as styles, CodeExcerpt } from '@sourcegraph/search-ui' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { MatchGroup } from '@sourcegraph/shared/src/components/ranking/PerFileResultRanking' diff --git a/client/vscode/src/webview/search-panel/alias/RepoSearchResult.tsx b/client/vscode/src/webview/search-panel/alias/RepoSearchResult.tsx index 1ede35c86f0..a2d21522451 100644 --- a/client/vscode/src/webview/search-panel/alias/RepoSearchResult.tsx +++ b/client/vscode/src/webview/search-panel/alias/RepoSearchResult.tsx @@ -4,7 +4,7 @@ import { mdiSourceFork, mdiArchive, mdiLock } from '@mdi/js' import classNames from 'classnames' import SourceRepositoryIcon from 'mdi-react/SourceRepositoryIcon' -import { SearchResultStyles as styles, LastSyncedIcon, LegacyResultContainer } from '@sourcegraph/search-ui' +import { SearchResultStyles as styles, LastSyncedIcon, LegacyResultContainer } from '@sourcegraph/branded' import { displayRepoName } from '@sourcegraph/shared/src/components/RepoLink' import { getRepoMatchLabel, RepositoryMatch } from '@sourcegraph/shared/src/search/stream' import { Button, Icon } from '@sourcegraph/wildcard' diff --git a/client/vscode/src/webview/search-panel/alias/SymbolSearchResult.tsx b/client/vscode/src/webview/search-panel/alias/SymbolSearchResult.tsx index 3b0e63a7071..c51e9a5b23d 100644 --- a/client/vscode/src/webview/search-panel/alias/SymbolSearchResult.tsx +++ b/client/vscode/src/webview/search-panel/alias/SymbolSearchResult.tsx @@ -12,7 +12,7 @@ import { navigateToFileOnMiddleMouseButtonClick, ResultContainer, CopyPathAction, -} from '@sourcegraph/search-ui' +} from '@sourcegraph/branded' import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { getFileMatchUrl, getRepositoryUrl, getRevision, SymbolMatch } from '@sourcegraph/shared/src/search/stream' import { isSettingsValid, SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' diff --git a/client/vscode/src/webview/search-panel/components/HomeFooter.tsx b/client/vscode/src/webview/search-panel/components/HomeFooter.tsx index c5327def1ff..e4036baf15a 100644 --- a/client/vscode/src/webview/search-panel/components/HomeFooter.tsx +++ b/client/vscode/src/webview/search-panel/components/HomeFooter.tsx @@ -2,7 +2,7 @@ import React, { useCallback } from 'react' import classNames from 'classnames' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { QueryState } from '@sourcegraph/shared/src/search' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/vscode/src/webview/sidebars/history/components/RecentRepositoriesSection.tsx b/client/vscode/src/webview/sidebars/history/components/RecentRepositoriesSection.tsx index 83d12521f2c..330166d7786 100644 --- a/client/vscode/src/webview/sidebars/history/components/RecentRepositoriesSection.tsx +++ b/client/vscode/src/webview/sidebars/history/components/RecentRepositoriesSection.tsx @@ -3,7 +3,7 @@ import React, { useMemo, useState } from 'react' import { mdiChevronDown, mdiChevronLeft } from '@mdi/js' import classNames from 'classnames' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { EventLogResult, fetchRecentSearches } from '@sourcegraph/shared/src/search' import { scanSearchQuery } from '@sourcegraph/shared/src/search/query/scanner' import { isRepoFilter } from '@sourcegraph/shared/src/search/query/validate' diff --git a/client/vscode/src/webview/sidebars/history/components/RecentSearchesSection.tsx b/client/vscode/src/webview/sidebars/history/components/RecentSearchesSection.tsx index cd6cf71382d..0888f1d2f50 100644 --- a/client/vscode/src/webview/sidebars/history/components/RecentSearchesSection.tsx +++ b/client/vscode/src/webview/sidebars/history/components/RecentSearchesSection.tsx @@ -3,7 +3,7 @@ import React, { useMemo, useState } from 'react' import { mdiChevronDown, mdiChevronLeft } from '@mdi/js' import classNames from 'classnames' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { EventLogResult, fetchRecentSearches } from '@sourcegraph/shared/src/search' import { LATEST_VERSION } from '@sourcegraph/shared/src/search/stream' import { Icon, H5, useObservable, Button } from '@sourcegraph/wildcard' diff --git a/client/vscode/src/webview/sidebars/search/SearchSidebarView.tsx b/client/vscode/src/webview/sidebars/search/SearchSidebarView.tsx index a2cca583a18..35bdc21a170 100644 --- a/client/vscode/src/webview/sidebars/search/SearchSidebarView.tsx +++ b/client/vscode/src/webview/sidebars/search/SearchSidebarView.tsx @@ -15,7 +15,7 @@ import { getSearchSnippetLinks, SearchSidebar, SearchSidebarSection, -} from '@sourcegraph/search-ui' +} from '@sourcegraph/branded' import { wrapRemoteObservable } from '@sourcegraph/shared/src/api/client/api/common' import { InitialParametersSource, diff --git a/client/vscode/tsconfig.json b/client/vscode/tsconfig.json index e36683badb9..f2af49a4fe3 100644 --- a/client/vscode/tsconfig.json +++ b/client/vscode/tsconfig.json @@ -15,13 +15,7 @@ "strict": true, "jsx": "react-jsx", }, - "references": [ - { "path": "../shared" }, - { "path": "../common" }, - { "path": "../branded" }, - { "path": "../search-ui" }, - { "path": "../wildcard" }, - ], + "references": [{ "path": "../shared" }, { "path": "../common" }, { "path": "../branded" }, { "path": "../wildcard" }], "include": ["./package.json", "**/*", ".*", "**/*.d.ts", "./code-intel-extensions.json"], "exclude": ["node_modules", "../../node_modules", ".vscode-test", "out", "dist"], } diff --git a/client/web/src/codeintel/ReferencesPanel.tsx b/client/web/src/codeintel/ReferencesPanel.tsx index 51671492ead..f40b36cd211 100644 --- a/client/web/src/codeintel/ReferencesPanel.tsx +++ b/client/web/src/codeintel/ReferencesPanel.tsx @@ -8,6 +8,7 @@ import { MemoryRouter, useLocation } from 'react-router' import { Observable, of } from 'rxjs' import { map } from 'rxjs/operators' +import { CodeExcerpt, onClickCodeExcerptHref } from '@sourcegraph/branded' import { HoveredToken } from '@sourcegraph/codeintellify' import { addLineRangeQueryParameter, @@ -20,7 +21,6 @@ import { } from '@sourcegraph/common' import { Position } from '@sourcegraph/extension-api-classes' import { useQuery } from '@sourcegraph/http-client' -import { CodeExcerpt, onClickCodeExcerptHref } from '@sourcegraph/search-ui' import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { LanguageSpec } from '@sourcegraph/shared/src/codeintel/legacy-extensions/language-specs/language-spec' import { findLanguageSpec } from '@sourcegraph/shared/src/codeintel/legacy-extensions/language-specs/languages' diff --git a/client/web/src/communitySearchContexts/CommunitySearchContextPage.tsx b/client/web/src/communitySearchContexts/CommunitySearchContextPage.tsx index 9aaed351e22..09f99a64885 100644 --- a/client/web/src/communitySearchContexts/CommunitySearchContextPage.tsx +++ b/client/web/src/communitySearchContexts/CommunitySearchContextPage.tsx @@ -5,8 +5,8 @@ import classNames from 'classnames' import * as H from 'history' import { catchError, startWith } from 'rxjs/operators' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { asError, isErrorLike } from '@sourcegraph/common' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' import { displayRepoName } from '@sourcegraph/shared/src/components/RepoLink' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' diff --git a/client/web/src/components/fuzzyFinder/FuzzyRepos.tsx b/client/web/src/components/fuzzyFinder/FuzzyRepos.tsx index 223a94f0818..66d86c2790d 100644 --- a/client/web/src/components/fuzzyFinder/FuzzyRepos.tsx +++ b/client/web/src/components/fuzzyFinder/FuzzyRepos.tsx @@ -1,8 +1,8 @@ import { ApolloClient } from '@apollo/client' import gql from 'tagged-template-noop' +import { CodeHostIcon, formatRepositoryStarCount, SearchResultStar } from '@sourcegraph/branded' import { getDocumentNode } from '@sourcegraph/http-client' -import { CodeHostIcon, formatRepositoryStarCount, SearchResultStar } from '@sourcegraph/search-ui' import { getWebGraphQLClient } from '../../backend/graphql' import { SearchValue } from '../../fuzzyFinder/SearchValue' diff --git a/client/web/src/enterprise/code-monitoring/components/FormTriggerArea.tsx b/client/web/src/enterprise/code-monitoring/components/FormTriggerArea.tsx index 36190a7f74d..55ffe5c2cb0 100644 --- a/client/web/src/enterprise/code-monitoring/components/FormTriggerArea.tsx +++ b/client/web/src/enterprise/code-monitoring/components/FormTriggerArea.tsx @@ -4,7 +4,7 @@ import { mdiCheck, mdiRadioboxBlank, mdiHelpCircle, mdiOpenInNew } from '@mdi/js import { VisuallyHidden } from '@reach/visually-hidden' import classNames from 'classnames' -import { LazyQueryInput } from '@sourcegraph/search-ui' +import { LazyQueryInput } from '@sourcegraph/branded' import { QueryState } from '@sourcegraph/shared/src/search' import { FilterType, resolveFilter, validateFilter } from '@sourcegraph/shared/src/search/query/filters' import { scanSearchQuery } from '@sourcegraph/shared/src/search/query/scanner' diff --git a/client/web/src/enterprise/insights/components/form/monaco-field/MonacoField.tsx b/client/web/src/enterprise/insights/components/form/monaco-field/MonacoField.tsx index b51440e9dd0..49f858158ff 100644 --- a/client/web/src/enterprise/insights/components/form/monaco-field/MonacoField.tsx +++ b/client/web/src/enterprise/insights/components/form/monaco-field/MonacoField.tsx @@ -3,7 +3,7 @@ import { createContext, forwardRef, InputHTMLAttributes, useContext, useImperati import classNames from 'classnames' import { noop } from 'lodash' -import { LazyQueryInput } from '@sourcegraph/search-ui' +import { LazyQueryInput } from '@sourcegraph/branded' import { SearchPatternType } from '@sourcegraph/shared/src/graphql-operations' import { QueryChangeSource } from '@sourcegraph/shared/src/search' import { ForwardReferenceComponent } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/filter-collapse-section/FilterCollapseSection.tsx b/client/web/src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/filter-collapse-section/FilterCollapseSection.tsx index 3ddff8e361b..bdfd0858b67 100644 --- a/client/web/src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/filter-collapse-section/FilterCollapseSection.tsx +++ b/client/web/src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/filter-collapse-section/FilterCollapseSection.tsx @@ -3,7 +3,7 @@ import { FunctionComponent, HTMLAttributes, PropsWithChildren, ReactElement } fr import { mdiChevronDown, mdiChevronUp } from '@mdi/js' import classNames from 'classnames' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { Button, Collapse, CollapseHeader, CollapsePanel, Icon } from '@sourcegraph/wildcard' import { TruncatedText } from '../../../../../../trancated-text/TruncatedText' diff --git a/client/web/src/enterprise/insights/pages/landing/getting-started/components/code-insights-examples/code-insight-example-card/CodeInsightExampleCard.tsx b/client/web/src/enterprise/insights/pages/landing/getting-started/components/code-insights-examples/code-insight-example-card/CodeInsightExampleCard.tsx index 4a8378a9c5e..796437e444e 100644 --- a/client/web/src/enterprise/insights/pages/landing/getting-started/components/code-insights-examples/code-insight-example-card/CodeInsightExampleCard.tsx +++ b/client/web/src/enterprise/insights/pages/landing/getting-started/components/code-insights-examples/code-insight-example-card/CodeInsightExampleCard.tsx @@ -1,6 +1,6 @@ import { FunctionComponent, useContext } from 'react' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { Button, Link, LegendItem, LegendList, ParentSize, LegendItemPoint } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/insights/pages/landing/getting-started/components/code-insights-templates/CodeInsightsTemplates.tsx b/client/web/src/enterprise/insights/pages/landing/getting-started/components/code-insights-templates/CodeInsightsTemplates.tsx index 95b2f173c6d..a132bc51479 100644 --- a/client/web/src/enterprise/insights/pages/landing/getting-started/components/code-insights-templates/CodeInsightsTemplates.tsx +++ b/client/web/src/enterprise/insights/pages/landing/getting-started/components/code-insights-templates/CodeInsightsTemplates.tsx @@ -3,7 +3,7 @@ import React, { MouseEvent, useContext, useState } from 'react' import { mdiContentCopy } from '@mdi/js' import copy from 'copy-to-clipboard' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { Button, diff --git a/client/web/src/enterprise/searchContexts/SearchContextForm.tsx b/client/web/src/enterprise/searchContexts/SearchContextForm.tsx index 90ac11fd438..1abaa67aa58 100644 --- a/client/web/src/enterprise/searchContexts/SearchContextForm.tsx +++ b/client/web/src/enterprise/searchContexts/SearchContextForm.tsx @@ -5,8 +5,8 @@ import { RouteComponentProps, useHistory } from 'react-router' import { Observable, of, throwError } from 'rxjs' import { catchError, map, startWith, switchMap, tap } from 'rxjs/operators' +import { SyntaxHighlightedSearchQuery, LazyQueryInput } from '@sourcegraph/branded' import { asError, createAggregateError, isErrorLike } from '@sourcegraph/common' -import { SyntaxHighlightedSearchQuery, LazyQueryInput } from '@sourcegraph/search-ui' import { Scalars, SearchContextInput, diff --git a/client/web/src/enterprise/searchContexts/SearchContextPage.tsx b/client/web/src/enterprise/searchContexts/SearchContextPage.tsx index 7778a8a98a3..c0a8014ebe9 100644 --- a/client/web/src/enterprise/searchContexts/SearchContextPage.tsx +++ b/client/web/src/enterprise/searchContexts/SearchContextPage.tsx @@ -6,9 +6,9 @@ import { debounce } from 'lodash' import { RouteComponentProps } from 'react-router' import { catchError, startWith } from 'rxjs/operators' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { Timestamp } from '@sourcegraph/branded/src/components/Timestamp' import { asError, isErrorLike, renderMarkdown, pluralize } from '@sourcegraph/common' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' import { AuthenticatedUser } from '@sourcegraph/shared/src/auth' import { VirtualList } from '@sourcegraph/shared/src/components/VirtualList' import { SearchContextRepositoryRevisionsFields } from '@sourcegraph/shared/src/graphql-operations' diff --git a/client/web/src/notebooks/blocks/file/NotebookFileBlock.tsx b/client/web/src/notebooks/blocks/file/NotebookFileBlock.tsx index d7c08f70e86..c0c67b6f311 100644 --- a/client/web/src/notebooks/blocks/file/NotebookFileBlock.tsx +++ b/client/web/src/notebooks/blocks/file/NotebookFileBlock.tsx @@ -6,8 +6,8 @@ import { debounce } from 'lodash' import { of } from 'rxjs' import { startWith } from 'rxjs/operators' +import { CodeExcerpt } from '@sourcegraph/branded' import { isErrorLike } from '@sourcegraph/common' -import { CodeExcerpt } from '@sourcegraph/search-ui' import { getRepositoryUrl } from '@sourcegraph/shared/src/search/stream' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/notebooks/blocks/file/NotebookFileBlockInputs.tsx b/client/web/src/notebooks/blocks/file/NotebookFileBlockInputs.tsx index 36359af877e..e4979980a33 100644 --- a/client/web/src/notebooks/blocks/file/NotebookFileBlockInputs.tsx +++ b/client/web/src/notebooks/blocks/file/NotebookFileBlockInputs.tsx @@ -4,8 +4,8 @@ import { EditorView } from '@codemirror/view' import { mdiInformationOutline } from '@mdi/js' import { debounce } from 'lodash' +import { createDefaultSuggestions } from '@sourcegraph/branded' import { isMacPlatform as isMacPlatformFunc } from '@sourcegraph/common' -import { createDefaultSuggestions } from '@sourcegraph/search-ui' import { PathMatch } from '@sourcegraph/shared/src/search/stream' import { fetchStreamSuggestions } from '@sourcegraph/shared/src/search/suggestions' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/notebooks/blocks/markdown/NotebookMarkdownBlock.tsx b/client/web/src/notebooks/blocks/markdown/NotebookMarkdownBlock.tsx index d9fb6c5af94..bfdb922f650 100644 --- a/client/web/src/notebooks/blocks/markdown/NotebookMarkdownBlock.tsx +++ b/client/web/src/notebooks/blocks/markdown/NotebookMarkdownBlock.tsx @@ -9,7 +9,7 @@ import { classHighlighter, tags } from '@lezer/highlight' import { mdiPlayCircleOutline, mdiPencil } from '@mdi/js' import classNames from 'classnames' -import { changeListener } from '@sourcegraph/search-ui' +import { changeListener } from '@sourcegraph/branded' import { useCodeMirror, editorHeight } from '@sourcegraph/shared/src/components/CodeMirrorEditor' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { Icon, Markdown } from '@sourcegraph/wildcard' diff --git a/client/web/src/notebooks/blocks/query/NotebookQueryBlock.tsx b/client/web/src/notebooks/blocks/query/NotebookQueryBlock.tsx index 3d04d7e1eb7..cc49db976a7 100644 --- a/client/web/src/notebooks/blocks/query/NotebookQueryBlock.tsx +++ b/client/web/src/notebooks/blocks/query/NotebookQueryBlock.tsx @@ -10,7 +10,7 @@ import { CodeMirrorQueryInput, changeListener, createDefaultSuggestions, -} from '@sourcegraph/search-ui' +} from '@sourcegraph/branded' import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { editorHeight } from '@sourcegraph/shared/src/components/CodeMirrorEditor' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' diff --git a/client/web/src/notebooks/blocks/suggestions/SearchTypeSuggestionsInput.tsx b/client/web/src/notebooks/blocks/suggestions/SearchTypeSuggestionsInput.tsx index 0e40c54eacf..61f8c6472f5 100644 --- a/client/web/src/notebooks/blocks/suggestions/SearchTypeSuggestionsInput.tsx +++ b/client/web/src/notebooks/blocks/suggestions/SearchTypeSuggestionsInput.tsx @@ -5,8 +5,8 @@ import { EditorView } from '@codemirror/view' import { Observable, of } from 'rxjs' import { delay, startWith } from 'rxjs/operators' +import { CodeMirrorQueryInput, SyntaxHighlightedSearchQuery, singleLine, changeListener } from '@sourcegraph/branded' import { pluralize } from '@sourcegraph/common' -import { CodeMirrorQueryInput, SyntaxHighlightedSearchQuery, singleLine, changeListener } from '@sourcegraph/search-ui' import { createQueryExampleFromString, updateQueryWithFilterAndExample } from '@sourcegraph/shared/src/search' import { FilterType } from '@sourcegraph/shared/src/search/query/filters' import { PathMatch, SymbolMatch } from '@sourcegraph/shared/src/search/stream' diff --git a/client/web/src/notebooks/blocks/symbol/NotebookSymbolBlock.tsx b/client/web/src/notebooks/blocks/symbol/NotebookSymbolBlock.tsx index 15559a8b42b..4dc910e0308 100644 --- a/client/web/src/notebooks/blocks/symbol/NotebookSymbolBlock.tsx +++ b/client/web/src/notebooks/blocks/symbol/NotebookSymbolBlock.tsx @@ -6,8 +6,8 @@ import { debounce } from 'lodash' import { of } from 'rxjs' import { startWith } from 'rxjs/operators' +import { CodeExcerpt } from '@sourcegraph/branded' import { isErrorLike } from '@sourcegraph/common' -import { CodeExcerpt } from '@sourcegraph/search-ui' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { getRepositoryUrl } from '@sourcegraph/shared/src/search/stream' import { SymbolKind } from '@sourcegraph/shared/src/symbols/SymbolKind' diff --git a/client/web/src/notebooks/blocks/symbol/NotebookSymbolBlockInput.tsx b/client/web/src/notebooks/blocks/symbol/NotebookSymbolBlockInput.tsx index 6089434c886..76a352dec9b 100644 --- a/client/web/src/notebooks/blocks/symbol/NotebookSymbolBlockInput.tsx +++ b/client/web/src/notebooks/blocks/symbol/NotebookSymbolBlockInput.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useMemo } from 'react' import { EditorView } from '@codemirror/view' -import { createDefaultSuggestions, RepoFileLink } from '@sourcegraph/search-ui' +import { createDefaultSuggestions, RepoFileLink } from '@sourcegraph/branded' import { getFileMatchUrl, getRepositoryUrl, SymbolMatch } from '@sourcegraph/shared/src/search/stream' import { fetchStreamSuggestions } from '@sourcegraph/shared/src/search/suggestions' import { SymbolKind } from '@sourcegraph/shared/src/symbols/SymbolKind' diff --git a/client/web/src/notebooks/index.ts b/client/web/src/notebooks/index.ts index e436b9e3584..f28d7c330dc 100644 --- a/client/web/src/notebooks/index.ts +++ b/client/web/src/notebooks/index.ts @@ -1,6 +1,6 @@ import { Observable } from 'rxjs' -import { HighlightRange } from '@sourcegraph/search-ui' +import { HighlightRange } from '@sourcegraph/branded' import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { AggregateStreamingSearchResults } from '@sourcegraph/shared/src/search/stream' import { UIRangeSpec } from '@sourcegraph/shared/src/util/url' diff --git a/client/web/src/notebooks/notebook/NotebookComponent.tsx b/client/web/src/notebooks/notebook/NotebookComponent.tsx index 28937f11dc2..863442126b1 100644 --- a/client/web/src/notebooks/notebook/NotebookComponent.tsx +++ b/client/web/src/notebooks/notebook/NotebookComponent.tsx @@ -8,8 +8,8 @@ import { Redirect } from 'react-router-dom' import { Observable } from 'rxjs' import { catchError, delay, startWith, switchMap, tap } from 'rxjs/operators' +import { StreamingSearchResultsListProps } from '@sourcegraph/branded' import { asError, isErrorLike } from '@sourcegraph/common' -import { StreamingSearchResultsListProps } from '@sourcegraph/search-ui' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/notebooks/notebookPage/NotebookContent.tsx b/client/web/src/notebooks/notebookPage/NotebookContent.tsx index 6324d8ae0af..24ed49de274 100644 --- a/client/web/src/notebooks/notebookPage/NotebookContent.tsx +++ b/client/web/src/notebooks/notebookPage/NotebookContent.tsx @@ -3,7 +3,7 @@ import React, { useMemo } from 'react' import { noop } from 'lodash' import { Observable } from 'rxjs' -import { StreamingSearchResultsListProps } from '@sourcegraph/search-ui' +import { StreamingSearchResultsListProps } from '@sourcegraph/branded' import { AuthenticatedUser } from '@sourcegraph/shared/src/auth' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' diff --git a/client/web/src/notebooks/notebookPage/NotebookPage.tsx b/client/web/src/notebooks/notebookPage/NotebookPage.tsx index a3b8c5db13f..3643c2fb11e 100644 --- a/client/web/src/notebooks/notebookPage/NotebookPage.tsx +++ b/client/web/src/notebooks/notebookPage/NotebookPage.tsx @@ -7,9 +7,9 @@ import { useStickyBox } from 'react-sticky-box' import { Observable } from 'rxjs' import { catchError, delay, startWith, switchMap } from 'rxjs/operators' +import { StreamingSearchResultsListProps } from '@sourcegraph/branded' import { Timestamp } from '@sourcegraph/branded/src/components/Timestamp' import { asError, isErrorLike } from '@sourcegraph/common' -import { StreamingSearchResultsListProps } from '@sourcegraph/search-ui' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { useTemporarySetting } from '@sourcegraph/shared/src/settings/temporary/useTemporarySetting' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' diff --git a/client/web/src/repo/RepoContainer.tsx b/client/web/src/repo/RepoContainer.tsx index b7fcbfd5ca5..a0c83fb4e88 100644 --- a/client/web/src/repo/RepoContainer.tsx +++ b/client/web/src/repo/RepoContainer.tsx @@ -9,8 +9,8 @@ import { matchPath, Route, RouteComponentProps, Switch } from 'react-router' import { NEVER, of } from 'rxjs' import { catchError, switchMap } from 'rxjs/operators' +import { StreamingSearchResultsListProps } from '@sourcegraph/branded' import { asError, encodeURIPathComponent, ErrorLike, isErrorLike, logger, repeatUntil } from '@sourcegraph/common' -import { StreamingSearchResultsListProps } from '@sourcegraph/search-ui' import { isCloneInProgressErrorLike, isRepoSeeOtherErrorLike } from '@sourcegraph/shared/src/backend/errors' import { displayRepoName } from '@sourcegraph/shared/src/components/RepoLink' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' diff --git a/client/web/src/repo/RepoHeader.story.tsx b/client/web/src/repo/RepoHeader.story.tsx index 4ccca94cab1..8fc0e973df9 100644 --- a/client/web/src/repo/RepoHeader.story.tsx +++ b/client/web/src/repo/RepoHeader.story.tsx @@ -2,7 +2,7 @@ import { mdiSourceRepository } from '@mdi/js' import { DecoratorFn, Meta, Story } from '@storybook/react' import * as H from 'history' -import { CopyPathAction } from '@sourcegraph/search-ui' +import { CopyPathAction } from '@sourcegraph/branded' import { EMPTY_SETTINGS_CASCADE } from '@sourcegraph/shared/src/settings/settings' import { NOOP_TELEMETRY_SERVICE } from '@sourcegraph/shared/src/telemetry/telemetryService' import { Button, H1, H2, Icon, Link } from '@sourcegraph/wildcard' diff --git a/client/web/src/repo/RepoRevisionContainer.tsx b/client/web/src/repo/RepoRevisionContainer.tsx index caa71e8d945..52510ff9ae9 100644 --- a/client/web/src/repo/RepoRevisionContainer.tsx +++ b/client/web/src/repo/RepoRevisionContainer.tsx @@ -3,8 +3,8 @@ import React, { useCallback, useMemo, useState } from 'react' import * as H from 'history' import { Route, RouteComponentProps, Switch } from 'react-router' +import { StreamingSearchResultsListProps, CopyPathAction } from '@sourcegraph/branded' import { isErrorLike } from '@sourcegraph/common' -import { StreamingSearchResultsListProps, CopyPathAction } from '@sourcegraph/search-ui' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { SearchContextProps } from '@sourcegraph/shared/src/search' diff --git a/client/web/src/repo/blob/BlobPage.tsx b/client/web/src/repo/blob/BlobPage.tsx index c6ab24514a5..91b56043f34 100644 --- a/client/web/src/repo/blob/BlobPage.tsx +++ b/client/web/src/repo/blob/BlobPage.tsx @@ -10,6 +10,7 @@ import { Observable, of } from 'rxjs' import { catchError, map, mapTo, startWith, switchMap } from 'rxjs/operators' import { Optional } from 'utility-types' +import { StreamingSearchResultsListProps } from '@sourcegraph/branded' import { ErrorLike, isErrorLike, asError } from '@sourcegraph/common' import { useCurrentSpan, @@ -17,7 +18,6 @@ import { createActiveSpan, reactManualTracer, } from '@sourcegraph/observability-client' -import { StreamingSearchResultsListProps } from '@sourcegraph/search-ui' import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { HighlightResponseFormat } from '@sourcegraph/shared/src/graphql-operations' diff --git a/client/web/src/repo/blob/codemirror/search.tsx b/client/web/src/repo/blob/codemirror/search.tsx index cfe5bc15654..2e9346efbf7 100644 --- a/client/web/src/repo/blob/codemirror/search.tsx +++ b/client/web/src/repo/blob/codemirror/search.tsx @@ -21,8 +21,8 @@ import { createRoot, Root } from 'react-dom/client' import { Subject, Subscription } from 'rxjs' import { debounceTime, distinctUntilChanged, startWith } from 'rxjs/operators' +import { QueryInputToggle } from '@sourcegraph/branded' import { Toggle } from '@sourcegraph/branded/src/components/Toggle' -import { QueryInputToggle } from '@sourcegraph/search-ui' import { createUpdateableField } from '@sourcegraph/shared/src/components/CodeMirrorEditor' import { shortcutDisplayName } from '@sourcegraph/shared/src/keyboardShortcuts' import { Button, Icon, Input, Label, Text, Tooltip } from '@sourcegraph/wildcard' diff --git a/client/web/src/savedSearches/SavedSearchForm.tsx b/client/web/src/savedSearches/SavedSearchForm.tsx index e52a10beb25..b67deb6c9ae 100644 --- a/client/web/src/savedSearches/SavedSearchForm.tsx +++ b/client/web/src/savedSearches/SavedSearchForm.tsx @@ -3,7 +3,7 @@ import React, { useEffect, useMemo, useState } from 'react' import classNames from 'classnames' import { Omit } from 'utility-types' -import { LazyQueryInput } from '@sourcegraph/search-ui' +import { LazyQueryInput } from '@sourcegraph/branded' import { QueryState } from '@sourcegraph/shared/src/search' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { diff --git a/client/web/src/search/Notepad.tsx b/client/web/src/search/Notepad.tsx index 62d92e0c06c..56d06ea4866 100644 --- a/client/web/src/search/Notepad.tsx +++ b/client/web/src/search/Notepad.tsx @@ -22,8 +22,8 @@ import { import classNames from 'classnames' import type { LocationDescriptorObject } from 'history' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { isMacPlatform } from '@sourcegraph/common' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' import { HighlightLineRange, SearchPatternType } from '@sourcegraph/shared/src/graphql-operations' import { FilterType } from '@sourcegraph/shared/src/search/query/filters' import { appendContextFilter, updateFilter } from '@sourcegraph/shared/src/search/query/transformer' diff --git a/client/web/src/search/SearchConsolePage.tsx b/client/web/src/search/SearchConsolePage.tsx index 12a4c10dc5b..a62eb14e83b 100644 --- a/client/web/src/search/SearchConsolePage.tsx +++ b/client/web/src/search/SearchConsolePage.tsx @@ -13,7 +13,7 @@ import { CodeMirrorQueryInput, createDefaultSuggestions, changeListener, -} from '@sourcegraph/search-ui' +} from '@sourcegraph/branded' import { transformSearchQuery } from '@sourcegraph/shared/src/api/client/search' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { LATEST_VERSION } from '@sourcegraph/shared/src/search/stream' diff --git a/client/web/src/search/home/QueryExamplesHomepage.tsx b/client/web/src/search/home/QueryExamplesHomepage.tsx index e7496accfc1..b4b3325e7a5 100644 --- a/client/web/src/search/home/QueryExamplesHomepage.tsx +++ b/client/web/src/search/home/QueryExamplesHomepage.tsx @@ -4,7 +4,7 @@ import { mdiOpenInNew } from '@mdi/js' import classNames from 'classnames' import { useHistory } from 'react-router' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { AuthenticatedUser } from '@sourcegraph/shared/src/auth' import { EditorHint, QueryState } from '@sourcegraph/shared/src/search' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' diff --git a/client/web/src/search/home/SearchPageInput.tsx b/client/web/src/search/home/SearchPageInput.tsx index ee02483ac05..f9175d75b66 100644 --- a/client/web/src/search/home/SearchPageInput.tsx +++ b/client/web/src/search/home/SearchPageInput.tsx @@ -4,11 +4,11 @@ import * as H from 'history' import { NavbarQueryState } from 'src/stores/navbarSearchQueryState' import shallow from 'zustand/shallow' -import { TraceSpanProvider } from '@sourcegraph/observability-client' -import { SearchBox } from '@sourcegraph/search-ui' +import { SearchBox } from '@sourcegraph/branded' // The experimental search input should be shown on the search home page -// eslint-disable-next-line no-restricted-imports -import { LazyCodeMirrorQueryInput } from '@sourcegraph/search-ui/src/experimental' +// eslint-disable-next-line no-restricted-imports +import { LazyCodeMirrorQueryInput } from '@sourcegraph/branded/src/search-ui/experimental' +import { TraceSpanProvider } from '@sourcegraph/observability-client' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { Settings } from '@sourcegraph/shared/src/schema/settings.schema' import { diff --git a/client/web/src/search/input/SearchNavbarItem.tsx b/client/web/src/search/input/SearchNavbarItem.tsx index 5335791b95c..3b127e87305 100644 --- a/client/web/src/search/input/SearchNavbarItem.tsx +++ b/client/web/src/search/input/SearchNavbarItem.tsx @@ -3,7 +3,7 @@ import React, { useCallback } from 'react' import * as H from 'history' import shallow from 'zustand/shallow' -import { SearchBox } from '@sourcegraph/search-ui' +import { SearchBox } from '@sourcegraph/branded' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { SearchContextInputProps, SubmitSearchParameters } from '@sourcegraph/shared/src/search' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' diff --git a/client/web/src/search/input/suggestions.ts b/client/web/src/search/input/suggestions.ts index 6412ee90e7a..e3cfa2a88fb 100644 --- a/client/web/src/search/input/suggestions.ts +++ b/client/web/src/search/input/suggestions.ts @@ -5,10 +5,9 @@ import { mdiFilterOutline, mdiTextSearchVariant, mdiSourceRepository } from '@md import { extendedMatch, Fzf, FzfOptions, FzfResultItem } from 'fzf' import { SuggestionsRepoResult, SuggestionsRepoVariables } from 'src/graphql-operations' -import { getDocumentNode, gql } from '@sourcegraph/http-client' -import { tokenAt, tokens as queryTokens } from '@sourcegraph/search-ui' +import { tokenAt, tokens as queryTokens } from '@sourcegraph/branded' // This module implements suggestions for the experimental search input -// eslint-disable-next-line no-restricted-imports +// eslint-disable-next-line no-restricted-imports import { Group, Option, @@ -18,7 +17,8 @@ import { FilterOption, QueryOption, getEditorConfig, -} from '@sourcegraph/search-ui/src/experimental' +} from '@sourcegraph/branded/src/search-ui/experimental' +import { getDocumentNode, gql } from '@sourcegraph/http-client' import { regexInsertText } from '@sourcegraph/shared/src/search/query/completion-utils' import { FILTERS, FilterType, resolveFilter } from '@sourcegraph/shared/src/search/query/filters' import { Filter, Token } from '@sourcegraph/shared/src/search/query/token' diff --git a/client/web/src/search/results/StreamingSearchResults.tsx b/client/web/src/search/results/StreamingSearchResults.tsx index 9683579d8ed..5751f7fc6f0 100644 --- a/client/web/src/search/results/StreamingSearchResults.tsx +++ b/client/web/src/search/results/StreamingSearchResults.tsx @@ -5,8 +5,8 @@ import * as H from 'history' import { useHistory } from 'react-router' import { Observable } from 'rxjs' +import { limitHit, StreamingProgress, StreamingSearchResultsList } from '@sourcegraph/branded' import { asError } from '@sourcegraph/common' -import { limitHit, StreamingProgress, StreamingSearchResultsList } from '@sourcegraph/search-ui' import { FetchFileParameters } from '@sourcegraph/shared/src/backend/file' import { FilePrefetcher } from '@sourcegraph/shared/src/components/PrefetchableFile' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' diff --git a/client/web/src/search/results/sidebar/Revisions.mocks.ts b/client/web/src/search/results/sidebar/Revisions.mocks.ts index c253fed8abb..5a2c7d41874 100644 --- a/client/web/src/search/results/sidebar/Revisions.mocks.ts +++ b/client/web/src/search/results/sidebar/Revisions.mocks.ts @@ -1,8 +1,8 @@ import { MockedResponse } from '@apollo/client/testing' import { GraphQLError } from 'graphql' +import { RevisionsProps } from '@sourcegraph/branded' import { getDocumentNode } from '@sourcegraph/http-client' -import { RevisionsProps } from '@sourcegraph/search-ui' import { GitRefType } from '../../../../../shared/src/graphql-operations' import { diff --git a/client/web/src/search/results/sidebar/Revisions.story.tsx b/client/web/src/search/results/sidebar/Revisions.story.tsx index f967a5ee446..12eb52133cf 100644 --- a/client/web/src/search/results/sidebar/Revisions.story.tsx +++ b/client/web/src/search/results/sidebar/Revisions.story.tsx @@ -1,9 +1,9 @@ import { MockedProviderProps } from '@apollo/client/testing' import { Meta } from '@storybook/react' -import { RevisionsProps, TabIndex } from '@sourcegraph/search-ui' +import { RevisionsProps, TabIndex } from '@sourcegraph/branded' +import sidebarStyles from '@sourcegraph/branded/src/search-ui/results/sidebar/SearchSidebar.module.scss' // eslint-disable-next-line no-restricted-imports -import sidebarStyles from '@sourcegraph/search-ui/src/results/sidebar/SearchSidebar.module.scss' import { MockedTestProvider } from '@sourcegraph/shared/src/testing/apollo' import { H2 } from '@sourcegraph/wildcard' diff --git a/client/web/src/search/results/sidebar/Revisions.test.tsx b/client/web/src/search/results/sidebar/Revisions.test.tsx index 7710d209dc3..525b1414a48 100644 --- a/client/web/src/search/results/sidebar/Revisions.test.tsx +++ b/client/web/src/search/results/sidebar/Revisions.test.tsx @@ -1,6 +1,6 @@ import { cleanup, within, fireEvent } from '@testing-library/react' -import { RevisionsProps } from '@sourcegraph/search-ui' +import { RevisionsProps } from '@sourcegraph/branded' import { MockedTestProvider, waitForNextApolloResponse } from '@sourcegraph/shared/src/testing/apollo' import { RenderWithBrandedContextResult, renderWithBrandedContext } from '@sourcegraph/wildcard/src/testing' diff --git a/client/web/src/search/results/sidebar/Revisions.tsx b/client/web/src/search/results/sidebar/Revisions.tsx index 30bfe574d92..4b5b1c40471 100644 --- a/client/web/src/search/results/sidebar/Revisions.tsx +++ b/client/web/src/search/results/sidebar/Revisions.tsx @@ -2,10 +2,9 @@ import React from 'react' import classNames from 'classnames' +import { FilterLink, RevisionsProps, TabIndex } from '@sourcegraph/branded' +import styles from '@sourcegraph/branded/src/search-ui/results/sidebar/SearchFilterSection.module.scss' import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' -import { FilterLink, RevisionsProps, TabIndex } from '@sourcegraph/search-ui' -// eslint-disable-next-line no-restricted-imports -import styles from '@sourcegraph/search-ui/src/results/sidebar/SearchFilterSection.module.scss' import { FilterType } from '@sourcegraph/shared/src/search/query/filters' import { useTemporarySetting } from '@sourcegraph/shared/src/settings/temporary/useTemporarySetting' import { Button, LoadingSpinner, Tab, TabList, TabPanel, TabPanels, Tabs, Text } from '@sourcegraph/wildcard' diff --git a/client/web/src/search/results/sidebar/SearchFiltersSidebar.tsx b/client/web/src/search/results/sidebar/SearchFiltersSidebar.tsx index f770727abb4..8c8c7f83bbd 100644 --- a/client/web/src/search/results/sidebar/SearchFiltersSidebar.tsx +++ b/client/web/src/search/results/sidebar/SearchFiltersSidebar.tsx @@ -12,7 +12,7 @@ import { getSearchTypeLinks, getFiltersOfKind, useLastRepoName, -} from '@sourcegraph/search-ui' +} from '@sourcegraph/branded' import { QueryStateUpdate, QueryUpdate } from '@sourcegraph/shared/src/search' import { FilterType } from '@sourcegraph/shared/src/search/query/filters' import { Filter } from '@sourcegraph/shared/src/search/stream' diff --git a/client/web/src/search/suggestion/DidYouMean.tsx b/client/web/src/search/suggestion/DidYouMean.tsx index 75e0de4b57f..8d5bd84b5e7 100644 --- a/client/web/src/search/suggestion/DidYouMean.tsx +++ b/client/web/src/search/suggestion/DidYouMean.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useMemo } from 'react' import { mdiArrowRight } from '@mdi/js' -import { SyntaxHighlightedSearchQuery } from '@sourcegraph/search-ui' +import { SyntaxHighlightedSearchQuery } from '@sourcegraph/branded' import { SearchPatternType } from '@sourcegraph/shared/src/graphql-operations' import { CaseSensitivityProps, SearchPatternTypeProps, SearchContextProps } from '@sourcegraph/shared/src/search' import { ALL_LANGUAGES } from '@sourcegraph/shared/src/search/query/languageFilter' diff --git a/client/web/src/search/suggestion/SmartSearch.tsx b/client/web/src/search/suggestion/SmartSearch.tsx index 4fbbe4d6c39..81030e9b391 100644 --- a/client/web/src/search/suggestion/SmartSearch.tsx +++ b/client/web/src/search/suggestion/SmartSearch.tsx @@ -2,8 +2,8 @@ import { MouseEvent, useCallback } from 'react' import { mdiArrowRight, mdiChevronDown, mdiChevronUp } from '@mdi/js' +import { SyntaxHighlightedSearchQuery, smartSearchIconSvgPath } from '@sourcegraph/branded' import { formatSearchParameters, pluralize } from '@sourcegraph/common' -import { SyntaxHighlightedSearchQuery, smartSearchIconSvgPath } from '@sourcegraph/search-ui' import { AggregateStreamingSearchResults, AlertKind } from '@sourcegraph/shared/src/search/stream' import { useTemporarySetting } from '@sourcegraph/shared/src/settings/temporary/useTemporarySetting' import { diff --git a/client/web/src/tour/components/Tour/TourTask.tsx b/client/web/src/tour/components/Tour/TourTask.tsx index b2b5b92b0f0..7217c1e226b 100644 --- a/client/web/src/tour/components/Tour/TourTask.tsx +++ b/client/web/src/tour/components/Tour/TourTask.tsx @@ -5,8 +5,8 @@ import classNames from 'classnames' import { CircularProgressbar } from 'react-circular-progressbar' import { useHistory } from 'react-router-dom' +import { ModalVideo } from '@sourcegraph/branded' import { isExternalLink } from '@sourcegraph/common' -import { ModalVideo } from '@sourcegraph/search-ui' import { TourLanguage, TourTaskStepType, TourTaskType } from '@sourcegraph/shared/src/settings/temporary' import { Button, Icon, Link, Text } from '@sourcegraph/wildcard' diff --git a/client/web/tsconfig.json b/client/web/tsconfig.json index 212ff6af99a..a28d53c21fe 100644 --- a/client/web/tsconfig.json +++ b/client/web/tsconfig.json @@ -18,7 +18,6 @@ { "path": "../http-client" }, { "path": "../codeintellify" }, { "path": "../common" }, - { "path": "../search-ui" }, { "path": "../client-api" }, { "path": "../observability-client" }, { "path": "../wildcard" }, diff --git a/dev/foreach-ts-project.sh b/dev/foreach-ts-project.sh index 5d2f21bf7b5..0d7ed0efe7b 100755 --- a/dev/foreach-ts-project.sh +++ b/dev/foreach-ts-project.sh @@ -24,7 +24,6 @@ DIRS=( client/jetbrains client/observability-client client/observability-server - client/search-ui client/shared client/storybook client/template-parser diff --git a/package.json b/package.json index a6674b1c320..57fd2e7bf31 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "storybook:jetbrains": "yarn workspace @sourcegraph/jetbrains run storybook", "storybook:shared": "yarn workspace @sourcegraph/shared run storybook", "storybook:web": "yarn workspace @sourcegraph/web run storybook", - "storybook:search-ui": "yarn workspace @sourcegraph/search-ui run storybook", "storybook:wildcard": "yarn workspace @sourcegraph/wildcard run storybook", "storybook:build": "yarn workspace @sourcegraph/storybook run build", "cover-storybook": "nyc --hook-require=false --silent yarn jest client/storybook/src/coverage", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 63560d00760..193eddfe5d4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -829,9 +829,6 @@ importers: client/observability-server: specifiers: {} - client/search-ui: - specifiers: {} - client/shared: specifiers: {} diff --git a/tsconfig.all.json b/tsconfig.all.json index a70fe70b039..d59760d31f7 100644 --- a/tsconfig.all.json +++ b/tsconfig.all.json @@ -18,7 +18,6 @@ { "path": "client/extension-api" }, { "path": "client/extension-api-types" }, { "path": "client/storybook" }, - { "path": "client/search-ui" }, { "path": "client/testing" }, { "path": "dev/release" }, { "path": "schema" }, diff --git a/yarn.lock b/yarn.lock index 7847cf28260..e0e1491d275 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5466,12 +5466,6 @@ __metadata: languageName: node linkType: hard -"@sourcegraph/search-ui@workspace:client/search-ui": - version: 0.0.0-use.local - resolution: "@sourcegraph/search-ui@workspace:client/search-ui" - languageName: unknown - linkType: soft - "@sourcegraph/shared@workspace:client/shared": version: 0.0.0-use.local resolution: "@sourcegraph/shared@workspace:client/shared"