You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Turn Linked pull requests into the Link pull request command when a thread has no links
#19122
#15497 reports that a thread with no linked pull requests offers no visible way to link one, and proposes a new item in the thread's right-click menu. This idea addresses the same problem with a different fix.
#10839 added linked pull requests. It put a Linked pull requests item in the right panel's surface menu, and gave the panel an empty state with a Link pull request button that opens the link dialog. #11348 then disabled that item while a thread has no linked pull requests, so the menu no longer opens an empty panel. Since then, the empty state's button is unreachable when the user wants to link the first pull request.
Problem
A user who wants to link a pull request looks in the right panel first, where both pull request items are. With no link, both are disabled. Pull request needs a pull request on the thread's branch, and Linked pull requests needs a link. The hint says no linked pull requests are available and offers no way to add one.
The command palette's Link pull request to thread works at this point, but a user who rarely opens the command palette does not find it. The user guide also points to the Linked pull requests panel, which is disabled at that point.
Proposal
While the thread has no linked pull requests and the environment supports linking, replace the Linked pull requests item with Link pull request to thread, the command the command palette already offers. Choosing it, or pressing its L shortcut, opens the same link dialog.
Once the thread has a link, the item changes back to Linked pull requests and opens the panel as it does today. If the user removes the last link, it changes to the command again.
The surface menu then behaves like the command palette for a thread with no links. No empty panel opens, so the behavior from #11348 holds. Environments without linking support keep the item disabled. Web and desktop share this menu. Mobile has no linking UI and stays as it is.
Compared with #15497, this adds no new menu item. It reuses an existing command in the place where the user already looks for pull requests. The two fixes can coexist.
Implementation
I would like to implement this myself, and I can open a PR if you approve the direction.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
#15497 reports that a thread with no linked pull requests offers no visible way to link one, and proposes a new item in the thread's right-click menu. This idea addresses the same problem with a different fix.
#10839 added linked pull requests. It put a Linked pull requests item in the right panel's surface menu, and gave the panel an empty state with a Link pull request button that opens the link dialog. #11348 then disabled that item while a thread has no linked pull requests, so the menu no longer opens an empty panel. Since then, the empty state's button is unreachable when the user wants to link the first pull request.
Problem
A user who wants to link a pull request looks in the right panel first, where both pull request items are. With no link, both are disabled. Pull request needs a pull request on the thread's branch, and Linked pull requests needs a link. The hint says no linked pull requests are available and offers no way to add one.
The command palette's Link pull request to thread works at this point, but a user who rarely opens the command palette does not find it. The user guide also points to the Linked pull requests panel, which is disabled at that point.
Proposal
While the thread has no linked pull requests and the environment supports linking, replace the Linked pull requests item with Link pull request to thread, the command the command palette already offers. Choosing it, or pressing its
Lshortcut, opens the same link dialog.Once the thread has a link, the item changes back to Linked pull requests and opens the panel as it does today. If the user removes the last link, it changes to the command again.
The surface menu then behaves like the command palette for a thread with no links. No empty panel opens, so the behavior from #11348 holds. Environments without linking support keep the item disabled. Web and desktop share this menu. Mobile has no linking UI and stays as it is.
Compared with #15497, this adds no new menu item. It reuses an existing command in the place where the user already looks for pull requests. The two fixes can coexist.
Implementation
I would like to implement this myself, and I can open a PR if you approve the direction.
Related
All reactions