ovity / octotree Goto Github PK
View Code? Open in Web Editor NEWGitHub on steroids
Home Page: https://www.octotree.io/
License: GNU Affero General Public License v3.0
GitHub on steroids
Home Page: https://www.octotree.io/
License: GNU Affero General Public License v3.0
Open a given blog article (for instance: https://github.com/blog/1841-nested-task-lists ), and Octotree will try to browse through it, giving the error Private or invalid repository!
My comment here
Here's an idea: Automatically expand all the tree until there are more than 1 items in the level
e.g. src->com->twitter->scalding->scala->test (in this example, these are all folders in hierarchy and they are the only one until the 'test' so expanding them automatically all the way through makes sense).
When loading the plugin, what do you think about fetching the default branch instead of master?
win7 x64 chrome 27
Error message in the console
"NetworkError: 501 Not Implemented - https://api.github.com/repos/buunguyen/octotree/git/trees/master?recursive=true&1400474606803"
It would be great if user could configure the automatically activation feature.
Hi, great chrome addon! Is there a keybinding to toggle the source drawer? If not, it would be great to have one.
It would be nice to work with gitlab also.
Do you have in mind to add icons for some major file extensions?
If you don't ( I hope you don't ), because then the design can be simplified - you only need the arrow (maybe also bold) for folders. Similarly to SublimeText. Easier on the eye, de-duplicate visuals (arrow + folder icon, no arrow + file icon)
Currently the fly-in uses CSS3. Implementing this feature might mean moving transition code to JS (still use CSS3 though).
The new Presto based Opera uses the same extensions as Chrome, but I am not sure they can be used directly - anyway - you can build an Opera extension the same way as in Chrome and with the same manifest file - no changes needed.
PS. I also tried IE, but all solutions seem overcomplicated, I thought about a bookmarklet, but that got blocked by the github.com Content-Security-Policy.
when i click through repo source, octotree doesn't show my current location in the tree.
f.e. https://github.com/buunguyen/octotree/tree/master/docs
doesn't reflect current folder in the octotree
An extension can control the browser, so it could generate the personal access token with the right permissions set on its own (by simulating navigation, manipulating the DOM, etc.). Then the extension could grab the token directly (no need to bother the user with copy/pasting it).
Of course, ask the user and inform them on what's about to happen before doing so :-)
GitHub has an API endpoint called 'tree-list' that is part of the presentation layer and is available to all users. This endpoint lists all files in a repository - even private repos (as long as the user is logged in). It's used by the file finder, which is presented when you are viewing a repo and hit the 't' hotkey.
https://github.com/OWNER/REPO/tree-list/COMMIT_SHA
And a live example, using my fork of Octotree:
https://github.com/sullivanmatt/octotree/tree-list/HEAD
{"paths":[".gitignore","LICENSE","README.md","dist/octotree.safariextz","dist/octotree.xpi","docs/chrome.png","docs/firefox.png","docs/safari.png","docs/token.png","gulpfile.js","package.json","src/Info.plist","src/firefox.js","src/icons/icon128.png","src/icons/icon16.png","src/icons/icon19.png","src/icons/icon48.png","src/icons/icon64.png","src/inject.css","src/inject.js","src/lib/css/jstree.css","src/lib/js/base64.js","src/lib/js/github.js","src/lib/js/jquery.js","src/lib/js/jquery.pjax.js","src/lib/js/jstree.js","src/lib/js/underscore.js","src/manifest.json","src/package.json"]}
The data it returns could definitely be used to build the file paths list and completely remove the need for granting a token to work with private repos. I've attempted to do this myself, but my JavaScript skill set is simply not strong enough to be able to contribute the required code. Here's a rough start:
# inject.js
function fetchData(repo, done) {
// Load the branch info from the page data
var sha = document.getElementById("js-command-bar-field").getAttribute('data-sha')
if (!sha) {
sha = "HEAD"
}
// Get the data
$.getJSON( "https://github.com/" + repo.username + "/" + repo.reponame + "/tree-list/" + sha, function( data ) {
$.each( data.paths, function( key, val ) {
... build the path information ...
}
}
This is an awesome extension, thank you to everyone doing the heavy lifting!
Typical directory structure for Java projects (Gradle and Maven) has a lot of nested folders like /src/main/java/me/loki2302/app1/dal/entities
. When exploring such repositories with octotree, the scroll bar appears immediately. A good alternative solution is to allow users to change the panel width manually.
For example I'm coming to this project https://github.com/buunguyen/octotree for the first time, then the octotree extension brings up the tree view from the left with a slide from left animation.
However, if I go to issues page, same animation will annoyingly happen again and if I click "New issue", yes, it animates the same file tree again.
Maybe you can restrict showing the octotree only for the paths like github.com/[token]/[token]/tree/.. or at least use some local cache to not to animate for the next pageviews on the same project.
I love this project, awesome job! 👍
I guess it's not an extremely common thing, but it would be nice to be able to click on a git submodule in octotree, and be taken to that repository.
I'm just not sure that this is common enough, or a feature that anyone else would want though.
GitHub has a few special non-repository URL formats, what basically look like the repo ones. For example: https://github.com/blog/1833-github-pages-3. At the moment a "Private or invalid repository!" error is shown. It's better to just recognize these URLs and not show the sidebar, similar to <.../settings/...>.
Until the settings pane is implemented to provide user options, it's nice to show a bubble on the toggle button once to indicate its behavior & shortcut. This is to not surprise users who don't know the (new) default behavior of Octotree is hidden.
This will prevent to try to fetch the repo for like https://github.com/explore/subscribe.
Folder and file icons look blurry on retina monitor. Could you please add bigger size icons from retina?
Octotree loads a file using pjax. If a file is big (e.g. jquery.js), loading can be slow (users seeing nothing happens for a few secs, wondering what's wrong). It would be great to show progress indicator in place of the file icon, similar to what GitHub does natively.
It's extremely annoying to have the sidebar pop up any time I open a new tab. Should it be closed by default? Or at least give the user an option to have it closed by default?
Screenshot
The following age has the issue
https://github.com/blog/1841-nested-task-lists
Where the Blog home page doesn't
https://github.com/blog
For public repositories that have several branches (ex: master
, develop
) this works fine. But if the same repository has a branch like feature/coolstuff
I get the Private or invalid repository!
message.
It looks like the relevant code is in src/inject.js
lines 76 and on, should be a straightforward change.
This can be used for things like configure short key, directory auto-collapsing, default sidebar visibility, use of private API, access tokens and GH Enterprise URLs etc.
hi there, great work so far
my suggestion would be combining multiple directories if they only have one subdirectory, for example:
- src
`- main
`- java
`- at
`- bluephoenix
`- Package
`- Main.java
`- Part.java
would become
- src/main/javas/at/bluephoenix/Package
`- Main.java
`- Part.java
Filenames are added to jsTree without sanitization. jsTree will render HTML passed as a tree node's text
. This can lead to cross-site scripting and potentially compromise GitHub tokens stored in local storage and access GitHub sessions.
Submodules are presented with no icon.
This could be made obsolete by #5 - just make submodules italic, or underlined (with a link to the submodule's hash, just like github)
Love the extension!
It would be great if it also displayed a tree for Bitbucket repos :)
https://www.gitlab.com/
Internal code repos of companies are usually hosted with gitlab...
I'm experiencing UI freeze when browsing this (big) repo:
https://github.com/cdnjs/cdnjs
Seems the tree building somehow locks the DOM.
You can consider using the built-in jstree-file
and jstree-folder
icons - that will take care of the positioning issue I seem to see with the .tree
& .blob
classes.
Once again - great work.
Btw - you can also create an optional icon set that takes the filetype into account as seen on the jstree demo page - the filebrowser.
Cheers,
Ivan
For my projects, I installed gitlab and for this, your addon doesn't work. It would be great, if you can add support for gitlab.
Regards
Chris
Since the tree is rendered on the page you can use github's own icon set instead of the jstree ones: https://github.com/styleguide/css/7.0
When viewing a pull request, it would be helpful to see only the files affected by the pull request in the tree, similar to what you would see in Atlassian's Stash (see http://bit.ly/1iJXMuH for an example).
Say, there's a link to a particular file in the repository, like this:
https://github.com/buunguyen/octotree/blob/master/src/lib/js/github.js
When I click on it from anywhere (possibly an external site), I see the file immediately, but the tree shows the root folder. It would have been great if corresponding folders were automatically expanded in the tree and the currently displayed file was highlighted by default.
It built v1.0 quickly, but now it should be removed for the following reasons:
underscore.js
and base64.js
, which Octotree doesn'tIt'd be nice! You could add an option in the plugin about which sites to request permissions for maybe?
I actually don't know if that's possible.
Hi. I'm using chrome plugin.
When you enter the page where it must be shown (opened by default) first u see initial github page and then after a few seconds sidebar appears. But when it's happening we have a page layout "jump" to the right which is quite annoying.
I would suggest to make sidebar visible from the very begginning of page loading (when its state is 'opened', of course) and just show some small loading animation in it.
Great extension, thanks.
Depending on the speed/cache state/etc of github at the time, if the page request is not served in under 650ms (the default timeout), pjax gives up and falls back to a full page load. This threshold does not seem to be a good default for this application. Although the fallback is adequate, I believe some tuning of this setting would improve the usability.
Hi,
Thanks for this great extension. It would be nice to have an option for disabling the slide-in (and slide-out) animation of the panel.
When the panel is brought into view, contents of the webpage move and it can make it difficult to browse Github in an agile fashion.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.