From b53a8edde5fb39983c9cfad6533a8fae56efb9c3 Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Thu, 12 Dec 2024 11:43:30 -0800 Subject: [PATCH 1/3] barely working v1 - doesn't support undo - doesn't refresh UI when renamed --- src/editor/components/components/Sidebar.js | 12 +++++- .../lib/commands/EntityRenameCommand.js | 40 +++++++++++++++++++ src/editor/lib/commands/index.js | 2 + src/editor/lib/entity.js | 9 +++++ 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 src/editor/lib/commands/EntityRenameCommand.js diff --git a/src/editor/components/components/Sidebar.js b/src/editor/components/components/Sidebar.js index 42d797ca..413757a4 100644 --- a/src/editor/components/components/Sidebar.js +++ b/src/editor/components/components/Sidebar.js @@ -1,4 +1,8 @@ -import { cloneEntity, removeSelectedEntity } from '../../lib/entity'; +import { + cloneEntity, + removeSelectedEntity, + renameEntity +} from '../../lib/entity'; import { Button } from '../components'; import ComponentsContainer from './ComponentsContainer'; import Events from '../../lib/Events'; @@ -98,6 +102,12 @@ export default class Sidebar extends React.Component { <> ) : (