Improved file navigation and editing in the web UI
We’re releasing improvements designed to streamline file navigation and editing in the web UI.
Seamless editing from search results
When searching for a file on GitHub, results link to a specific commit. If you try to edit the file, you’ll see a disabled pencil icon with a tooltip that says “You must be on a branch to make or propose changes to this file.” This can be confusing for new users unfamiliar with branches, and it’s not clear how to switch to a branch to enable editing. This is an extremely common pain point for new open source contributors.
To address this, if the user is on the latest commit of the file on the default branch (i.e., the HEAD commit), we’re adding an option in the dropdown next to the pencil icon that allows users to quickly edit a file on the default branch. This improvement reduces friction and makes the experience of editing files smoother, especially for new users. If you’re on the default branch’s HEAD, you’ll see on “ branch in the Edit file… group — click that to edit the file.
The Edit > In place option will only appear if you’re on a branch and have edit permissions — this is the existing behavior. You’ll never see both options together.
Easy navigation to default branch
Previously, there wasn’t a smooth UX for navigating back to the default branch from code or file view, an issue which came directly from the Refined GitHub repo. Now, we’ve added a View on default branch button to the left of the branch picker in the file tree to improve this workflow.
There are three conditions that impact the availability and display of the View on default branch button:
- If you’re on the default branch, the button is hidden.
- If the file doesn’t exist on the default branch, the button is disabled and shows a tooltip.
- Otherwise, the button is enabled and navigates directly to the file on the default branch.
How you can give feedback
Please leave feedback, questions, or notes on issues you run into in our Community discussion.