Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions components/button/floating-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class FloatingButtons extends LoadingCompleteMixin(LitElement) {
* @type {boolean}
*/
alwaysFloat: { type: Boolean, attribute: 'always-float', reflect: true },
_containerMarginLeft: { attribute: false, type: String },
_containerMarginRight: { attribute: false, type: String },
_containerMarginLeft: { state: true },
_containerMarginRight: { state: true },
_floating: { type: Boolean, reflect: true },
_innerContainerLeft: { attribute: false, type: String }
_innerContainerLeft: { state: true }
};

static styles = css`
Expand Down
2 changes: 1 addition & 1 deletion components/demo/demo-snippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DemoSnippet extends LitElement {
overflowHidden: { type: Boolean, reflect: true, attribute: 'overflow-hidden' },
_code: { type: String },
_fullscreen: { state: true },
_hasSkeleton: { type: Boolean, attribute: false },
_hasSkeleton: { state: true },
_settingsPeek: { state: true },
_skeletonOn: { type: Boolean, reflect: false }
};
Expand Down
2 changes: 1 addition & 1 deletion components/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Dialog extends PropertyRequiredMixin(LocalizeCoreElement(AsyncContainerMix
* The preferred width (unit-less) for the dialog
*/
width: { type: Number },
_hasFooterContent: { type: Boolean, attribute: false }
_hasFooterContent: { state: true }
};

static styles = [_generateResetStyles(':host'), dialogStyles, heading3Styles, css`
Expand Down
8 changes: 4 additions & 4 deletions components/filter/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },

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.

_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.

_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`
Expand Down
2 changes: 1 addition & 1 deletion components/form/demo/form-panel-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { inputStyles } from '../../inputs/input-styles.js';
class FormPanelDemo extends LitElement {

static properties = {
_expanded: { type: Boolean, attribute: false }
_expanded: { state: true }
};

static styles = [heading3Styles, inputStyles, css`
Expand Down
2 changes: 1 addition & 1 deletion components/form/form-element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const FormElementMixin = superclass => class extends LocalizeCoreElement(
* @ignore
*/
childErrors: { type: Object, attribute: false },
_errors: { type: Array, attribute: false }
_errors: { state: true }
};

constructor() {
Expand Down
2 changes: 1 addition & 1 deletion components/form/form-error-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class FormErrorSummary extends LocalizeCoreElement(LitElement) {

static properties = {
errors: { type: Object, attribute: false },
_expanded: { type: Boolean, attribute: false },
_expanded: { state: true },
_hasTopMargin: { type: Boolean, attribute: '_has-top-margin', reflect: true },
_hasErrors: { type: Boolean, attribute: '_has-errors', reflect: true },
};
Expand Down
2 changes: 1 addition & 1 deletion components/inputs/input-date-time-range-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class InputDateTimeRangeTo extends SkeletonMixin(LocalizeCoreElement(LitElement)
* @type {boolean}
*/
topMargin: { attribute: 'top-margin', type: Boolean },
_blockDisplay: { attribute: false, type: Boolean }
_blockDisplay: { state: true }
};

static styles = [super.styles, bodySmallStyles, css`
Expand Down
2 changes: 1 addition & 1 deletion components/inputs/input-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class InputText extends InputInlineHelpMixin(PropertyRequiredMixin(FocusMixin(La
*/
valueAlign: { attribute: 'value-align', type: String },
_firstSlotWidth: { type: Number },
_hasAfterContent: { type: Boolean, attribute: false },
_hasAfterContent: { state: true },
_focused: { type: Boolean },
_hovered: { type: Boolean },
_lastSlotWidth: { type: Number }
Expand Down
2 changes: 1 addition & 1 deletion components/selection/selection-observer-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const SelectionObserverMixin = superclass => class extends superclass {
* @type {object}
*/
selectionInfo: { type: Object },
_provider: { type: Object, attribute: false }
_provider: { state: true }
};

constructor() {
Expand Down
2 changes: 1 addition & 1 deletion components/table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ For the example below:
class MySortableTableElem extends LitElement {

static properties = {
_sortDesc: { attribute: false, type: Boolean }
_sortDesc: { state: true }
};

static styles = tableStyles;
Expand Down
10 changes: 5 additions & 5 deletions templates/primary-secondary/primary-secondary.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,11 @@ class TemplatePrimarySecondary extends LocalizeCoreElement(LitElement) {
*/
hasForm: { type: Boolean, attribute: 'has-form' },
_formErrorSummary: { type: Array },
_hasFooter: { type: Boolean, attribute: false },
_isCollapsed: { type: Boolean, attribute: false },
_isExpanded: { type: Boolean, attribute: false },
_isMobile: { type: Boolean, attribute: false },
_size: { type: Number, attribute: false },
_hasFooter: { state: true },
_isCollapsed: { state: true },
_isExpanded: { state: true },
_isMobile: { state: true },
_size: { state: true },
_sizeAsPercent: { state: true }
};

Expand Down