-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message service show action buttons in reverse order #11311
Comments
@dbaeumer pushed the fix and adopted all places in the workbench but each extension needs to adopt this change too now. |
@bpasero How about us handling that instead of asking all extensions to update? |
@jrieken good idea. but how can I know that an extension relied on the old way of sorting actions? When I discussed this with @dbaeumer I raised the concern of this being a somewhat breaking change (at least breaking existing behaviour) however we then thought that the way it used to work was already broken and so with this fix the behaviour is correct (even though this means extensions with buttons > 1 show in different sorting order). |
I believe it was always broken so for extensions there is no 'old way of sorting'. I believe that made me unshift the default close action instead of pushing - actually not really paying attention to this. So, we can do two things
|
@jrieken yes, I took care of pushing the close action so that it comes last as before (see https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/api/node/mainThreadMessageService.ts#L52) I can add the reverse code so that we do not end up with behavioural change but @dbaeumer filed this bug exactly for this reason. I think the API should show the buttons in the order they are being passed to the message service and this is how it behaves now. I would say the "old way of sorting" was unintuitive and forced extension writers to reverse the order on their end. |
Created bug for TS. |
Steps:
Observe: the actions appear in reverse order in which they are provided. We should respect the order in which the actions are passed into the function.
The text was updated successfully, but these errors were encountered: