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

Expose checkbox in extension dialog API #145696

Open
sandy081 opened this issue Mar 22, 2022 · 7 comments
Open

Expose checkbox in extension dialog API #145696

sandy081 opened this issue Mar 22, 2022 · 7 comments
Assignees
Labels
api dialogs Issues with native and custom dialogs feature-request Request for new features or functionality
Milestone

Comments

@sandy081
Copy link
Member

Testing #145525

image

Don't show again should be a checkbox instead of button. It is not an action. Sync or Do not Sync are actions. I would choose one action and check Don't show again option.

@chris-miner
Copy link

This would be a nice bit of UI for any of the "don't show again" buttons. For example, the file extensions pop-up that offers to help find marketplace extensions:

Screen Shot 2022-03-23 at 11 11 05

It has an easily clickable button for "Don't Show Again". Unfortunately, (based on a search that lead me here) there doesn't seem to be a way to undo that preference if you accidentally click the button rather than the other one. "Don't Show Again" is a setting (workspace or user) so I agree with @sandy081 that it probably shouldn't be fronted by a button, which implies something else. And in any case, one ought to be able to easily change a setting through the UI.

@joyceerhl
Copy link
Contributor

@sandy081 Do extensions have the ability to contribute checkboxes in modal dialogs?

@sandy081
Copy link
Member Author

I do not know. @bpasero may be the right person to reply

@bpasero
Copy link
Member

bpasero commented Mar 23, 2022

I think that is not possible today because the API is pretty much shared between notifications and dialogs.

@bpasero
Copy link
Member

bpasero commented Mar 23, 2022

I wonder if we need to start thinking about an independent dialog API extensions can use with all the supports we have in core. Especially when we decide to give the user more control over disabling notifications, we will see extensions use modal dialogs more and I think we have to be prepared for that and avoid dialogs that are not following our patterns.

//cc @sbatten @jrieken

@joyceerhl joyceerhl changed the title Don't show again option should be a check box Expose checkbox in extension dialog API Dec 6, 2022
@joyceerhl joyceerhl assigned bpasero, jrieken and sbatten and unassigned joyceerhl Dec 6, 2022
@bpasero bpasero added api dialogs Issues with native and custom dialogs labels Dec 7, 2022
@bpasero bpasero removed their assignment Dec 7, 2022
@jrieken jrieken removed their assignment Dec 7, 2022
@jrieken jrieken added the feature-request Request for new features or functionality label Dec 7, 2022
@sbatten sbatten added this to the Backlog milestone Dec 29, 2022
@sbatten
Copy link
Member

sbatten commented Dec 29, 2022

Today we have the stable:

export interface MessageOptions {
/**
* Indicates that this message should be modal.
*/
modal?: boolean;
/**
* Human-readable detail message that is rendered less prominent. _Note_ that detail
* is only shown for {@link MessageOptions.modal modal} messages.
*/
detail?: string;
}

and proposed:

export interface MessageOptions {
/**
* Do not render a native message box.
*/
useCustom?: boolean;
}

My first suggestion is that we update the modal property from a boolean to a ModalOptions bag which can take checkbox information and possibly the custom property.

@sbatten
Copy link
Member

sbatten commented Dec 29, 2022

Oh I see detail is for modals only as well. That's fairly suspicious that all of the MessageOptions properties apply to dialogs only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api dialogs Issues with native and custom dialogs feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

6 participants