Display output channel when addons are clicked#2850
Conversation
This way, when users see that an addon is errored, they can quickly navigate to the output channel to see the error.
|
|
||
| return -1; | ||
| }) | ||
| .sort((addon) => (addon.errored ? 1 : -1)) |
There was a problem hiding this comment.
The sort callback needs to handle the case where both addons have the same error state. The current implementation only looks at a single addon at a time, which isn't sufficient for a proper sort. Here's the correct implementation:
.sort((a, b) => (a.errored === b.errored ? 0 : a.errored ? 1 : -1))This ensures stable sorting by comparing both addons and maintaining their relative positions when they share the same error state.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
|
|
||
| return -1; | ||
| }) | ||
| .sort((addon) => (addon.errored ? 1 : -1)) |
There was a problem hiding this comment.
The sort callback needs to handle the case where both addons have the same error state. The current implementation only looks at a single addon at a time, which isn't sufficient for a proper sort. Here's the correct implementation:
.sort((a, b) => (a.errored === b.errored ? 0 : a.errored ? 1 : -1))This ensures stable sorting by comparing both addons and maintaining their relative positions when they share the same error state.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
|
|
||
| quickPick.onDidAccept(() => { | ||
| const selected = quickPick.selectedItems[0]; | ||
| // Ideally, we should display information that's specific to the selected addon |
There was a problem hiding this comment.
If we provide an API in the server that tags logs with the add-on name, then you might be able to reveal the output channel with a filter applied, so that you only see the output related to that add-on.
There was a problem hiding this comment.
Yeah that will be great too 👍
This way, when users see that an addon is errored, they can quickly navigate to the output channel to see the error.
Motivation
Closes https://github.com/Shopify/team-ruby-dx/issues/1324
Implementation
Since the Output tab is the only place we display information about addons now, I made the addon quick pick items clickable to navigate to it.
Currently clicking any addon will always go to the same
Ruby LSPoutput channel. But if we started creating new channels for individual addons, we can provide a better experience by pointing to addon-specific channels too.Automated Tests
Manual Tests