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

Extension host API should support custom close action in show*Message calls #5448

Closed
dbaeumer opened this issue Apr 18, 2016 · 6 comments
Closed
Assignees
Labels
api feature-request Request for new features or functionality
Milestone

Comments

@dbaeumer
Copy link
Member

dbaeumer commented Apr 18, 2016

  • VSCode Version: 1.0.0
  • OS Version:

The API currently always adds a close message. I want to use my own wording.

@dbaeumer dbaeumer added the api label Apr 18, 2016
@jrieken jrieken added this to the April 2016 milestone Apr 18, 2016
@jrieken
Copy link
Member

jrieken commented Apr 18, 2016

stretch for April

@jrieken jrieken added the feature-request Request for new features or functionality label Apr 18, 2016
@jrieken
Copy link
Member

jrieken commented Apr 20, 2016

We should have MessageOptions similar to how we have QuickPickOptions which allows to control this. Like

interface MessageOptions {
   excludeDefaultClose:boolean
}

@jrieken
Copy link
Member

jrieken commented Apr 22, 2016

@dbaeumer What would you prefer, explicit MessageOptions or alternatively a property on the MessageItem signalling it replaces Close?

Historically, I added the close action by default such that there is always an affordance to close when no message items are present. So with the MessageOptions someone could say don't show close but also provide no alternative which isn't valid. Moving the replaces close information into the MessageItem avoids that problem but someone could set that on all items which is a little bogus. What do you think?

@jrieken
Copy link
Member

jrieken commented Apr 22, 2016

spelled out

export interface MessageOptions {
 noClose: boolean;
}

export function showWarningMessage<T extends MessageItem>(message: string, options: MessageOptions, ...items: T[]): Thenable<T>;

// repeat for Info and Error...

or letting the MessageItem signal

export interface MessageItem {      
    title: string;
    isCloseAffordance?: boolean;
}

@dbaeumer
Copy link
Member Author

I like the second better.

@jrieken
Copy link
Member

jrieken commented Apr 23, 2016

deal

@jrieken jrieken assigned joaomoreno and unassigned jrieken Apr 28, 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
api feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants