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

Drop inline panel starter brick #8723

Merged
merged 6 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 0 additions & 1 deletion eslint-local-rules/persistBackgroundData.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@
./src/sidebar/RendererComponent.tsx
./src/starterBricks/contextMenu.ts
./src/starterBricks/contextMenuReader.ts
./src/starterBricks/dom.tsx
./src/starterBricks/factory.ts
./src/starterBricks/helpers.ts
./src/starterBricks/menuItemExtension.ts
Expand Down
2 changes: 1 addition & 1 deletion src/bricks/PipelineVisitor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ test("should invoke the callback for the Document button pipeline", () => {
}
const visitor = new Visitor();
visitor.visitRootPipeline(pipeline, {
extensionPointType: StarterBrickTypes.INLINE_PANEL,
extensionPointType: StarterBrickTypes.SIDEBAR_PANEL,
});

expect(visitBlock).toHaveBeenCalledTimes(2); // One Document brick and one brick in the pipeline
Expand Down
66 changes: 0 additions & 66 deletions src/bricks/renderers/common.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/components/BrickIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {
import { TriggerStarterBrickABC } from "@/starterBricks/trigger/triggerStarterBrick";
import { ButtonStarterBrickABC } from "@/starterBricks/button/buttonStarterBrick";
import { ContextMenuStarterBrickABC } from "@/starterBricks/contextMenu/contextMenuStarterBrick";
import { PanelStarterBrickABC } from "@/starterBricks/panel/panelStarterBrick";
import { SidebarStarterBrickABC } from "@/starterBricks/sidebar/sidebarStarterBrick";
import getType from "@/runtime/getType";
import { type BrickType } from "@/runtime/runtimeTypes";
Expand Down Expand Up @@ -83,10 +82,6 @@ function getDefaultBrickIcon<T extends Metadata>(
return faBars;
}

if (brick instanceof PanelStarterBrickABC) {
return faWindowMaximize;
}

if (brick instanceof SidebarStarterBrickABC) {
return faColumns;
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/contentScript/messenger/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export const reloadMarketplaceEnhancements = getMethod(
export const getAttributeExamples = getMethod("GET_ATTRIBUTE_EXAMPLES");
export const selectElement = getMethod("SELECT_ELEMENT");

export const insertPanel = getMethod("INSERT_PANEL");
export const insertButton = getMethod("INSERT_BUTTON");
export const enableOverlay = getMethod("ENABLE_OVERLAY");
export const disableOverlay = getMethod("DISABLE_OVERLAY");
Expand Down
3 changes: 0 additions & 3 deletions src/contentScript/messenger/registration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import { cancelSelect } from "@/contentScript/pageEditor/elementPicker";
import { reloadActivationEnhancements } from "@/contentScript/loadActivationEnhancementsCore";
import { getAttributeExamples } from "@/contentScript/pageEditor/elementInformation";
import selectElement from "@/contentScript/pageEditor/selectElement";
import { insertPanel } from "@/contentScript/pageEditor/insertPanel";
import { insertButton } from "@/contentScript/pageEditor/insertButton";
import {
disableOverlay,
Expand Down Expand Up @@ -105,7 +104,6 @@ declare global {
RELOAD_MARKETPLACE_ENHANCEMENTS: typeof reloadActivationEnhancements;
GET_ATTRIBUTE_EXAMPLES: typeof getAttributeExamples;
SELECT_ELEMENT: typeof selectElement;
INSERT_PANEL: typeof insertPanel;
INSERT_BUTTON: typeof insertButton;
ENABLE_OVERLAY: typeof enableOverlay;
DISABLE_OVERLAY: typeof disableOverlay;
Expand Down Expand Up @@ -159,7 +157,6 @@ export default function registerMessenger(): void {
RELOAD_MARKETPLACE_ENHANCEMENTS: reloadActivationEnhancements,
GET_ATTRIBUTE_EXAMPLES: getAttributeExamples,
SELECT_ELEMENT: selectElement,
INSERT_PANEL: insertPanel,
INSERT_BUTTON: insertButton,
ENABLE_OVERLAY: enableOverlay,
DISABLE_OVERLAY: disableOverlay,
Expand Down
61 changes: 0 additions & 61 deletions src/contentScript/pageEditor/insertPanel.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/contentScript/pageEditor/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ import {
} from "@/starterBricks/types";
import { type StarterBrickType } from "@/types/starterBrickTypes";
import { type Except } from "type-fest";
import {
type PanelConfig,
type PanelDefinition,
} from "@/starterBricks/panel/panelStarterBrickTypes";
import {
type ButtonDefinition,
type ButtonStarterBrickConfig,
Expand All @@ -46,15 +42,6 @@ export interface DraftModComponent<
}

export type SelectMode = "element" | "container";
export type PanelSelectionResult = {
uuid: UUID;
foundation: Except<
PanelDefinition,
"defaultOptions" | "isAvailable" | "reader"
>;
panel: Except<PanelConfig, "body">;
containerInfo: ElementInfo;
};
export type DraftButtonModComponent = DraftModComponent<
ButtonDefinition,
ButtonStarterBrickConfig
Expand Down
8 changes: 5 additions & 3 deletions src/pageEditor/PanelContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ import { shouldAutoRun } from "@/pageEditor/toolbar/ReloadToolbar";
import ReduxPersistenceContext, {
type ReduxPersistenceContextType,
} from "@/store/ReduxPersistenceContext";
import type { StarterBrickType } from "@/types/starterBrickTypes";
import {
type StarterBrickType,
StarterBrickTypes,
} from "@/types/starterBrickTypes";
import type { EditorState } from "@/pageEditor/pageEditorTypes";
import DimensionGate from "@/pageEditor/components/DimensionGate";
import { allFramesInInspectedTab } from "@/pageEditor/context/connection";
import DatabaseUnresponsiveBanner from "@/components/DatabaseUnresponsiveBanner";

const STARTER_BRICKS_TO_EXCLUDE_FROM_CLEANUP: StarterBrickType[] = [
"actionPanel",
"panel",
StarterBrickTypes.SIDEBAR_PANEL,
];

// When selecting a starter brick in the Page Editor, remove any existing starter bricks
Expand Down
Loading
Loading