Skip to content

GAUD-10267: use reactive state properties#7225

Merged
dlockhart merged 2 commits into
mainfrom
GAUD-10267/use-reactive-state
Jul 16, 2026
Merged

GAUD-10267: use reactive state properties#7225
dlockhart merged 2 commits into
mainfrom
GAUD-10267/use-reactive-state

Conversation

@dlockhart

@dlockhart dlockhart commented Jul 15, 2026

Copy link
Copy Markdown
Member

Converts core from the old way to do "internal" state to use reactive state properties.

The only potential issue with this conversion would be if someone was doing a property binding (e.g. <d2l-floating-buttons ._containerMarginLeft="5px">), which... hopefully isn't being done because that's gross.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-7225/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

text: { type: String },
_activeDimensionKey: { type: String, attribute: false },
_dimensions: { type: Array, attribute: false },
_activeDimensionKey: { state: true },

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Yeah. But... grrrr.

_activeDimensionKey: { type: String, attribute: false },
_dimensions: { type: Array, attribute: false },
_activeDimensionKey: { state: true },
_dimensions: { state: true },

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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 don't think changing to state: true will cause breakage here, but maybe I am missing something.

But yeah, seeing consumers calling private members makes me want to double-down on switching all the non-reactive "private" members to use #.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed 💯. I've confirmed that these still work -- there's actually nothing in Lit that prevents them from being set as properties, which makes sense.

I feel like it's still worthwhile to make the change, even though consumers are referencing these.

@dlockhart
dlockhart marked this pull request as ready for review July 16, 2026 14:36
@dlockhart
dlockhart requested a review from a team as a code owner July 16, 2026 14:36
@dlockhart
dlockhart enabled auto-merge (squash) July 16, 2026 16:39
@dlockhart
dlockhart merged commit bf49957 into main Jul 16, 2026
11 checks passed
@dlockhart
dlockhart deleted the GAUD-10267/use-reactive-state branch July 16, 2026 16:50
@d2l-github-release-tokens

Copy link
Copy Markdown

🎉 This PR is included in version 3.271.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants