Implement Google WebComponents #1361

Open
opened 3 years ago by mattatobin · 10 comments
mattatobin commented 3 years ago (Migrated from github.com)
Owner
  • Custom Elements v1
  • Shadow DOM v1
  • HTML Templates
  • ES Modules

https://developer.mozilla.org/en-US/docs/Web/Web_Components

- [ ] Custom Elements v1 - [ ] Shadow DOM v1 - [x] HTML Templates - [x] ES Modules ---- https://developer.mozilla.org/en-US/docs/Web/Web_Components
wolfbeast commented 3 years ago (Migrated from github.com)
Owner

It is now late May -- I have to know what kind of timeline we're looking at here to decide on how to do releases in the summer. If things are expected to take considerably more time then maybe we need to push WebComponents back to the next milestone and make a redwood-based v29 a thing. I don't want to be hanging on a .9 for a long time, that gives the wrong signals to our users.

@g4jc realistically speaking, what are you looking at in terms of what has been done and what still needs doing to get a basic implementation of WebComponents into UXP? How close are we?

It is now late May -- I have to know what kind of timeline we're looking at here to decide on how to do releases in the summer. If things are expected to take considerably more time then maybe we need to push WebComponents back to the next milestone and make a redwood-based v29 a thing. I don't want to be hanging on a .9 for a long time, that gives the wrong signals to our users. @g4jc realistically speaking, what are you looking at in terms of what has been done and what still needs doing to get a basic implementation of WebComponents into UXP? How close are we?
g4jc commented 3 years ago (Migrated from github.com)
Owner

To get minimum working functionality (ignoring devtools work and just getting rendering working), we still need:

Shadow DOM v1

Based on the list, I feel we're close, but I could certainly use some/any help porting the remaining bugs, and some will not be portable (esp. any code working with CSS).

To get minimum working functionality (ignoring devtools work and just getting rendering working), we still need: [Shadow DOM v1](https://github.com/MoonchildProductions/UXP/issues/1375#issuecomment-643646975) Based on the list, I feel we're close, but I could certainly use some/any help porting the remaining bugs, and some will not be portable (esp. any code working with CSS).
mattatobin commented 3 years ago (Migrated from github.com)
Owner

Will that get Polymer v2 functioning? Eg YouTube.

Remember we also need Custom Elements and ES Modules to work with Polymer v2 as well.

Will that get Polymer v2 functioning? Eg YouTube. Remember we also need Custom Elements and ES Modules to work with Polymer v2 as well.
wolfbeast commented 3 years ago (Migrated from github.com)
Owner

Shadow DOM v1 {list}

Maybe close to getting ShadowDOM in but as stated (and also the opening post here) there are more parts to this than just ShadowDOM, so how close are we to ticking those 4 boxes? Is that something for June/July, or something for October (or later)?

> Shadow DOM v1 {list} Maybe close to getting ShadowDOM in but as stated (and also the opening post here) there are more parts to this than just ShadowDOM, so how close are we to ticking those 4 boxes? Is that something for June/July, or something for October (or later)?
g4jc commented 3 years ago (Migrated from github.com)
Owner

Here's a roadmap/overview of what's been done and where we still need to go to get this working from the DOM and CSS side. Can't speak for the ES Modules as I never worked on them, but we already have some basic functionality that was done long prior to this issue.

Custom Elements #1344

CustomElementRegistry.define()
Should already be fully implemented, as it was done by our original fork point.
https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define
Note: Autonomous custom element example does not appear to be working

CustomElementRegistry.get()
Definitely implemented long before fork point
https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/get

CustomElementRegistry.upgrade()
Already implemented and updated to v1 Spec.
https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/upgrade

CustomElementRegistry.whenDefined()
Already Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/whenDefined

HTML

<template>
Already Implemented.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template

<slot>
Already Implemented.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot

Methods:
Note: So far unable to confirm methods are working via tests.

HTMLSlotElement.assignedNodes()
Implemented
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes

HTMLSlotElement.assignedElements()
Implemented
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements

HTMLSlotElement: slotchange event
Implemented
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/slotchange_event

Elements

Element.attachShadow()
Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow

Element.shadowRoot()
Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/Element/shadowRoot

Element.part() - FF71+
--Not Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/Element/part
https://bugzilla.mozilla.org/show_bug.cgi?id=1505489 (Servo + XBL removal dependant)

Node
Node.isConnected()
Already Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected

Node.getRootNode()
Implemented via #1585
https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode

Event

Event.composed
Already implemented
https://developer.mozilla.org/en-US/docs/Web/API/Event/composed

Event.composedPath
Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
Note: Unable to confirm via reftest that this is working.

Slotable.assignedSlot
Implemented
https://developer.mozilla.org/en-US/docs/Web/API/Slotable/assignedSlot
Note: Unable to confirm via reftest that this is working.

CSS
:defined
--Not Implemented.
https://developer.mozilla.org/en-US/docs/Web/CSS/:defined

:host()
--Not Implemented. See #1593
https://developer.mozilla.org/en-US/docs/Web/CSS/:host()

::slotted()
--Not implemented. See #1592
https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted

::part
--Not Implemented.
https://developer.mozilla.org/en-US/docs/Web/CSS/::part

-webkit pseudo-element selectors
--Not Implemented.
https://bugzilla.mozilla.org/show_bug.cgi?id=1424106

Removal of :unresolved pseudo class
--Not Implemented.
https://bugzilla.mozilla.org/show_bug.cgi?id=1417829

DocumentOrShadowRoot
Basic implementation functional after split. See 43725c7264 and bbd59105da.

DocumentOrShadowRoot.activeElement
Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/activeElement

--Not Implemented:
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementFromPoint
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementsFromPoint
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/fullscreenElement
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/getSelection
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/pointerLockElement
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/styleSheets

Here's a roadmap/overview of what's been done and where we still need to go to get this working from the DOM and CSS side. Can't speak for the ES Modules as I never worked on them, but we already have some basic functionality that was done long prior to this issue. **Custom Elements** #1344 CustomElementRegistry.define() Should already be fully implemented, as it was done by our original fork point. https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define Note: Autonomous custom element example does not appear to be working CustomElementRegistry.get() Definitely implemented long before fork point https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/get CustomElementRegistry.upgrade() Already implemented and [updated to v1 Spec.](https://github.com/MoonchildProductions/UXP/commit/515c46e695f6cf0a66273e4744330ad7d23fe2cc) https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/upgrade CustomElementRegistry.whenDefined() Already Implemented. https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/whenDefined **HTML** `<template>` Already Implemented. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template `<slot>` Already Implemented. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot **Methods:** Note: So far unable to confirm methods are working via tests. HTMLSlotElement.assignedNodes() [Implemented](https://github.com/MoonchildProductions/UXP/commit/e31ed5b07466d4a579fe4b025f97c971003fbc3f) https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes HTMLSlotElement.assignedElements() [Implemented](https://github.com/MoonchildProductions/UXP/commit/222d316c835019ce64603180e4a73b231b788d76) https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements HTMLSlotElement: slotchange event [Implemented](https://github.com/MoonchildProductions/UXP/commit/3508e79b1fe7fc928eed2f3c7bf2d628c53fbf17) https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/slotchange_event **Elements** Element.attachShadow() [Implemented.](https://github.com/MoonchildProductions/UXP/commit/873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806) https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow Element.shadowRoot() [Implemented.](https://github.com/MoonchildProductions/UXP/commit/3a74795a56e92313c1b33a54500917794ba09b72) https://developer.mozilla.org/en-US/docs/Web/API/Element/shadowRoot Element.part() - FF71+ --Not Implemented. https://developer.mozilla.org/en-US/docs/Web/API/Element/part https://bugzilla.mozilla.org/show_bug.cgi?id=1505489 (Servo + XBL removal dependant) **Node** Node.isConnected() Already Implemented. https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected Node.getRootNode() [Implemented](https://github.com/MoonchildProductions/UXP/commit/8797b20746cd80c51cc56225f70ddea6c6b94f9d) via #1585 https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode **Event** Event.composed Already implemented https://developer.mozilla.org/en-US/docs/Web/API/Event/composed Event.composedPath [Implemented.](https://github.com/MoonchildProductions/UXP/commit/7e506bd98dab604062bfe12a44c096eb287721bf) https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath Note: Unable to confirm via reftest that this is working. Slotable.assignedSlot [Implemented](https://github.com/MoonchildProductions/UXP/commit/3a74795a56e92313c1b33a54500917794ba09b72) https://developer.mozilla.org/en-US/docs/Web/API/Slotable/assignedSlot Note: Unable to confirm via reftest that this is working. **CSS** :defined --Not Implemented. https://developer.mozilla.org/en-US/docs/Web/CSS/:defined :host() --Not Implemented. See #1593 https://developer.mozilla.org/en-US/docs/Web/CSS/:host() ::slotted() --Not implemented. See #1592 https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted ::part --Not Implemented. https://developer.mozilla.org/en-US/docs/Web/CSS/::part -webkit pseudo-element selectors --Not Implemented. https://bugzilla.mozilla.org/show_bug.cgi?id=1424106 Removal of :unresolved pseudo class --Not Implemented. https://bugzilla.mozilla.org/show_bug.cgi?id=1417829 **DocumentOrShadowRoot** Basic implementation functional after split. See https://github.com/MoonchildProductions/UXP/commit/43725c7264ca3f63de348d1d1596ce1fe9e64d2d and https://github.com/MoonchildProductions/UXP/commit/bbd59105da97200947ae62b2dc949a1130a40d75. DocumentOrShadowRoot.activeElement [Implemented](https://github.com/MoonchildProductions/UXP/pull/1591). https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/activeElement --Not Implemented: https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementFromPoint https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementsFromPoint https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/fullscreenElement https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/getSelection https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/pointerLockElement https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/styleSheets
wolfbeast commented 2 years ago (Migrated from github.com)
Owner

Signing off on ES modules. That part should now be complete.

Signing off on ES modules. That part should now be complete.
g4jc commented 2 years ago (Migrated from github.com)
Owner

Great news! That just leave us with CSS, Element.part, additional DocumentOrShadowRoot elements, and flipping the W3C Pointer events pref (#1630). CSS is the full stop road blocker at the moment, and my attempts to get any communication from people that wrote the code have fell fallen flat.

Great news! That just leave us with CSS, Element.part, additional DocumentOrShadowRoot elements, and flipping the W3C Pointer events pref (#1630). CSS is the full stop road blocker at the moment, and my attempts to get any communication from people that wrote the code have ~~fell~~ fallen flat.
Moonchild added a new dependency 8 months ago
Owner

@athenian200 While working through the GRE stuff (pretty much done with the most pertinent stuff now) I got really confused about how stuff was landed and why. there's a wchen-work branch that wasn't merged, stuff was landed on master then backed out then Tobin landed stuff and more backing out so i'm really not sure what the status is of it now on UXP or what needs to be done, which patches are correct or incorrect, etc.

Can you look into this please and let me know if there's something I should port across from GRE (anything in DOM and layout should probably cherry pick across without too much issue) or if you can re-land what should be re-landed, etc. etc.?

@athenian200 While working through the GRE stuff (pretty much done with the most pertinent stuff now) I got really confused about how stuff was landed and why. there's a wchen-work branch that wasn't merged, stuff was landed on master then backed out then Tobin landed stuff and more backing out so i'm really not sure what the status is of it now on UXP or what needs to be done, which patches are correct or incorrect, etc. Can you look into this please and let me know if there's something I should port across from GRE (anything in DOM and layout should probably cherry pick across without too much issue) or if you can re-land what should be re-landed, etc. etc.?
Moonchild added the
High Priority
label 8 months ago
Collaborator

I can tell you exactly what happened with that. He noticed an issue with menu bars appearing greyed out on Borealis and backed out my branch because I wasn't confident I could fix it. Then I did fix it, and he relanded it as this other patch called "First pass WebComponent support" or something that just contains the original branch plus one fix I made as one big patch. He said that my branch wouldn't land properly once it had been backed out before, and so he had to merge it all into one thing.

I can tell you exactly what happened with that. He noticed an issue with menu bars appearing greyed out on Borealis and backed out my branch because I wasn't confident I could fix it. Then I did fix it, and he relanded it as this other patch called "First pass WebComponent support" or something that just contains the original branch plus one fix I made as one big patch. He said that my branch wouldn't land properly once it had been backed out before, and so he had to merge it all into one thing.
Owner

I thought it wasn't merged in but it was, just has an extra commit at the end that makes it look like it wasn't merged.
I don't know why he squash-merged everything. He should have just backed out the merge (unless he didn't know how to do that, I guess... he could have asked...)

OK what I'll do is make a new branch on the current master and cherry-pick your wchen-work commits to it, as well as that final fix for part 1, and then you can see if everything is OK and make any additional changes necessary to that branch before we merge it. it should be clean that way since I skipped over all thsoe commits when porting stuff across because of the confusion.

I thought it wasn't merged in but it was, just has an extra commit at the end that makes it look like it wasn't merged. I don't know why he squash-merged everything. He should have just backed out the merge (unless he didn't know how to do that, I guess... he could have asked...) OK what I'll do is make a new branch on the current master and cherry-pick your wchen-work commits to it, as well as that final fix for part 1, and then you can see if everything is OK and make any additional changes necessary to that branch before we merge it. it should be clean that way since I skipped over all thsoe commits when porting stuff across because of the confusion.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Depends on
#1593 Implement :host pseudo class
MoonchildProductions/UXP
Reference: MoonchildProductions/UXP#1361
Loading…
There is no content yet.