Skip to content

Commit

Permalink
Remove unused elements
Browse files Browse the repository at this point in the history
  • Loading branch information
mammerla committed Sep 9, 2024
1 parent 1034c4f commit 990d261
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 402 deletions.
8 changes: 0 additions & 8 deletions app/public/data/gallery.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@
"id": "customComponents",
"type": 0
},
{
"title": "Beautiful natural shapes for your building adventures",
"description": "Trees, trees, and more trees!",
"gitHubOwner": "scriptVillager",
"gitHubRepoName": "NaturalStructures",
"id": "naturalStructures",
"type": 1
},
{
"title": "Solid Cube Block with Textures",
"description": "The dice block is a simple solid cube.",
Expand Down
19 changes: 0 additions & 19 deletions app/src/UX/AddGitHubReference.css

This file was deleted.

156 changes: 0 additions & 156 deletions app/src/UX/AddGitHubReference.tsx

This file was deleted.

126 changes: 0 additions & 126 deletions app/src/UX/ProjectItemList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ import {

import { AssetsLabel, EyeSlashLabel, FunctionsLabel, TypesLabel } from "./Labels";
import { GitHubPropertyType } from "./ProjectPropertyEditor";
import AddGitHubReference from "./AddGitHubReference";
import NewEntityType from "./NewEntityType";
import ProjectExporter from "../app/ProjectExporter";
import ProjectUtilities, { NewEntityTypeAddMode } from "../app/ProjectUtilities";
import IGitHubInfo from "../app/IGitHubInfo";
import ProjectItemManager from "../app/ProjectItemManager";
Expand Down Expand Up @@ -168,11 +166,9 @@ export default class ProjectItemList extends Component<IProjectItemListProps, IP
this._handleItemTypeDoubleClick = this._handleItemTypeDoubleClick.bind(this);
this._handleStoragePathToggle = this._handleStoragePathToggle.bind(this);
this._handleNewFunctionClick = this._handleNewFunctionClick.bind(this);
this._addGitHubReferenceClick = this._addGitHubReferenceClick.bind(this);
this._handleNewEntityTypeClick = this._handleNewEntityTypeClick.bind(this);
this._handleNewBlockTypeClick = this._handleNewBlockTypeClick.bind(this);
this._githubProjectUpdated = this._githubProjectUpdated.bind(this);
this._handleAddReference = this._handleAddReference.bind(this);
this._newEntityTypeUpdated = this._newEntityTypeUpdated.bind(this);
this._newBlockTypeUpdated = this._newBlockTypeUpdated.bind(this);
this._handleNewEntityType = this._handleNewEntityType.bind(this);
Expand Down Expand Up @@ -496,21 +492,6 @@ export default class ProjectItemList extends Component<IProjectItemListProps, IP
});
}

async _addGitHubReferenceClick() {
if (this.state === null || !this._isMountedInternal) {
return;
}

this.setState({
activeItem: this.state.activeItem,
dialogMode: ProjectItemListDialogType.addGitHubReferenceDialog,
maxItemsToShow: this.state.maxItemsToShow,
contextFocusedItem: this.state.contextFocusedItem,
collapsedItemTypes: this.state.collapsedItemTypes,
collapsedStoragePaths: this.state.collapsedStoragePaths,
});
}

_handleConfirmRename() {
if (this.state === null || this.state.activeItem === undefined || this._newItemName === undefined) {
return;
Expand Down Expand Up @@ -612,37 +593,6 @@ export default class ProjectItemList extends Component<IProjectItemListProps, IP
}
}

_handleAddReference() {
if (this.state === null) {
return;
}

if (
this.tentativeGitHubOwner !== undefined &&
this.tentativeGitHubRepoName !== undefined &&
this.props.project !== null
) {
ProjectExporter.addGitHubReference(
this.props.carto,
this.props.project,
this.tentativeGitHubOwner,
this.tentativeGitHubRepoName,
this.tentativeGitHubBranch,
this.tentativeGitHubFolder,
this.tentativeGitHubRepoName
);
}

this.setState({
activeItem: undefined,
dialogMode: ProjectItemListDialogType.noDialog,
maxItemsToShow: this.state.maxItemsToShow,
contextFocusedItem: this.state.contextFocusedItem,
collapsedItemTypes: this.state.collapsedItemTypes,
collapsedStoragePaths: this.state.collapsedStoragePaths,
});
}

_handleConfirmDelete() {
if (this.state === null || this.state.activeItem === undefined) {
return;
Expand Down Expand Up @@ -1671,57 +1621,6 @@ export default class ProjectItemList extends Component<IProjectItemListProps, IP
},
];

if (Utilities.isDebug) {
splitButtonMenuItems.push(
{
id: "structure",
key: "pil-structure",
onClick: this._handleNewStructureClick,
content: "New structure",
},
{
id: "actionset",
key: "pil-actionset",
onClick: this._handleNewActionSetClick,
content: "New action set",
},
{
id: "worldtest",
key: "pil-worldtest",
onClick: this._handleNewWorldTestClick,
content: "New world test",
},
{
key: "pil-divider1",
kind: "divider",
},
{
id: "entityType",
key: "pil-addReference",
onClick: this._addGitHubReferenceClick,
content: "Add GitHub reference",
}
);

if (this.props.project && this.props.project.role === ProjectRole.documentation) {
splitButtonMenuItems.push({
id: "doctype",
key: "pil-doctype",
onClick: this._handleNewDocTypeClick,
content: "New documented type",
});
}

if (this.props.project && this.props.project.role === ProjectRole.meta) {
splitButtonMenuItems.push({
id: "form",
key: "pil-form",
onClick: this._handleNewFormClick,
content: "New form",
});
}
}

let selectedItemIndex = 1;
let itemsAdded = 1;

Expand Down Expand Up @@ -2022,31 +1921,6 @@ export default class ProjectItemList extends Component<IProjectItemListProps, IP
header={"New Block Type"}
/>
);
} else if (
this.state !== null &&
this.props.project !== null &&
this.state.dialogMode === ProjectItemListDialogType.addGitHubReferenceDialog
) {
dialogArea = (
<Dialog
open={true}
cancelButton="Cancel"
confirmButton="Add"
key="pil-addghouter"
onCancel={this._handleCancel}
onConfirm={this._handleAddReference}
content={
<AddGitHubReference
theme={this.props.theme}
key="pil-addghdia"
onGitHubProjectUpdated={this._githubProjectUpdated}
project={this.props.project}
carto={this.props.carto}
/>
}
header={"Add GitHub Reference"}
/>
);
}

let splitButton = <></>;
Expand Down
Loading

0 comments on commit 990d261

Please sign in to comment.