-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
popover=hint #9776
Comments
Hm, in the explainer you say that hints shouldn't be nestable, but the reasoning given is just "it would be confusing for one hint to be nested inside another, and wouldn’t make sense". I don't think I agree! Looking at examples of hint-like popovers in game UIs, nestable hints are not uncommon. For example, Crusader Kings 3 has this behavior - you can hover a term to get a small explanation box, which can itself contain terms you can hover to get more information, and so on. That's a very useful UI behavior for CK3, which is super info-dense. Could you elaborate on why you believe hints are best left unnestable? |
I guess we would consider that a popover=auto with popover=hints inside of it.
I'll defer this question to @mfreed7 |
Nope, because you can go three, four, five hints deep when exploring concepts. (I haven't checked if there's a limit, actually, but I know it can go several deep at least.) Plus there's the implication of a semantic difference between |
this sounds like an awful UI for anyone who isn't using a mouse if these are only available on hover. but if they're not - and these individual items can be focused and opened, then it again sounds like a popover=auto that someone could extend to show up on hover. |
+1 to the comments that this sounds a lot like a
In your example, you have multiple nested popovers, so #1 isn’t true. And I’d guess that if you can have 5 nested menus open in one “stack”, it’d be very confusing to leave another such stack open, so I’d guess #2 probably isn’t true either. Both |
I'm sorry, I think you're not quite understanding my example. The Crusader Kings example is, explicitly, tooltips that are nestable. You hover one term, get a tooltip. You hover a term in that tooltip, you get a second tooltip. You hover a term in that tooltip, you get a third tooltip. And if you click back into the second tooltip, the third closes. If you go and hover a term elsewhere in the UI, it closes the previous stack and opens a new one. One stack open at a time, and generally ephemeral. This is 100% exactly the "hint" behavior/semantics that you're talking about, not the "auto" behavior/semantics. It's just nestable. |
Right - I understood this. And it’s a 100% perfect description of how
It’s not, though. The only similarity is that you’re calling it a “tooltip”. Behaviorally it’s not at all what’s proposed for |
Hm, if my example isn't a tooltip then I'm not sure what a tooltip is. Let's go back to the basics for a second. Can you elaborate on the assertion "it would be confusing for one hint to be nested inside another, and wouldn’t make sense"? This is simply asserted in the explainer and not given further reasoning, and it's the crux of what I'm disagreeing with. |
I think it is a fairly straightforward/true statement that historically the things called tooltips aren't nestable. You can look back at old mac or windows things like https://learn.microsoft.com/en-us/windows/win32/uxguide/ctrl-tooltips-and-infotips, for example. Even many APIs for them (like the title attribute we have or in QML) are just designed to take a string, so it's not even an option by design. Things like Material design list its limits as simple and even show "Don’t display rich information and imagery on tooltips" among its limited advice.... And yet our own research in openui shows exactly that in Material web and that some others do too. Wikipedia allow rich styling content in tooltips - but they're never nested and as far as I can tell don't ever contain anything interactive or hoverable themselves in content (they do all seem to contain a button/link for configuration that I can't actually figure out how to tab to though which illustrates part of the challenge). I do think we continue to have this problem where things are always evolving and the more the web and games and intersting new devices get involved, the more ideas smash together and lines get blurred. APG says
So... I guess that's a non-modal, light-dismissable dialog or some other kind of popover auto? Or just hard to name like every species because it is just a slight variation on other things? |
Thanks @bkardell - that's basically what I was basing the behavior on. I don't have detailed research showing that, I assumed (at least when writing the explainer) that it was just "true". Perhaps the best way to phrase this is in the reverse direction? I.e. a Said another way, this table in the explainer describes the three available sets of behavior. Choose the one you want. Don't assume "tooltip" === "hint". (If it did, we'd have called it |
It's fine if the answer ends up being "not nestable", I just want to make sure it's well-reasoned, not glossed over as it appeared to be. If hints were nestable, would that be problematic or complicated in some way? If so, then cool, keep them unnestable. If not, tho, I'd prefer a little more justification for the restriction than "I hadn't seen any nested hint-like stuff before". |
If hints were nestable, then there would almost be no need for
The Crusader Kings 3 use case falls squarely into the I'll see whether I can pull together enough examples to prove that the middle column is worth having. |
I don't think the lack of an ability is generally a justification by itself. ^_^ But I also don't think it's right that nestable hints are just identical to auto. The implied transience of hints is the important bit, I thought - opening an auto popup closes other (non-ancestor) auto popups, but opening a hint doesn't. At least, that's the part that stood out to me, when reading the explainer, and it seemed like a useful and probably worthwhile distinction to make. |
I think it definitely can be a justification, if that ability is more often than not bad. I.e. if it's "bad" in some way to nest tooltips, then I don't think it's a good idea to just allow nesting and hope that most developers don't use it. I'd rather guide them to the right behavior so they don't shoot themselves in the foot.
Right - if hints are nestable, then "hint" is just another "auto" that has slightly lower precedence. I've heard exactly one use case for this: Crusader Kings 3. If that's the use case, then I'd propose we ship Let me (or someone) gather some data and come back here. |
I'm pretty sure I saw this pattern in some other games which have an extensive lore, and have various terms which you can hover in a nested way. Our design system also provides this: Screen.Recording.2023-10-05.at.19.44.50.movThough, at least internally, this is done via a Our tooltips don't auto-hide other tooltips, unless used in “groups” (using the “singleton” method from Tippy.js). Popovers, on the other hand, do close others by default, but we have a prop that controls that. As an author I would prefer to have more granular control, with the |
|
Gmail has the same thing: floating contact cards with buttons that have tooltips. (Tooltips there are already custom.) |
Just a quick note that I've updated the explainer fairly significantly, and in particular, I've added a footnote next to the "Nesting" row of the table: https://open-ui.org/components/popover-hint.research.explainer/#proposal-popoverhint It does seem, from the examples provided here (e.g. Gmail and Github) plus some of the discussion we had in OpenUI, that it might be better to support nesting for hints. Essentially there would be two independent stacks of popovers, one for If that makes folks here happy, then the next step would be to take a fresh look at the spec PR and make some adjustments. Before we do that, I just want to check-in here to make sure I've understood the feedback. |
Hearing nothing, I'm going to assume that means there are no objections to this new direction. I'll go ahead and update the explainer and the spec PR accordingly. |
The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf
The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf
One very common scenario is the And the thumb of the input range is in Shadow DOM, can we use CSS Anchor to follow it? |
Right now, in Chrome Canary, anchor positioning can target the range's thumb. I did write a brief note about this at one point in my blog: https://blog.kizu.dev/input-range-thumb/#to-the-point As I write in this post, the question will be: is this something that will be interoperable when other browsers would catch up? Unless the specs will explicitly specify that the inner elements from the native controls' Shadow DOM must accept and work with things like But, at least, we can prototype things like that in Chrome for the moment, see how useful it is, and pressure other browsers to support it in the same way. |
@kizu Thanks for the article, I wrote a Demo along your lines. https://codepen.io/yisi/pen/jOJWLve
Yes, as far as I know, there is a whitelist of which properties are allowed for pseudo-elements inside input in browsers. As long as the specification is clear, I don't think interoperability is too much of a problem. |
So this is a good point, but I think it belongs in the issue discussing |
The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf
The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf
The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5133909 Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1246573}
The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5133909 Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1246573}
The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5133909 Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1246573}
…stack of hints, a=testonly Automatic update from web-platform-tests Update popover=hint behavior to allow a stack of hints The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5133909 Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1246573} -- wpt-commits: 51c87dc4c5d4a61caef22344e4dba6f5f233ffc3 wpt-pr: 43737
…stack of hints, a=testonly Automatic update from web-platform-tests Update popover=hint behavior to allow a stack of hints The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5133909 Reviewed-by: Joey Arhar <jarharchromium.org> Commit-Queue: Mason Freed <masonfchromium.org> Auto-Submit: Mason Freed <masonfchromium.org> Cr-Commit-Position: refs/heads/main{#1246573} -- wpt-commits: 51c87dc4c5d4a61caef22344e4dba6f5f233ffc3 wpt-pr: 43737 UltraBlame original commit: fcb792a0665afea5e736dd56c36dc1d59340362a
…stack of hints, a=testonly Automatic update from web-platform-tests Update popover=hint behavior to allow a stack of hints The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5133909 Reviewed-by: Joey Arhar <jarharchromium.org> Commit-Queue: Mason Freed <masonfchromium.org> Auto-Submit: Mason Freed <masonfchromium.org> Cr-Commit-Position: refs/heads/main{#1246573} -- wpt-commits: 51c87dc4c5d4a61caef22344e4dba6f5f233ffc3 wpt-pr: 43737 UltraBlame original commit: fcb792a0665afea5e736dd56c36dc1d59340362a
…stack of hints, a=testonly Automatic update from web-platform-tests Update popover=hint behavior to allow a stack of hints The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5133909 Reviewed-by: Joey Arhar <jarharchromium.org> Commit-Queue: Mason Freed <masonfchromium.org> Auto-Submit: Mason Freed <masonfchromium.org> Cr-Commit-Position: refs/heads/main{#1246573} -- wpt-commits: 51c87dc4c5d4a61caef22344e4dba6f5f233ffc3 wpt-pr: 43737 UltraBlame original commit: fcb792a0665afea5e736dd56c36dc1d59340362a
…stack of hints, a=testonly Automatic update from web-platform-tests Update popover=hint behavior to allow a stack of hints The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5133909 Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1246573} -- wpt-commits: 51c87dc4c5d4a61caef22344e4dba6f5f233ffc3 wpt-pr: 43737
Is it possible to test popover=hint in Chrome Canary now? I don't see any examples of triggering via hover in the explainer. |
Yes, by enabling chrome://flags/#enable-experimental-web-platform-features it should work.
See this section, please. The hover triggering behavior is covered by the Invokers proposal. |
FYI an issue was opened which had a use case which would be perfectly handled by this proposal: #10123 |
How does this map to AT? Is there a PR for that as well? I still have a hard time making sense of the explainer unfortunately and it does seem a bit weird still we're decoupling this from how they are invoked. So if I understand it correctly the plan is to merge the popover / fullscreen / dialog stacks so they all nest together. And then popover=hint could be seen as a parallel stack to that? Is there going to be a desire for more parallel stacks? |
I assume you mean the focus management? As with other
Sorry - if you have specific questions about the explainer I can try to clarify. There is an explicit section that discusses why they're decoupled.
The fullscreen/dialog "nesting" will work in the same way for |
A comment was made on the OpenUI issue for the naming of The question is: which is better,
I'm going to Agenda+ this to discuss live. |
So we just discussed this in WHATNOT, and while we didn't reach a consensus, we did split out these two questions:
For the second question, please see the spec PR and add comments there! The short answer is that it establishes a second stack of popovers which is subordinate to the existing For the first question, in terms of potential "behavior words", OpenUI spent many meetings and Github polls trying to come up with the best such word. The primary issue for that was openui/open-ui#532. In many votes and discussions, "hint" was the overwhelmingly popular choice. The difficulty is that the behavior (as mentioned above) is "establishes a second stack of popovers which is subordinate to the existing |
For "establishes a second stack of popovers which is subordinate to the existing popover=auto stack", maybe |
The previous implementation only allowed one popover=hint to be open at a time. Per conversation at [1], developers feel that it should be possible to nest popover=hint popovers. This CL implements that capability. There are now two popover stacks in Document: PopoverAutoStack and PopoverHintStack. Since it is possible to nest hints within autos, the PopoverAutoStack can contain hints. However, there are a few constraints: - The PopoverHintStack only ever contains hints. - Once the PopoverAutoStack contains a hint, all subsequent popovers in the stack must also be hints. - A popover=hint can never be the ancestor of a popover=auto. The light dismiss behavior is roughly the same as before, with a slight tweak that simplifies behavior: closing anything in the PopoverAutoStack will always close everything in the PopoverHintStack. That was not the case before, but it was a bit of a weird corner case. Note that I found a crasher (happens in stable, with just auto popovers) that I added a test for here. The bug for that is crbug.com/1513282. I'll fix that in a followup. [1] whatwg/html#9776 (comment) Bug: 1416284,1513282 Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5133909 Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1246573}
Since the comment above, there have been relatively few further comments or name suggestions. Of the two issues:
@domenic has been nice enough to offer a review of the spec PR, so I think this is moving along. Again, other comments about behavior should be directed there, but it seems like we're converging.
This is the open question. Given the lack of further input, the fact that web developers seem to support |
I still think hint is the right thing |
Quick note here that we discussed this in WHATNOT and agreed that the naming (
|
FWIW, the main problem with the name that came up is that "hint" doesn't really form a coherent set with "auto" and "manual". But I'm not sure how to solve for that. |
I'd like to propose a new value for the popover attribute:
hint
.Explainer here: https://open-ui.org/components/popover-hint.research.explainer/#popoverhint-behavior
Hint popovers can be light dismissed like auto popovers, but there can only be one hint open at a time in a page.
The text was updated successfully, but these errors were encountered: