7 ms·
> Web source tree browsing that's front and center, that's relatively decent, with OK search. The source browsing feels barely adequate to me. There are so man
by Stratoscope 10y ago
> Web source tree browsing that's front and center, that's relatively decent, with OK search.
The source browsing feels barely adequate to me. There are so many simple things they could do to make it better.
• Show file sizes. When I'm exploring a repo I'm unfamiliar with, one thing that's helpful for me is to get a sense of what the code is like. To do this, I want to look at some of the larger files; that's where I'll probably find the more interesting code. As it is I just click around on random files hoping to find something interesting.
• Show real dates instead of the vaguely rounded off "how long ago". If it says "a month ago", well, what is it, two weeks or six? And why not show the time? A couple of times I've been looking for a code change and I didn't remember what day it was but I did remember it was right before lunch, maybe around 11:30 or so. It feels like their priority is a "clean and simple" display as opposed to a useful and informative display.
• Fix the display for code that indents with tabs. It still defaults to 8 columns, which hardly anyone (with a few notable exceptions) likes. And you, the user, can't override this. They did recently start honoring the indent_size setting if you have a .editorconfig file, but that really misses the point. Many of us who use tabs don't want to specify an indent_size. That's one of the virtues of tabs: people who read the code can use whatever indentation they prefer. The indent size for tabs should be a user preference setting. As it is, I started adding indent_size=4 to my .editorconfig files just to get a decent looking display on GitHub.
• Use a readable font on mobile. Courier, really? And not such low contrast! Everything is hard to read on mobile, and they even disabled pinch-zoom so I can't make the text a little bigger.
• Show a directory tree on the left. If I'm exploring a repo, I'd like to get the big picture of the directory layout, and also have an easy way to click around to look at the various directories. As it is, I have to do a lot of back and forth. Google Code had this from the beginning.
Edit: Thank you everyone for the helpful replies! I learned some great tips from you all.
- fratlas 10y agoI actually prefer the "time since" method. Don't have to do date maths in your head to see how active the repo/file is.
- haukur 10y ago> Fix the display for code that indents with tabs. Hidden feature: you can actually add ?ts=2 (or 4) to the URL. It would be nice to be able to configure it, though.
- jsheard 10y agoYou can use a simple Stylish rule to force it to your preferred indentation: https://userstyles.org/styles/70979/github-better-sized-tabs-in-code https://userstyles.org/styles/70979/github-better-sized-tabs...
- gnicholasgreen 10y agoThis is what I do, and now GitHub styles match my editor styles. It makes my brain tranquil.
- wilg 10y agoHovering over any time on GitHub shows the absolute time.
- mkesper 10y agoThat's as bad for compairing as giving file sizes in bytes, kilobytes and megabytes in the same listing.
- timdorr 10y ago> Show file sizes Those are at the top of the display of file contents. However, they aren't in the tree view, as you've stated. Unfortunately, this is hard because I don't believe Git stores this info in their index of files, which is what is used to generate the tree view. It might be infeasible to gather that data for the tree view. > Show real dates instead of the vaguely rounded off "how long ago". If you hover over any relative date, the real date is shown. It's on the title attribute for any relative date. > Use a readable font on mobile. The have Consolas and "Liberation Mono" on the font stack, but those probably aren't on your phone. They are limited in font selection because they have switched to native fonts. This avoids the download of some giant font file that contains all the possible glyphs (which is needed on a site like GitHub's). Unfortunately, the monospace options on mobile are pretty limited: http://iosfonts.com/ http://iosfonts.com/ > Show a directory tree on the left. Best tip I can offer is to type `t` to search by file name. Works great and has partial matching support, which makes it really quick to navigate to certain key files.
- eridius 10y agoThe tree doesn't tell you when the blob was last modified either. If they can show last modified time (and commit message), showing file size is surely even easier.
- tlb 10y agoSize = 0 is a common case, useful to highlight, and (I think) should have a common hash value. __init__.py files are a great place to look if they're not empty, but most are.
- a1a 10y agoJust had to test what the other keys did. What i found: t = search file j/k = move down/down (selected file) w = select branch s = focus search field y = expands url Anyone know any more? EDIT: Found this https://help.github.com/articles/using-keyboard-shortcuts/ https://help.github.com/articles/using-keyboard-shortcuts/
- geerlingguy 10y ago
- bdcravens 10y ago> Show a directory tree on the left The OctoTree extension is great for this (all browsers, and works for both Github and Gitlab)
- netheril96 10y agoWhat I want most is "jump to definition". Maybe not as full fledged as the true IDE, but just ctags like behavior is immensely helpful.
- jdormit 10y agoThe Sourcegraph Chrome extension provides this for Python, JavaScript and a few other languages I think.
- netheril96 10y agoI known. But their language support is very limited.
- zielmicha 10y agoI've made codesearch.xyz with that purpose. It lets you enter repo URL and then it lets you search and browse the code.
- TACIXAT 10y agoI'd be really happy if they parsed the code and indexed definitions vs usage in search. A lot of times when I'm digging through a project I'll find a function and want to look up the definition. Ok, try searching for the type and function name, nothing, it must be type, a line break, then the function name. A lot of times I end up clicking through pages of search results trying to find something that is a little elusive. It would be awesome if they did it like IDEs and you could filter searches by usage or definitions (go to declaration sort of thing). Given the number of languages they would have to implement that over, I don't think it will happen, but it would be cool.
- c8g 10y ago> Show file sizes https://github.com/harshjv/github-repo-size https://github.com/harshjv/github-repo-size
- arthurfm 10y ago> GitHub Plus [1][2] does that and more. Features 1. Displays repo size. 2. Displays each file size in every active branch (not applicable for folder / symlink). 3. Show download link for each individual file (not applicable for folder / symlink). 4. Copy file's contents directly to Clipboard (just won't work for markdown files). 5. Download file while viewing it's contents. [1] https://github.com/softvar/github-plus https://github.com/softvar/github-plus [2] https://chrome.google.com/webstore/detail/github-plus/anlikcnbgdeidpacdbdljnabclhahhmd https://chrome.google.com/webstore/detail/github-plus/anlikc...
- strictfp 10y agoTo me the real killer is that the code formatter is too slow on mobile, with no way (AFAIK) of opting out.
- strictfp 10y agoTo me the real killer is that the code formatter is too slow on mobile, with no way (AFAIK) of opting out.
- jakub_g 10y ago> Show a directory tree on the left. FYI there's a Chrome extension for that https://chrome.google.com/webstore/detail/octotree/bkhaagjahfmjljalopjnoealnfndnagc https://chrome.google.com/webstore/detail/octotree/bkhaagjah...
- fredley 10y agoIt can be a bit of a faff to set up with private repos, but it's a fantastic tool, well worth trying out if you want directory-tree navigation in GitHub.
- rbanffy 10y ago> • Fix the display for code that indents with tabs. It still defaults to 8 columns God made the ASR-33 with 8-column tabs for a reason. ;-) As for style, it is relatively easy to make a browser plugin that overrides the default styles of a site. While working for Canonical, I did one for Launchpad: https://chrome.google.com/webstore/detail/launchpad-tweaks/pinhffhfibgmfgjjafafhiaegdmomhhk?utm_source=chrome-app-launcher-info-dialog https://chrome.google.com/webstore/detail/launchpad-tweaks/p...
- whatever_dude 10y ago> Fix the display for code that indents with tabs. It still defaults to 8 columns, which hardly anyone (with a few notable exceptions) likes I still think GH's insistence on 8-space tabs is part of a secret conspiracy campaign to get people to stop using tabs. It always looks bad when you look at tabbed source code in there, so the easier way to avoid it is to start using spaces instead.
- findjashua 10y ago"Show a directory tree on the left" if you use Chrome, try out Octotree
- Sohcahtoa82 10y ago> disabled pinch zoom Can anyone explain to me why this is even a feature? Why did the powers that be decide that web sites should be able to prevent pinch zooming? Why do mobile browsers not provide the option to disable this bug?
- krzyk 10y agoI agree, it is a real PITA when using <7" phones.
- ayosec 10y ago> Why do mobile browsers not provide the option to disable this bug? In Firefox, you can set browser.ui.zoom.force-user-scalable to true. Unfortunately, if have JavaScript enabled, some pages are still able to disable the zoom.