question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve the file action buttons on a commit

See original GitHub issue

Description

When viewing a file on a specific commit/tag/whatever (not on a branch), the file action buttons (open in GitHub desktop, edit and delete) have tooltips “You must be on a branch to *”, however they are not disabled but pointing to the login page along with a redirect to the same page, which is quite confusing:

https://github.com/sindresorhus/refined-github/blob/3775e52/source/features/useful-not-found-page.tsx
⬇️
https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsindresorhus%2Frefined-github%2Fblob%2F3775e52%2Fsource%2Ffeatures%2Fuseful-not-found-page.tsx

I suppose we can improve the buttons a bit:

  • One option is to disable them entirely. GitHub does put a .disabled class but that doesn’t invalidate the links.
  • Another option is to have these buttons work like if we are on the default branch, maybe with a prompt “Do you want to take this action on the default branch?”
  • Make them work like default-branch-button or just point the user to default-branch-button, something like that.

Screenshot

image

Example URL

https://github.com/sindresorhus/refined-github/blob/3775e52/source/features/useful-not-found-page.tsx

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kidonngcommented, Oct 21, 2021

image

The “disabled” buttons are now correctly grayed out. Maybe it’s not worth fixing it given default-branch-button is present…

1reaction
kidonngcommented, Oct 3, 2021

That makes sense. The intention is to simplify the following steps to one click:

  1. Click “View file”
  2. Click default-branch-button
  3. Click edit button

If the original request in this issue is resolved, the second step can be saved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add, edit, and commit to source files | Bitbucket Cloud
From the repository, click Source in the left navigation. · Click the file you want to open. · Click the Edit button to...
Read more >
Finding and customizing actions - GitHub Docs
Browsing Marketplace actions in the workflow editor · In your repository, browse to the workflow file you want to edit. · In the...
Read more >
Commit and push changes to Git repository | JetBrains Rider ...
Open the vertical Commit tool window located on the left: · As your changes are ready to be committed, select the corresponding files...
Read more >
Make a Git commit in Visual Studio - Microsoft Learn
To stage changes when you're ready, select the + (plus) button on each file you want to stage, or right-click a file and...
Read more >
User Guide - gerrit-review
A change consists of a Change-Id, meta data (owner, project, target branch etc.), one or more patch sets, comments and votes. A patch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found