Repository navigation
Conversation
Just 2 cents with what I have been learning from accessibility. We wouldn't want to hide functionality behind a hover state; tho, I maybe it is ok given there is an alternate path -> the main menu/keyboard shortcut. However, maybe if there is a way to have a visible control while there is a divergent state that would be more ideal -> like I think there was talk of it being a dropdown button? And not solely from an accessibility stand point, it would be more discoverable too. |
This comment was marked as spam.
This comment was marked as spam.
|
Yes, I was counting on that being just an extra "mouse-based shortcut", and the accessibility would come from the menu item and its keyboard shortcut, exactly where it's always been (but now available more frequently) so the force push feature is not hidden. I think the Option + something else is a common pattern in Apple's apps for these kinds of "mouse-based shortcuts", hence why I was suggesting it. The dropdown sounds great in terms of accessibility and discoverability, if we find a nice way of fitting that behavior in the UI 🤔 |
Touch back to discoverability. I had no idea it was there till this PR. :D I always used the force push option in the interface. |
|
Just went ahead and did the Option thing to switch between the Screen.Recording.2022-10-23.at.23.13.05.mov |
Closes #15211
Closes #7805
Description
This PR makes two changes:
Fetchitem to theRepositorymenu, so users can fetch at any time. This is useful if you're in a state where theFetchbutton has been replaced by thePullorPushbutton but you still need to fetch. For example, if you have a branch that hasn't been pushed yet, you want to rebase it on top of another branch that doesn't exist or that is not updated with its upstream. NOTE: This option might go away since I implemented it on a whim, without discussing it with the team, after needing it a few times in the past.Force pushitem under theRepositorymenu, to always show up when the current branch has diverged from its upstream. The rest of places where we usually suggest to force-push will keep the existing behavior: they will only showForce pushwhen GitHub Desktop knows the branch diverged after the user performed an operation that is usually followed by a force-push (like a rebase or amending an already pushed commit).I'm still considering "hiding" a
Force pushstate in the pull/push/fetch button, when its state isPullwith ahead and behind commits (i.e. in a diverged branch). Maybe pressing Alt (or Option on macOS) while hovering the pull/push/fetch button in that state 🤔Screenshots
Screen.Recording.2022-10-20.at.18.20.59.mov
Release notes
Notes: [Improved] Add new menu option for fetching at any time, and allow force-pushing diverged branches from menu