8000 [lit-html] Add the `until` directive. by bicknellr · Pull Request #1389 · lit/lit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[lit-html] Add the until directive. #1389

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

Merged
merged 77 commits into from
Nov 13, 2020
Merged

[lit-html] Add the until directive. #1389

merged 77 commits into from
Nov 13, 2020

Conversation

bicknellr
Copy link
Member
@bicknellr bicknellr commented Oct 24, 2020

Fixes #1356. A few of the old tests are broken currently: some seem related to timing and others seem related to EventParts.

This PR also changes lit-html itself in a few ways:

  • Directives that are associated with an AttributePart are now passed their index in the AttributePart's values array.
  • setPartValue now takes an index when setting an AttributePart's value.

kevinpschaaf and others added 30 commits October 15, 2020 16:13
Fix lit-element import paths

For now, build template-shadowroot as part of lit-ssr

Add lit-ssr tests to CI

Fix merge error (Template:_options)

Remove tsconfig.tsbuildinfo

Uncomment element tests ffrom server-only suite

Fix return value of createRenderRoot patch
Rename $litPrivate -> $private

Fix demo hydration

README updates
Some minor cleanup included
Co-authored-by: Abdón Rodríguez Davila <a@abdonrd.com>
Rename Directive:resolve -> _resolve
Add comments
@bicknellr bicknellr changed the base branch from lit-next to lit-next-ssr October 28, 2020 01:27
@bicknellr
Copy link
Member Author

I merged lit-next-ssr and made it the base branch of this PR, but lit-next-ssr hasn't merged lit-next recently, so this PR's diff against it currently includes #1370 and possibly other changes.

bicknellr and others added 6 commits October 28, 2020 12:03
`_state` maps parts to the last set of values provided to a directive and the
index of the last value from that list that was rendered. It needs to be an
instance property because the mapping between parts and directives is not always
one-to-one. Particularly, for interpolated AttributeParts, the mapping can be
one-to-many, which can cause the multiple directives associated with that single
part to overwrite each other's state if they key only by the associated part.
Base automatically changed from lit-next-ssr to lit-next October 30, 2020 16:29
@bicknellr bicknellr marked this pull request as ready for review October 31, 2020 00:34
Copy link
Member
@kevinpschaaf kevinpschaaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevinpschaaf
Copy link
Member

Oh one more tiny thing, please update the README to remove until from the list of unimplemented directives.

@bicknellr
Copy link
Member Author

Ok, updated. I also found that it was listed as removed in the CHANGELOG so I removed that. I'll merge once the tests pass.

@bicknellr bicknellr merged commit df72b38 into lit-next Nov 13, 2020
@bicknellr bicknellr deleted the lit-next-until branch November 13, 2020 22:47
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

Successfully merging this pull request may close these issues.

[lit-html] Port until() to lit-html 2.0
3 participants
0