-
Notifications
You must be signed in to change notification settings - Fork 193
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
[Popup] Should light dismiss be cancellable on popup? #321
Comments
My personal opinion remains: I recognize authors will want to cancel dismissal, but I think this could open up a vector for abuse. I would rather we try and explore solutions to the legitimate use cases for cancelling popup dismissal, e.g. an event or pseudo selector authors can hook into in order to style popups / animate them out as they are dismissed. |
FYI I started #335 to brainstorm / discuss how we could animate popups appearance / dismissal. |
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. |
We need to re-think the requirements for this issue, in the context of the new Popup API. In the new explainer, hiding the popup can be overridden via developer CSS (e.g. set |
Increasingly, I think this is a key point of difference between popups and As I mentioned in #335 (comment), I think this issue of cancelability can be separated from the ability to animate show/hide. So the only question (IMHO) is whether there's a use case for cancelling the hide of popups. |
Increasingly, it seems to me like an anti-pattern to allow canceling the |
The Open UI Community Group just discussed
The full IRC log of that discussion<gregwhitworth> Topic: [Popup] Should light dismiss be cancellable on popup?<gregwhitworth> github: https://github.com//issues/321 <gregwhitworth> masonf: the question is there are shown and hide events <gregwhitworth> masonf: should they be canceleable <una> q+ <gregwhitworth> masonf: currently they are not - my opinion is that they should not be canceleable <gregwhitworth> masonf: we've spent a ton of time trying to get all of the behaviors to get right and allowing an easy developer override will end up being a footgun <gregwhitworth> masonf: they may result in a11y issues <gregwhitworth> masonf: there is an out, if you want to more easily control that then popup=async give you the control you may be looking for <gregwhitworth> masonf: there are other more complicated cases, such as a full screen element is shown we need to force close the popups we would have to make the events not canceleable <gregwhitworth> ack una <masonf> q+ <gregwhitworth> una: it seems like it doesn't bring up any usecases, I'm inclined to not rock the boat <gregwhitworth> una: I'm not seeing anything and we can re-visit this <JonathanNeal> +1 to making it not-cancel-able. As popups contrast with `<dialog>`, popups feel more “temporary”, and I don’t see a use-case to make popups more like dialogs. <gregwhitworth> ack masonf <gregwhitworth> masonf: one more thing, there is a potential for a usecase for animations <gregwhitworth> masonf: we have an issue opened to solve animations being better <una> gregwhitworth: when i was doing early mockups on web components, i found being able to cancel the events valuable so I could hijack the behaviors and do something different <JonathanNeal> +1 to what una says. I would prefer animations be handled in a different way than by allowing programatic cancellation. <una> gregwhitworth: the capability of doing slotting in a lot of ways and the async approach is much more elegant <JonathanNeal> As the issue mentions, authors could do “bad” things by using CSS to force the display of the popup, or potentially in the future by creating a never ending animation that _stalls_ the popup from closing. <una> gregwhitworth: i didnt like it because i was undoing alot of the logic and had to re-author it, so i would +1 to the earlier a11y point because they're so intertwined, you end up having to cancel a lot of the events <una> gregwhitworth: and I'm wanting to not cancel them all so +1 to not making them cancelable <una> gregwhitworth: to provide the use case, I wanted to pivot from just down to showing hte scrollwheel touch event on mobile (inertia on scrolling) <una> gregwhitworth: definitely required different logic, but again doesnt have to do with these exact events <gregwhitworth> masonf: just to throw it out there, there may be usecases like that and I think popup=async without actually breaking the more defined usecases <gregwhitworth> q? <masonf> Proposed resolution: the `show` and `hide` events should not be cancelled. <JonathanNeal> +1 to the proposed resolution <masonf> Proposed resolution: the `show` and `hide` events should not be cancelable. <JonathanNeal> +1 to the fixed proposed resolution. <dandclark> +1 <masonf> RESOLVED: the `show` and `hide` events should not be cancelable. <masonf> thanks tantek <tantek> is here for your W3C obscura <gregwhitworth> Zakim, end meeting <Zakim> As of this point the attendees have been scotto_, miriam, JonathanNeal, masonf, bkardell_, stephstimac, una, tantek, flackr, dandclark <Zakim> RRSAgent, please draft minutes <RRSAgent> I have made the request to generate https://www.w3.org/2022/05/26-openui-minutes.html Zakim |
On MS Edge Explainers #457, @mfreed7 asked:
@domenic said:
The text was updated successfully, but these errors were encountered: