mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:31:43 +00:00
Code AI platform with Code Search & Cody
Closes srch-730 This is an initial attempt to improve the web app for small screens. This commit makes the following changes for small screens: - Search home page: - No more search input overflow - History button is rendered on same line as other action buttons (saves some vertical space) - Search results page: - Search input is rendered in the page, not in the header (more space) - Filters sidebar is hidden by default and can be shown via a `Filters` button. - The filters sidebar opens fullscreen and has a close button - The progrss button is smaller due to showing less information - Repository pages: - File sidebar is hidden by default. It can be shown via a new button that is visible in the file headers - The file sidebar opens fullscreen and has a close button - NOTE: Selecting a file currently does not close the file sidebar, navigation happens in the background - Cody sidebar opens fullscreen and has the same close button - General: - Fuzzy finder opens fullscreen and has a larger close button - Tabs don't show keyboard shortcuts I tried to stick to CSS as much as possible but for some things to work I had to change component structures or rendered elements conditionally. Specifically when a component was already using `$isViewportMobile` I usually just rendered elements conditionally. I extended the `Panel` component to have a special 'mobile' mode, since I realized I was doing similar changes to the filters, file tree and cody sidebar. The cody sidebar is a bit of a special case though because it's not even rendered by default. So there are some additional steps required to sync the open state. Screenshots (iPhone SE, which is one of the smaller phones I guess) | Situation | Before | After | |--------|--------|--------| | Search home |  |  | | Search results |  |  | | Filters |  |  | | Repo |  |  | | File sidebar |  |  | | Cody sidebar |  |  | | Repo search |  |  | | Fuzzy finder |  |  | | Rev picker |  |  | Me rambling about the changes: https://github.com/user-attachments/assets/670f7764-0ef2-4f1b-bc33-89a86d4b2274 Note that the commits and commit pages already seem to look fine. The branches, tags and contributors pages are a bit broken due to use of tables and fixed columns. I can look at those separately. ## Test plan Manual testing |
||
|---|---|---|
| .apko | ||
| .aspect | ||
| .buildkite | ||
| .github | ||
| .vscode | ||
| client | ||
| cmd | ||
| dev | ||
| doc | ||
| docker-images | ||
| internal | ||
| lib | ||
| migrations | ||
| monitoring | ||
| schema | ||
| testing | ||
| third_party | ||
| third-party-licenses | ||
| tools | ||
| ui/assets | ||
| wolfi-images | ||
| wolfi-packages | ||
| .bazel_fix_commands.json | ||
| .bazelignore | ||
| .bazeliskrc | ||
| .bazelrc | ||
| .bazelversion | ||
| .dockerignore | ||
| .editorconfig | ||
| .eslintrc.js | ||
| .gitattributes | ||
| .gitignore | ||
| .graphqlrc.yml | ||
| .hadolint.yaml | ||
| .mailmap | ||
| .mocharc.js | ||
| .npmrc | ||
| .pre-commit-config.yaml | ||
| .prettierignore | ||
| .stylelintignore | ||
| .stylelintrc.json | ||
| .swcrc | ||
| .tool-versions | ||
| .trivyignore | ||
| BUILD.bazel | ||
| CHANGELOG.md | ||
| CODENOTIFY | ||
| CONTRIBUTING.md | ||
| deps.bzl | ||
| doc.go | ||
| eslint-relative-formatter.js | ||
| flake.lock | ||
| flake.nix | ||
| gen.go | ||
| go.mod | ||
| go.sum | ||
| graphql-schema-linter.config.js | ||
| LICENSE | ||
| LICENSE.enterprise | ||
| linter_deps.bzl | ||
| mockgen.temp.yaml | ||
| mockgen.test.yaml | ||
| mockgen.yaml | ||
| nogo_config.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| postcss.config.js | ||
| prettier.config.js | ||
| README.md | ||
| release.yaml | ||
| renovate.json | ||
| SECURITY.md | ||
| service-catalog.yaml | ||
| sg.config.yaml | ||
| shell.nix | ||
| stamp_tags.bzl | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
| vitest.shared.ts | ||
| vitest.workspace.ts | ||
| WORKSPACE | ||
Docs •
Contributing •
Twitter •
Discord
Sourcegraph makes it easy to read, write, and fix code—even in big, complex codebases.
- Code search: Search all of your repositories across all branches and all code hosts.
- Code intelligence: Navigate code, find references, see code owners, trace history, and more.
- Fix and refactor: Roll out large-scale changes to many repositories at once and track big migrations.
Getting started
Development
Refer to the Developing Sourcegraph guide to get started.
Documentation
The doc directory has additional documentation for developing and understanding Sourcegraph:
- Architecture: high-level architecture
- Database setup: database best practices
- Go style guide
- Documentation style guide
- GraphQL API: useful tips when modifying the GraphQL API
- Contributing
License
This repository contains primarily non-OSS-licensed files. See LICENSE.
Copyright (c) 2018-present Sourcegraph Inc.