Skip to content
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

Closed
dbaeumer opened this issue Aug 31, 2016 · 7 comments
Closed

Message service show action buttons in reverse order #11311

dbaeumer opened this issue Aug 31, 2016 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded

Comments

@dbaeumer
Copy link
Member

  • VSCode Version: 1.5

Steps:

  • show a message with actions.

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.

@dbaeumer
Copy link
Member Author

@bpasero as discussed we should look into the early September.

@jrieken FYI.

@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Aug 31, 2016
@bpasero bpasero closed this as completed in a1a5ad0 Sep 5, 2016
@bpasero
Copy link
Member

bpasero commented Sep 5, 2016

@dbaeumer pushed the fix and adopted all places in the workbench but each extension needs to adopt this change too now.

@jrieken
Copy link
Member

jrieken commented Sep 5, 2016

@bpasero How about us handling that instead of asking all extensions to update?

@bpasero
Copy link
Member

bpasero commented Sep 5, 2016

@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).

@jrieken
Copy link
Member

jrieken commented Sep 5, 2016

extension relied on the old way of sorting actions?

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

  • reverse actions here such that we don't introduce behavioural breakage
  • push the close action such that the default close commands come last (as today)

@bpasero
Copy link
Member

bpasero commented Sep 5, 2016

@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.

@dbaeumer
Copy link
Member Author

dbaeumer commented Sep 6, 2016

Created bug for TS.

@ramya-rao-a ramya-rao-a added the verified Verification succeeded label Sep 29, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants