Giter Club home page Giter Club logo

prettypullrequests's Introduction

logo

Pretty Pull Requests

This extension will add various features to the diff view on Github's pull request pages.

Supports both files changed and commit diffs.

Current Features

  • Click on the file name to collapse a file, or collapse from bottom up via an added button
  • Collapse/Expand all
  • Collapse/Expand all that match a regex pattern
  • Collapse/Expand added/removed lines
  • File tree view allowing you to collapse a directory, or jump directly to a file diff
  • (Optional) Use backtick/tilde to switch tabs in the pull request. Backtick goes forward, and tilde (shift-backtick) goes backward. Enable this setting in the extension's options.
  • Set regex patterns to automatically collapse all files in any PR that matches

Example Image

To install the chrome extension, visit: chrome web store / pretty pull requests

prettypullrequests's People

Contributors

bfred-it avatar bjohnson-va avatar brentyates avatar cdeszaq avatar evansalter avatar grimthereaper avatar juandebravo avatar rianrainey avatar ssharma-va avatar stevennoto avatar thedudewiththething avatar tmosmant avatar un1versal avatar unrolled avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prettypullrequests's Issues

Can't Collapse Diff in Pull Request

Today I noticed that diff collapsing stops working. I checked localStorage and found something like ppr|my|repo|#201|undefined, it seems the extension can't get the correct diff-id. The extension works just fine for me before, maybe caused by some updates of GitHub?

Allow adding private comments to lines of code in the diff-view

First of all, I love this extension, it's a life saver for me for reviewing large pull requests and not lose my focus.

One last feature i'd like to see is to be able to add "in progress" comments. The use case is that for very large pull requests i sometimes have an idea that something needs to be changed but i can't articulate it fully yet. (e.g. "eww this is gonna mess up the code base we need to find a way to make this scale better"). only once i've looked through the full PR or even thought more about it i am able to write a public comment that is productive instead of just negative.

Optimally the way it works is something like this:

  • i can click next to any line and a new comment icon pops up
  • clicking opens textbox (i don't think markdown or preview is required, just nice to have)
  • submitting stores the comment in local datastore (browser specific), this seems like the easiest solution (cross browser support with server side storage would obviously be nice, but seems like total overkill)
  • comment display inline similar to official public github comments, but formatted slightly differently to signal it's internal only for now
  • next time i open the diff the comments get displayed automatically like you'd expect

curious if you think that's a possibility. keep up the great work!

Mouseover pointer for diff filenames is confusing

Right now when you mouse over the name of a diff it is the text selection pointer, which doesn't give you the sense you can click on it. If this was changed to a pointer, the benefits would be two-fold:

  1. Obvious feedback that, "Hey, I can click on this", and
  2. You would know for sure that you had installed the extension

Should be an easy css change!

Add shortcut to flip through the tabs on a PR

It would be cool to just be able to hit the Tilde key and have it flip through each of the tabs on a pull request. An example of this is how you can go command-` to flip through windows in an app on OS X.

After a PR is loaded, pressing would take you to the Commits tab. Pressing it again would take you to Files. Pressing it a third time would take you back to the first page, Conversation. I should be able to keep hitting to cycle through all of the tabs.

I don't know how easy this is. But it would be pretty awesome.

Add the Chrome Extension store link to the repository somewhere

Currently people just have to Google for the extension if they want to use it after finding it on GitHub. Or they have to manually run it, I guess. But it'd be cool to be able to just share them this repo link so that they can contribute if they want, but they could then also get right to the download page from here. Which is this:

https://chrome.google.com/webstore/detail/pretty-pull-requests-gith/ljnjpkadhhcdniohpfilddnhahoigdec?hl=en

I'd do it, but I don't have permissions to do so.

PR categories for large PRs with many files

In my organization, we have many very large pull requests that we do formal code review meetings on.

I would like the ability to define categories in the scope of a single PR and add files to these categories. A list (tree?) of these categories could be displayed on the lefthand side of the page. I would like to then add changed files (or even specific hunks) to a category. In this way, I would be able to prepare for a code review meeting by creating categories like 'core changes', 'necessary refactors', 'tests', 'changes that need a group decision', etc. And organize my categories in the order they will be presented at the meeting.

I have not yet seen any chrome extension that allow for this kind of thing. Any suggestions to alternative ways of solving this problem would also be welcome.

Unfolding folder hides highlight

In the tree view, you can use the arrow keys to go through the list of folders. However, when you press right, unfolding a folder, the highlight is removed. When you press right again, it correctly goes to the first item in the unfolded folder. This is the correct behaviour, but the highlight that disappears is counterintuitive.

Content script not injected if user goes to pull request's discussion page first

If a user goes to a pull request via its "home" page (usually the discussion), the content script is not injected when the user switches to the file view. It appears github does not do a page reload, just updates the URL and loads the files via ajax.

Need to inject the content script on any page matching the pull request URL pattern, not just the files page.

JS Not Loaded on GitHub Enterprise

First of all, great plugin!

This worked well for me for a couple weeks and now I'm unable to get the js to load on GH enterprise pages. It works as expected on non-GHE pages.

I've disabled all other plugins and I still can't get GHE PR files to toggle. When I use the dev tools inspector I can see that the plugin never loads its js/css. However, regular GH pages load the js/css correctly.

I get prompted for new permissions when I enter the GHE url in the options, but I see no change in functionality. I'm wondering if other GHE users have experienced recent degradation.

Thanks for any help. This plugin helps very well w/ managing PRs.

Does not work with GithubEnterprise

GitHub Enterprise installations usually have a different URL than public GitHub, so the current configuration of URLs to apply the plugin to don't work.

Please allow configuring the URL to apply to or make available as a UserScript so that we can use this with Gitub Enterprise (ie. non-GitHub URLs)

Diffs for files collapse if you've ever collapsed them before

I think most people (certainly @Yatser ) know of this bug, but just making it to make it official and to make it known I plan to work on this.

Reproduction:

  1. Open a pull request
  2. Collapse a diff for a file
  3. Make another pull request
  4. See that the diff for that file is still collapsed, even though it's a new pull request

My current thought is to make the key somewhat more specific than it is now. Currently we're just storing a diff id which you'd think would be enough, but it seems to be the same diff id between PRs. Perhaps storing a concatenation of projectName + '|' + pullRequestNumber + '|' + diffId, which dang well better be unique enough.

pullrequest.js doesn't execute when coming from the PR view of a repo

If I'm looking at the list of pull requests, a /pulls URI, and I click on one, none of the collapse stuff shows up. One has to refresh the page when you're on the PR to make that stuff show up.

This is because the transition to the PR happens via PJAX, so we probably need to add a listener for that or something.

@yatser I'd love to work on this, and I'm working on something else for this project right now, but in my own fork. Wanna give me full permissions and I can branch off your repo?

Proposed enhancement: button to unfold all code in PRs files tab

The following bookmarklet code can be used to automatically unfold folded code:

javascript:(function() {
    var interval = setInterval(
        function() {
            var expand = document.getElementsByClassName("diff-expander");
            if (expand.length == 0) {
                console.log('Done expanding');
                clearInterval(interval);
            } else {
                console.log('Expanding ' + expand.length);
                for (i = 0; i < expand.length; ++i) {
                    expand[i].click()
                }
            }
        }
        , 1000);
}());

What do you think about adding this featur as an action in this extension?

Change the logo

Github has (very nicely) asked me to change the logos of this extension, since I am in violation of their logo policies here https://github.com/logos. Need to come up with a new logo/icon that makes sense for this extension while not being recognizable as an official github product.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.