mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 09:11:56 +00:00
## UI Updates for Perforce Depots and Git Repos Fixes SRCH-530 **NOTE: This PR is a refactor of an earlier [PR](https://github.com/sourcegraph/sourcegraph/pull/64014) that was reverted. For that reason, the PR description is largely the same.** This PR introduces changes to the UI to differentiate between Perforce Depots and Git repositories. Below are the key changes included in this commit: ### 1. Dynamic Top-Level Navigation **For Perforce Depots:**  **For Git Repos:**  ### 2. Tabs on Revision Picker **For Perforce Depots:** Since we only need one tab for changelists, no tabs are shown.  **For Git Repos:** We have tabs for Branches, Tags, and Commits.  ### 3. Commits/Changelists Page **For Git Repos:** The page displays Git commits.  **For Perforce Depots:** The page displays Perforce changelists.  ### 4. Vocabulary Adjustments - We display either Git commit SHAs or Changelist IDs based on the project type. - For authorship, we use "submitted by" for Perforce and "committed by" for Git. - We refer to "Commits" for Git projects and "Changelists" for Perforce projects. **Examples:** - **For Git Commits:**  - **For Perforce Changelists:**  ### 5. URL Mapping URLs are now structured differently based on the project type: - **Commits Page:** - Git: `/[repo-name]/-/commits` - Perforce: `/[repo-name]/-/changelists` - **Individual Item Page:** - Git: `/[repo-name]/-/commit/[commit-hash]` - Perforce: `/[depot-name]/-/changelist/[changelist-ID]` When viewing a specific commit or changelist: - **Git:** `/[repo-name]@[git-commit-hash]` - **Perforce:** `/[repo-name]@changelist/[changelist-id]` _NOTE: The value displayed in the search field will also change accordingly._ ### What is left to be done? **On repo search results, when searching a revision, we still show the git commit SHA instead of the changelist ID for perforce depots:**  I plan to make a follow-up issue for this and begin work on it immediately. It's a little trickier than the other changes because in the RepositoryMatch type, there is no value that can help us determine whether a project is a depot or a repo. We need to find another way to fetch that data. ### Request for reviewers: 1. Please try to break these new features and tell me what you find. I stumbled on a number of little gotchas while working on this, and I'm sure I've missed some. ## Test plan <!-- REQUIRED; info at https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles --> - Manual/Visual testing - Adjust e2e and integration tests to obtain a passing CI - Test directly visiting a URL versus getting there via click - Add unit tests for new/updated helper functions --------- Co-authored-by: Camden Cheek <camden@ccheek.com> |
||
|---|---|---|
| .. | ||
| appliance | ||
| batcheshelper | ||
| blobstore | ||
| bundled-executor | ||
| cody-gateway | ||
| cody-gateway-config | ||
| customer-2315 | ||
| customer-4512 | ||
| embeddings | ||
| enterprise-portal | ||
| executor | ||
| executor-kubernetes | ||
| frontend | ||
| gitserver | ||
| loadtest | ||
| migrator | ||
| msp-example | ||
| pings | ||
| precise-code-intel-worker | ||
| repo-updater | ||
| searcher | ||
| server | ||
| sourcegraph | ||
| symbols | ||
| syntactic-code-intel-worker | ||
| telemetry-gateway | ||
| worker | ||
| README.md | ||
This directory contains Sourcegraph services and binaries.
When a services is added, removed, or when a service's dependencies change, update our architecture diagram.