'View on Github' Availability For Commit Doesn't Update
See original GitHub issueDescription
‘View on Github’ for commit in history does not update unless changing away from history tab and back. If you do a push from the history tab, or initiate a push then switch to the history tab before it completes, you won’t be able to access ‘View on Github’ unless you leave the tab and come back.
Version
- GitHub Desktop: 1.6.5
- Operating system:
Steps to Reproduce
- Make a commit
- Go to history tab
- Push changes
- Right click on the commit
Expected Behavior
‘View on Github’ should be clickable
Actual Behavior
‘View on Github’ is greyed out
Additional Information
This occurs because isLocal
is passed as a static value to CommitListItem
as a property, so it never updates.
A quick and dirty hack would be to make isLocal
a function which when invoked runs the check, so it’s always up-to-date. This works since the context menu is triggered by a user action.
However, that’s not a great solution, and wouldn’t help with future issues like #5873 (if it’s ever closed) showing a stale state. The real solution needs to be reactive or subscribed so it updates correctly in all cases.
Logs
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
I was no longer able to reproduce this bug, so I’m going to close this issue out. If this is still an issue let us know and we can reopen it.
Confirmed this appears to be fixed. Thanks!