Skip to content

Copy Prev/Next buttons to bottom of commit page - #1389

Merged
sindresorhus merged 1 commit into
refined-github:masterfrom
bryan-ash:prev-next-buttons-at-bottom
Jul 11, 2018
Merged

sindresorhus merged 1 commit into
refined-github:masterfrom
bryan-ash:prev-next-buttons-at-bottom

Conversation

@bryan-ash

@bryan-ash bryan-ash commented Jun 22, 2018 •

Copy link
Copy Markdown
Contributor

When reviewing a long commit in a PR, it's annoying to have to scroll
back to the top of the page to hit the "Next" button to go to the next
commit. Here we duplicate the Prev/Next buttons and insert them at the
bottom of the page too.

Fixes #1387

Demo

screenshot 2018-06-21 22 42 24

@bryan-ash
bryan-ash force-pushed the prev-next-buttons-at-bottom branch from b7e372e to 030082d Compare June 22, 2018 02:41
@fregante

Copy link
Copy Markdown
Member

Let’s add a single if on both elements to ensure they exist before doing anything.

Also needs to be added to the readme and it needs a header comment.

After that I don’t know if it’s approved yet, it wasn’t discussed. I’ll wait a while before merging.

@bryan-ash

bryan-ash commented Jun 24, 2018 •

Copy link
Copy Markdown
Contributor Author

@bfred-it thanks for the feedback.

I've added a header comment, and the guard clause for the case when the buttons aren't present, good call.

I added a reference to the screenshot above to the readme.

Your comment "I don’t know if it’s approved yet, it wasn’t discussed" makes me wonder if there's a process documented somewhere that i should have followed. The Contributing guide states:

Suggestions and pull requests are highly encouraged!

It might be a good idea to add a header comment to the example file that the guide links to.

Comment thread readme.md Outdated
- [Collapse or expand a repository's browser file list.](https://user-images.githubusercontent.com/1402241/35480123-68b9af1a-043a-11e8-8934-3ead3cff8328.gif)
- [Quickly visit a repository's default branch and latest version tag.](https://user-images.githubusercontent.com/1402241/38107328-ccb3fb46-33bb-11e8-9654-23a6410943cc.png)
- [Open multiple issues at once in your repos.](https://user-images.githubusercontent.com/1402241/38084752-4820b0d8-3378-11e8-868c-a1582b16f915.gif)
- [Navigate Prev/Next commit from the bottom of a commit](https://user-images.githubusercontent.com/24777/41755271-741773de-75a4-11e8-9181-fcc1c73df633.png)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be in "more shortcuts". Maybe the copy can be:

Go to the next or previous commit from the bottom of the commit page.

When reviewing a long commit in a PR, it's annoying to have to scroll
back to the top of the page to hit the "Next" button to go to the next
commit. Here we duplicate the Prev/Next buttons and insert them at the
bottom of the page too.
@bryan-ash
bryan-ash force-pushed the prev-next-buttons-at-bottom branch from 8163f23 to da14484 Compare June 26, 2018 19:12
@sindresorhus
sindresorhus merged commit c5f24be into refined-github:master Jul 11, 2018
@sindresorhus

Copy link
Copy Markdown
Member

Looks good :)

ahmadassaf added a commit to ahmadassaf/refined-github that referenced this pull request Jul 16, 2018
* master:
  Copy Prev/Next buttons to bottom of commit page (refined-github#1389)
  Hide Releases tab if there are no releases (refined-github#1339)
  Add delete button to files in a PR  (refined-github#1398)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants