-
Notifications
You must be signed in to change notification settings - Fork 57
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
HTMLPopupElement - <popup> #599
Comments
Firstly, this is addressing a very real gap in the Web Platform and I'm happy to see work in that direction. If my understanding is correct, this proposal introduces a
Here are some thoughts. PositioningIt seems to me that the primary problems this is trying to solve are styling problems:
I think these are problems we should solve in CSS, rather than by introducing new "magic" that cannot be described fully in the UA stylesheet. Not only for separation of concerns, but also because this is more broadly useful and we wouldn't want people to have to wrap everything in a There are a few CSSWG threads on this, though there's definitely room for new proposals in this space: AnchoringI would suggest re-using the It would be useful to have a default anchor, just like It is unclear to me if
This could either be very useful, or very confusing, and I'm not sure which one it is. FocusOn
Are there use cases of showing the popup but not focusing it? On
I wonder if that is the actual gap here: it should be easier to determine what the first focusable descendant is. But I definitely see the point about exposing this via HTML so that authors don't have to write script. But is this something specific to Show and hideI would recommend adding an Layering
Even over |
@LeaVerou thanks for the great set of initial feedback here. I'm glad you think this is a useful addition. Responses below...
The only thing I want to clarify here, which ties to the comments below, is that the positioning of the popup has been delegated to a separate platform proposal, for "anchored positioning". This has not been put forth yet, but the current
See above. Really, I think the primary low-level problem that
Thanks for the feedback here. Consistency is important, but so is clarity. There is a discussion see this comment about naming, anchor positioning, and automatic (declarative) invokation. Those might require two separate attributes (e.g. "anchor" and "invokedby") that might need more verbose attribute names than just "for". Let's discuss further on the issue.
I definitely agree with this point. We need to figure out the mechanics of this, since theoretically any element could be an anchor. The <button im-the-anchor>
<div id=not-the-anchor>
<popup></popup>
</div>
</button> Suggestions appreciated here.
Hmm that's a very good point, which I don't think we've considered in the explainer. I would agree that since the
I agree that it might be confusing. As I've been implementing the prototype in Chromium, wrapping my head around this part has been tricky at times. Again, suggestions appreciated for ways to make it less confusing in practice.
@melanierichards for better examples here. But I think one is likely a "teaching bubble" that pops up on hover of some other control, but you wouldn't want focus to move to the bubble in that case.
One quick first comment is that I think we should call it
See this related comment from @domenic. It does seem like we should make sure One (potentially big?) issue with opening the popup declaratively is that only one popup can be open at a time (excepting "nested" popups) so the behavior might be a bit odd if more than one
|
I think the previous sibling or the parent are both reasonable defaults.
Providing declarative HTML-based ways to interact with UI controls has several benefits. Off the top of my head:
Therefore, I think removing The fact that only one popup can be open at a time is not a blocker; there is already precedent with radio buttons and their |
Hi folks, apologies that I am so woefully behind in responding to this issue, and many thanks to @LeaVerou for reviewing the proposal! Substantive changes to the proposal
Anchoring
Focus
|
Thanks @melanierichards for letting us know about this. I'm putting this on our agenda for next week and we hope to have feedback back to you by then. |
Thanks to @torgo and the rest of TAG! As a heads up, the Open UI CG resolved to take up this work item for incubation before we bring any formal changes to the HTML spec (we have shared the early ideas with WHATWG, however). This doesn't have any bearing on the design of the APIs as of yet, but I thought it might be useful to know where we'll first take up any TAG feedback. Thanks again! |
Thank you for the updates @melanierichards! It's good to see progress on this! We discussed this again this Monday, and concluded that since this is essentially a two-part proposal (the HTML element and the CSS positioning scheme it hooks into), we would need to see both parts to review it further. Without this essential component, it is difficult to properly evaluate things like the Therefore, we are going to close this early review and will continue to monitor open issues for a future review request where we can look at the entire proposal. There was also some discussion on lower level design decisions in the breakout that you might find useful. |
Thank you @LeaVerou & co, will re-file once we've got all our cohesive thoughts on anchored positioning down on paper! :) |
Hi @LeaVerou @hober @kenchris and @atanassov, wanted to share an update with you in case it's a good time to revisit this review. (Please let us know if a separate issue is preferable to reopening this one, thought it nice that the history was here)
CSS Anchored Positioning Scheme
Clearly, we're still early in co-designing a solution here for anchored positioning, but we wanted to prioritize giving the TAG a heads up. Thanks in advance! |
Thanks @melanierichards! |
HIQaH! QaH! TAG!
I'm requesting a TAG review of the
<popup>
element.A new HTML element,
<popup>
, which can be used to build transient user interface (UI) elements that are displayed on top of all other web app UI. These include user-interactive elements like action menus, form element suggestions, content pickers, and teaching UI. This new element is similar to<dialog>
, but has several important differences, including light-dismiss behavior, anchoring, and the lack of a "modal" mode.Does this specification allow an origin some measure of control over a user agent’s native UI?
--> The
<popup>
element allows author-provided popup dialogs to be shown to the user. These popups are fully-contained within the owning frame, and do not overlap either parent frames or the browser UI. So there shouldn't be any issue here. But I'm bringing it up for completeness.Further details:
You should also know that...
I like the TAG.
We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue and @-notify @mfreed7 and @melanierichards
The text was updated successfully, but these errors were encountered: