Skip to content
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

0.23.2 Release Notes #413

Closed
apapko opened this issue Jun 14, 2018 · 1 comment
Closed

0.23.2 Release Notes #413

apapko opened this issue Jun 14, 2018 · 1 comment

Comments

@apapko
Copy link
Collaborator

apapko commented Jun 14, 2018

LWC 0.23.2 Release Notes - Revert Forward and Fixes

We are being much more pragmatic about our alignment with shadow dom (which is still the eventual goal). In the 0.23.2 release, we're stepping back to our membrane (proxy) to stabilize and fix recent regressions. In the current release, it helped outline everything we need to do to prepare for shadow dom such as web driver mitigations and utils to help developers shift to shadow dom mindset (right way to get to the element they want).

ETA

EOD. This release has fixes for regressions and broken functionality so we need to get this out asap. Our goal for release communication is a week in advance. However, it's been hard for us to track fixes in advanced. Thanks for understanding.

CHANGES

Use util in jest tests to get correct querySelector

Reasoning for change: encapsulate to reduce manual updates in the future
Example of current way

element.shadowRoot.querySelector('.foo');

Example of correct way

import { getShadowRoot } from 'lwc-test-utils';
getShadowRoot(element).querySelector('.foo');

We are moving back to wrapping DOM nodes in proxies

  • Please be prepared to unwrap when necessary

event.target on async events will now resolve to the highest level element in the LWC component tree.

<slot> elements are now appearing in the DOM

  • Already in 0.22.x
  • Might break CSS selectors, and querySelector calls. It can also affect composition like <ul><slot>...<li>, and for that reason, those elements should not be used in composition, only use them if you fully control them in your own template

FIXES

childNodes property is now reporting the right value on elements from the template

eventTarget pointing to slotted elements is now correct

display CSS rule are now handled properly

No more warnings about using a field called state without the @track decorator

Manual mutations of properties in custom elements are now allowed

  • You can implement an input-like component that keeps the UI in sync with your internal state that represents the value of the input.
this.template.querySelector('my-custom-input').value = 'foo';

NEW

assignedSlot property for any element now works as expected

  • It points to the <slot> element that is slotting the element or null. Keep in mind that for shadows in closed mode, this property will always be null. As the moment, the mode defaults to open.
<my-paragraph>
  <span slot="my-text">Let's have some different text!</span>
</my-paragraph>
let slottedSpan = this.template.querySelector('my-paragraph span')
console.log(slottedSpan.assignedSlot); // logs '<slot name="my-text">'
@davidturissini davidturissini changed the title 0.23.1 Release Notes 0.23.2 Release Notes Jun 14, 2018
@apapko
Copy link
Collaborator Author

apapko commented Jun 19, 2018

Closing as this has been already published.

@apapko apapko closed this as completed Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant