sourcegraph/client/shared
Quinn Slack 7ba706e65d
various improvements to saved searches (#63539)
- Remove long-deprecated and long-ineffective notifications for saved
searches (removed in
de8ae5ee28
2.5 years ago). Note that code monitors were the replacement for saved
searches and work great.
- Clean up UI.
- Make the UI global instead of in the user/org area.
- Convert React class components to function components.
- Add default `patterntype:` because it's required.
- Use `useQuery` and `useMutation` instead of `requestGraphQL`.
- Use a single namespace `owner` GraphQL arg instead of separating out
`userID` and `orgID`.
- Clean up GraphQL resolver code and factor out common auth checking.
- Support transferring ownership of saved searches among owners (the
user's own user account and the orgs they're a member of).

(I know this is not in Svelte.)

SECURITY: There is one substantive change. Site admins may now view any
user's and any org's saved searches. This is so that they can audit and
delete them if needed.


![image](https://github.com/sourcegraph/sourcegraph/assets/1976/7ba22c1c-b92e-4089-836b-135a503c96a0)

![image](https://github.com/sourcegraph/sourcegraph/assets/1976/a1f2f43d-f681-4ec9-b2a1-8273707b34ee)

![image](https://github.com/sourcegraph/sourcegraph/assets/1976/5ee1164f-ed2e-4144-9aca-db61fa7c20f4)

![image](https://github.com/sourcegraph/sourcegraph/assets/1976/d631529e-6c0d-49c6-9be1-33a7ff53ed97)


## Test plan

Try creating, updating, and deleting saved searches, and transferring
ownership of them.

## Changelog

- Improved the saved searches feature, which lets you save search
queries to easily reuse them later and share them with other people in
an organization.
- Added the ability to transfer ownership of a saved search to a user's
organizations or from an organization to a user's account.
- Removed a long-deprecated and ineffective settings
`search.savedQueries` field. You can manage saved searches in a user's
or organization's profile area (e.g., at `/user/searches`).
2024-07-15 20:12:34 +00:00
..
dev chore(ci): remove Percy visual tests (#63515) 2024-06-27 16:20:06 +02:00
src various improvements to saved searches (#63539) 2024-07-15 20:12:34 +00:00
.bazelignore bazel: remove schema.ts entries (#48976) 2023-03-08 20:25:29 -08:00
.eslintignore bazel: remove schema.ts entries (#48976) 2023-03-08 20:25:29 -08:00
.stylelintrc.json web: integrate @sourcegraph/stylelint-plugin-sourcegraph and ban bootstrap imports (#34956) 2022-05-05 04:27:26 +00:00
BUILD.bazel chore(svelte): Cleanup dependencies (#63691) 2024-07-08 17:54:44 +02:00
NOTICE Move all client code into client/ folder (#14480) 2020-10-07 22:23:53 +02:00
package.json feat/dotcom: use Enterprise Portal for Cody Gateway usage (#63653) 2024-07-10 19:22:08 +00:00
README.md web: drop bootstrap depenedency (#41401) 2022-09-07 03:11:26 -07:00
tsconfig.json reapply "switch from jest to vitest for faster, simpler tests (#57886)" (#58145) 2023-11-07 12:00:18 +02:00
vitest.config.ts reapply "switch from jest to vitest for faster, simpler tests (#57886)" (#58145) 2023-11-07 12:00:18 +02:00

Shared

This folder contains common TypeScript/React/SCSS client code shared between the browser extension and the web app.

Everything in this folder is code-host agnostic and cannot make assumptions about whether it is running inside the Sourcegraph web app, in the browser extension on GitHub, Gitlab, Phabricator, Bitbucket Server, etc. In particular, components cannot make use of global CSS classes but must accept CSS classes as props and/or have their own code host agnostic SCSS stylesheets. For more details, see Styling UI in the handbook.

Code that is only used in branded contexts (web app, options menu of the browser extension, ...) should go into ../branded instead.