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

[invokers] Should invokers toggling a dialog close or cancel? #937

Closed
keithamus opened this issue Nov 6, 2023 · 4 comments
Closed

[invokers] Should invokers toggling a dialog close or cancel? #937

keithamus opened this issue Nov 6, 2023 · 4 comments
Assignees

Comments

@keithamus
Copy link
Collaborator

keithamus commented Nov 6, 2023

Right now the explainer for invokers suggests that any of the toggle actions should cancel the dialog.

<dialog id=d>
  <button invokertarget=d>This will cancel the dialog</button>
</dialog>

The cancel event is fired when a CloseWatcher closes a dialog, it currently doesn't fire for buttons, so having these buttons cancel the dialog would be somewhat new behaviour.

My vote is that they should close instead of cancel, but I'd like to hear others' thoughts.

/cc @lukewarlow @mfreed7 @scottaohara @domenic

@lukewarlow
Copy link
Collaborator

For me it would make sense for cancel buttons to cancel and submit buttons to close.

Given we can't know the intent for toggles I think close is the better approach.

I do think a cancel action is useful separate to the toggle ones though.

@lukewarlow lukewarlow added the agenda+ Use this label if you'd like the topic to be added to the meeting agenda label Nov 7, 2023
@scottaohara
Copy link
Collaborator

scottaohara commented Nov 9, 2023

by cancel you mean button/input type=reset?

what would button type=button do?

Edit: the call today clarified my question, and i was mistakenly thinking that input type=reset also closed dialogs.

@css-meeting-bot
Copy link

The Open UI Community Group just discussed [invokers] Should invokers toggling a dialog close or cancel?, and agreed to the following:

  • RESOLVED: closing a dialog from an invoker will not dispatch a cancel event
The full IRC log of that discussion <jarhar> keithamus: the close button or default/auto behavior for an invoke button inside the dialog
<bkardell_> close
<jarhar> keithamus: could be toggle togglemodal or close
<jarhar> keithamus: should it fire the cancel event?
<bkardell_> it should not fire *a* cancel event
<jarhar> masonf: the auto action is going to be togglemodal, so if the modal is already open its close
<keithamus> Proposed resolution: closing a dialog from an invoker will not dispatch a cancel event
<Luke> +1
<jarhar> +1
<keithamus> RESOLVED: closing a dialog from an invoker will not dispatch a cancel event

@lukewarlow lukewarlow removed the agenda+ Use this label if you'd like the topic to be added to the meeting agenda label Nov 9, 2023
@lukewarlow lukewarlow self-assigned this Nov 16, 2023
@mfreed7 mfreed7 closed this as completed Mar 21, 2024
@mfreed7 mfreed7 reopened this Mar 21, 2024
Copy link

There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants