Skip to content
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

refactor: drop Firefox-specific logic for consistent disabled behavior #8732

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 0 additions & 4 deletions packages/calcite-components/src/components/action/action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import {
import { toAriaBoolean } from "../../utils/dom";
import { guid } from "../../utils/guid";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -171,7 +169,6 @@ export class Action
// --------------------------------------------------------------------------

connectedCallback(): void {
connectInteractive(this);
connectLocalized(this);
connectMessages(this);
this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
Expand All @@ -189,7 +186,6 @@ export class Action
}

disconnectedCallback(): void {
disconnectInteractive(this);
disconnectLocalized(this);
disconnectMessages(this);
this.mutationObserver?.disconnect();
Expand Down
4 changes: 0 additions & 4 deletions packages/calcite-components/src/components/block/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import {
} from "../../utils/conditionalSlot";
import { focusFirstTabbable, getSlotted, toAriaBoolean } from "../../utils/dom";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -212,13 +210,11 @@ export class Block

connectedCallback(): void {
connectConditionalSlotComponent(this);
connectInteractive(this);
connectLocalized(this);
connectMessages(this);
}

disconnectedCallback(): void {
disconnectInteractive(this);
disconnectLocalized(this);
disconnectMessages(this);
disconnectConditionalSlotComponent(this);
Expand Down
4 changes: 0 additions & 4 deletions packages/calcite-components/src/components/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import {
} from "@stencil/core";
import { findAssociatedForm, FormOwner, resetForm, submitForm } from "../../utils/form";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -197,7 +195,6 @@ export class Button
//--------------------------------------------------------------------------

async connectedCallback(): Promise<void> {
connectInteractive(this);
connectLocalized(this);
connectMessages(this);
this.hasLoader = this.loading;
Expand All @@ -208,7 +205,6 @@ export class Button

disconnectedCallback(): void {
this.mutationObserver?.disconnect();
disconnectInteractive(this);
disconnectLabel(this);
disconnectLocalized(this);
disconnectMessages(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import {
} from "../../utils/form";
import { guid } from "../../utils/guid";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -225,13 +223,11 @@ export class Checkbox

connectedCallback(): void {
this.guid = this.el.id || `calcite-checkbox-${guid()}`;
connectInteractive(this);
connectLabel(this);
connectForm(this);
}

disconnectedCallback(): void {
disconnectInteractive(this);
disconnectLabel(this);
disconnectForm(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import {
} from "@stencil/core";
import { focusElementInGroup, toAriaBoolean } from "../../utils/dom";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -107,12 +105,10 @@ export class ChipGroup implements InteractiveComponent {
//--------------------------------------------------------------------------

connectedCallback(): void {
connectInteractive(this);
this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
}

componentDidRender(): void {
disconnectInteractive(this);
updateHostInteraction(this);
}

Expand Down
4 changes: 0 additions & 4 deletions packages/calcite-components/src/components/chip/chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ import {
updateMessages,
} from "../../utils/t9n";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -197,7 +195,6 @@ export class Chip

connectedCallback(): void {
connectConditionalSlotComponent(this);
connectInteractive(this);
connectLocalized(this);
connectMessages(this);
this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
Expand All @@ -213,7 +210,6 @@ export class Chip

disconnectedCallback(): void {
disconnectConditionalSlotComponent(this);
disconnectInteractive(this);
disconnectLocalized(this);
disconnectMessages(this);
this.mutationObserver?.disconnect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ import {
} from "./utils";

import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -693,7 +691,6 @@ export class ColorPicker
}

connectedCallback(): void {
connectInteractive(this);
connectLocalized(this);
connectMessages(this);
}
Expand All @@ -705,7 +702,6 @@ export class ColorPicker
disconnectedCallback(): void {
window.removeEventListener("pointermove", this.globalPointerMoveHandler);
window.removeEventListener("pointerup", this.globalPointerUpHandler);
disconnectInteractive(this);
disconnectLocalized(this);
disconnectMessages(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {
import { getSlotted } from "../../utils/dom";
import { guid } from "../../utils/guid";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -125,12 +123,10 @@ export class ComboboxItem implements ConditionalSlotComponent, InteractiveCompon
connectedCallback(): void {
this.ancestors = getAncestors(this.el);
connectConditionalSlotComponent(this);
connectInteractive(this);
}

disconnectedCallback(): void {
disconnectConditionalSlotComponent(this);
disconnectInteractive(this);
}

componentDidRender(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ import {
} from "../../utils/form";
import { guid } from "../../utils/guid";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -436,7 +434,6 @@ export class Combobox
// --------------------------------------------------------------------------

connectedCallback(): void {
connectInteractive(this);
connectLocalized(this);
connectMessages(this);
connectLabel(this);
Expand Down Expand Up @@ -486,7 +483,6 @@ export class Combobox
disconnectedCallback(): void {
this.mutationObserver?.disconnect();
this.resizeObserver?.disconnect();
disconnectInteractive(this);
disconnectLabel(this);
disconnectForm(this);
disconnectFloatingUI(this, this.referenceEl, this.floatingEl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import { dateToISO } from "../../utils/date";

import { closestElementCrossShadowBoundary, toAriaBoolean } from "../../utils/dom";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -184,18 +182,10 @@ export class DatePickerDay implements InteractiveComponent {
);
}

connectedCallback(): void {
connectInteractive(this);
}

componentDidRender(): void {
updateHostInteraction(this);
}

disconnectedCallback(): void {
disconnectInteractive(this);
}

//--------------------------------------------------------------------------
//
// Private State/Props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ import {
} from "../../utils/floating-ui";
import { guid } from "../../utils/guid";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -210,7 +208,6 @@ export class Dropdown
this.openHandler();
onToggleOpenCloseComponent(this);
}
connectInteractive(this);
this.updateItems();
connectFloatingUI(this, this.referenceEl, this.floatingEl);
}
Expand All @@ -231,7 +228,6 @@ export class Dropdown
disconnectedCallback(): void {
this.mutationObserver?.disconnect();
this.resizeObserver?.disconnect();
disconnectInteractive(this);
disconnectFloatingUI(this, this.referenceEl, this.floatingEl);
}

Expand Down
10 changes: 0 additions & 10 deletions packages/calcite-components/src/components/fab/fab.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Component, Element, h, Method, Prop, VNode } from "@stencil/core";
import { focusElement } from "../../utils/dom";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -95,10 +93,6 @@ export class Fab implements InteractiveComponent, LoadableComponent {
//
//--------------------------------------------------------------------------

connectedCallback(): void {
connectInteractive(this);
}

componentWillLoad(): void {
setUpLoadableComponent(this);
}
Expand All @@ -111,10 +105,6 @@ export class Fab implements InteractiveComponent, LoadableComponent {
updateHostInteraction(this);
}

disconnectedCallback(): void {
disconnectInteractive(this);
}

// --------------------------------------------------------------------------
//
// Methods
Expand Down
4 changes: 0 additions & 4 deletions packages/calcite-components/src/components/filter/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import {
import { debounce } from "lodash-es";
import { filter } from "../../utils/filter";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -165,7 +163,6 @@ export class Filter
}

connectedCallback(): void {
connectInteractive(this);
connectLocalized(this);
connectMessages(this);
}
Expand All @@ -175,7 +172,6 @@ export class Filter
}

disconnectedCallback(): void {
disconnectInteractive(this);
disconnectLocalized(this);
disconnectMessages(this);
this.filterDebounced.cancel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import {
} from "@stencil/core";
import { getElementDir } from "../../utils/dom";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
InteractiveContainer,
updateHostInteraction,
Expand Down Expand Up @@ -164,7 +162,6 @@ export class FlowItem
//--------------------------------------------------------------------------

connectedCallback(): void {
connectInteractive(this);
connectLocalized(this);
connectMessages(this);
}
Expand All @@ -179,7 +176,6 @@ export class FlowItem
}

disconnectedCallback(): void {
disconnectInteractive(this);
disconnectLocalized(this);
disconnectMessages(this);
}
Expand Down
9 changes: 1 addition & 8 deletions packages/calcite-components/src/components/handle/handle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ import {
import { HandleMessages } from "./assets/handle/t9n";
import { HandleChange, HandleNudge } from "./interfaces";
import { CSS, ICONS, SUBSTITUTIONS } from "./resources";
import {
connectInteractive,
disconnectInteractive,
InteractiveComponent,
updateHostInteraction,
} from "../../utils/interactive";
import { InteractiveComponent, updateHostInteraction } from "../../utils/interactive";

@Component({
tag: "calcite-handle",
Expand Down Expand Up @@ -130,7 +125,6 @@ export class Handle implements LoadableComponent, T9nComponent, InteractiveCompo
//--------------------------------------------------------------------------

connectedCallback(): void {
connectInteractive(this);
connectMessages(this);
connectLocalized(this);
}
Expand All @@ -149,7 +143,6 @@ export class Handle implements LoadableComponent, T9nComponent, InteractiveCompo
}

disconnectedCallback(): void {
disconnectInteractive(this);
disconnectMessages(this);
disconnectLocalized(this);
}
Expand Down
Loading
Loading