-
Notifications
You must be signed in to change notification settings - Fork 198
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] What about de-hover/de-focus? #905
Comments
If I'm understanding the question, I think this is covered by the |
You are of course correct. I forgot about that part of the proposal, and my quick search failed to find it. I think that sounds like a reasonable way to do things. It has a few differences as compared to my popover-specific proposal:
Have you thought about #2? Did I just miss it also in the explainer? (I did a better search this time, I think.) |
Regarding 1; can you expand on this please? I'm not fully sure I understand. Do you mean if the popover is first opened programmatically, or is the use-case around multiple input modalities? Regarding 2; I agree control is useful and specifying it in CSS seems right to me (modulo a11y concerns?). I wonder if there is a general purpose solution to this though, as I suggested in #781 and subsequently w3c/csswg-drafts#9062. A few of us (including Tab) discussed this at TPAC (after-hours), and I got the sense that there's a few ideas we could try, we just need to come up with something tenable. My ideas (which may be terrible) are:
:is([popover], dialog, details):showing {
animation: fade-in 200ms;
animation-delay: 2s; /* :showing will last as long as this (getcomputedstyle?) */
}
:is([popover], dialog, details):hiding {
animation: fade-out 200ms;
animation-delay: 2s; /* :hiding will last as long as this (getcomputedstyle?) */
}
dialog -> dialog[open] {
animation: fade-in 200ms;
}
dialog[open] -> dialog:not([open]) {
animation: fade-out 200ms;
}
@entry {
[popover] {
opacity: 0;
}
}
[popover] {
display: block;
transition: opacity 0.2s display 0.2s;
} |
Yes, that's what I mean. You call
Great!
My main concern is just that these are ergonomic. When we originally designed the popover API, you could just do I'm supportive of a "general purpose" solution, as long as its ergonomic. I'm not saying any of your suggestions isn't ergonomic, just making sure we're thinking about it. One additional wrinkle to perhaps include in the explainer: some design systems (more and more over time) don't just consider de-hovering the invoker and the invokee, they build a "triangle" between them that preserves the hovered state. Seems like maybe (?) we should include this in what it means to "lose interest"? |
That sounds great, I'm not experienced enough with the intricacies of it all to know how tenable this would be. Is it implementable? I'd come in with the caveat that users will likely want whatever popover has to also apply to dialog.
That's a great shout out. Let's land keithamus/invokers-polyfill#29 and then we can talk about some prose to handle this. |
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. |
I assume this is resolved and just needs edits? Or maybe those edits are done? |
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. |
I'm going to close this issue in favor of the one happening on #1064. |
In my original popover hover-triggering explainer, and in the CSSWG discussion, there are actually two hover/focus related triggers:
Is the second behavior considered in this proposal? Should it be? Perhaps that's just a separate feature that relates only to popovers? I ask because you've very creatively weaved this proposal into a nice, general thing for all kinds of features, not just popovers. Perhaps you can work the same magic for the de-hover case?
The text was updated successfully, but these errors were encountered: