-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide GitHub Desktop with the same Browse code feature as GitHub Mobile #13831
Comments
From a quick search in the code, it looks like both the desktop/app/src/ui/changes/changes.tsx Lines 99 to 133 in 6aa1e09
desktop/app/src/ui/history/selected-commits.tsx Lines 163 to 180 in 6aa1e09
desktop/app/src/ui/diff/seamless-diff-switcher.tsx Lines 157 to 165 in 6aa1e09
And seems to use helper functions like desktop/app/src/ui/diff/seamless-diff-switcher.tsx Lines 278 to 281 in 6aa1e09
desktop/app/src/ui/diff/syntax-highlighting/index.ts Lines 107 to 130 in 6aa1e09
Which calls desktop/app/src/ui/diff/syntax-highlighting/index.ts Lines 107 to 130 in 6aa1e09
Which calls desktop/app/src/lib/git/show.ts Lines 49 to 83 in 6aa1e09
desktop/app/src/lib/file-system.ts Lines 55 to 81 in 6aa1e09
desktop/app/src/ui/diff/seamless-diff-switcher.tsx Lines 351 to 378 in 6aa1e09
Which uses different render methods depending on the type: desktop/app/src/ui/diff/index.tsx Lines 121 to 143 in 6aa1e09
Of which desktop/app/src/ui/diff/index.tsx Lines 273 to 309 in 6aa1e09
desktop/app/src/ui/diff/side-by-side-diff.tsx Lines 215 to 218 in 6aa1e09
desktop/app/src/ui/diff/text-diff.tsx Lines 287 to 292 in 6aa1e09
From a quick skim through desktop/app/src/ui/diff/text-diff.tsx Lines 640 to 643 in 6aa1e09
desktop/app/src/ui/diff/text-diff.tsx Lines 1550 to 1575 in 6aa1e09
desktop/app/src/ui/diff/code-mirror-host.tsx Lines 92 to 95 in 6aa1e09
If you're not already aware, CodeMirror is a code editor component for the web. While there would obviously be other things to look into and consider in implementing this feature; the above code references should help point anyone who might be interested in looking into the feasibility of implementing this in the right sort of places in the code. |
Just a heads up, if a Desktop team member adds the |
@tidy-dev Yup, that's understandable. I was just exploring the issues and code and wanted to add relevant context as I had it. |
I would like to browse my code in GitHub Desktop on Windows the same way I can in GitHub Mobile. Currently, it appears that the only way I can view my code via GitHub Desktop is through a third party entity, such as VS Code or Windows Explorer, both of which open up the possibility of accidentally editing the code, whereas a browse code feature would open the code in read-only mode.
The alternative is to log into the GitHub website, where code can be browsed, but that defeats the purpose and advantage of GitHub Desktop, as you have to present your login credentials each time you connect to GitHub via a browser.
It seems odd that this functionality doesn't already exist. Note, you can browse your commits and diffs in read-only mode directly through GitHub Desktop, but sometimes you just want to view the contents of a whole file. Thank you.
The text was updated successfully, but these errors were encountered: