-
Notifications
You must be signed in to change notification settings - Fork 33
GAUD-10267: use reactive state properties #7225
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -88,12 +88,12 @@ class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) { | |||
| * @type {string} | ||||
| */ | ||||
| text: { type: String }, | ||||
| _activeDimensionKey: { type: String, attribute: false }, | ||||
| _dimensions: { type: Array, attribute: false }, | ||||
| _activeDimensionKey: { state: true }, | ||||
| _dimensions: { state: true }, | ||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also not great:
And this one of ours might actually break:
So may need to undo this one.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think changing to But yeah, seeing consumers calling private members makes me want to double-down on switching all the non-reactive "private" members to use
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||||
| _displayKeyboardTooltip: { state: true }, | ||||
| _ignoreSlotChanges: { type: Boolean }, | ||||
| _minWidth: { type: Number, attribute: false }, | ||||
| _totalAppliedCount: { type: Number, attribute: false } | ||||
| _minWidth: { state: true }, | ||||
| _totalAppliedCount: { state: true } | ||||
| }; | ||||
|
|
||||
| static styles = [bodyCompactStyles, bodySmallStyles, bodyStandardStyles, heading4Styles, offscreenStyles, css` | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, not amazing but I think setting the property will still work:
https://github.com/Brightspace/d2l-manage-courses-ui/blob/6686d7278ab57c904d63e9fd4cf873290a404c0e/test/d2l-source-courses-view.test.js#L106
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. But... grrrr.