Visitar URL original
[lit-html]: Add partMap directive for dynamic part attributes by brysonbw · Pull Request #5376 · lit/lit · GitHub
Skip to content

[lit-html]: Add partMap directive for dynamic part attributes - #5376

Open
brysonbw wants to merge 2 commits into
lit:mainfrom
brysonbw:feat-part-map-1132
Open

brysonbw wants to merge 2 commits into
lit:mainfrom
brysonbw:feat-part-map-1132

Conversation

@brysonbw

@brysonbw brysonbw commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Add partMap directive that allows declarative building of the part attribute from an object of boolean flags, similar to classMap
  • Add DOMTokenMapDirective base class to share logic between space-delimited attribute directives (classMap and partMap)

Linked Issues Being Addressed

@changeset-bot

changeset-bot Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b29eb43

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
lit-html Minor
lit Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Introduce a new `partMap` directive that allows declarative building of the part attribute from an object of boolean flags, similar to `classMap`. Also, introducing `DOMTokenMapDirective` base class to share logic between space-delimited attribute directives.

Signed-off-by: brysonbw <brysonward77@gmail.com>

@louis-bompart louis-bompart left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the overall implementation is sound, however, there's a potential breaking change that slipped through + the use of a TypeScript enum

@brysonbw

Copy link
Copy Markdown
Contributor Author

I think the overall implementation is sound, however, there's a potential breaking change that slipped through + the use of a TypeScript enum

Smooth - thanks for the feedback

…e to const

Signed-off-by: brysonbw <77869922+brysonbw@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

3 participants