Skip to content

Commit e9bfc3b

Browse files
committed
Merge branch 'dev' into next
# Conflicts: # packages/cli-plugin-deploy-pulumi/src/commands/watch.ts
2 parents 88f9f38 + 9e32a6c commit e9bfc3b

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

packages/app-page-builder/src/editor/contexts/EditorPageElementsProvider/ElementControlsOverlay.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ export const ElementControlsOverlay = (props: Props) => {
267267
return "block | unknown";
268268
}
269269

270-
return getElementTitle(element.type, element.id);
270+
const suffix = process.env.REACT_APP_DEBUG ? element.id : "";
271+
272+
return getElementTitle(element.type, suffix);
271273
}, [element.data.blockId]);
272274

273275
// Z-index of element controls overlay depends on the depth of the page element.

packages/app-page-builder/src/editor/plugins/elementSettings/save/SaveAction.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
PbEditorElement
1616
} from "~/types";
1717
import { useEventActionHandler } from "~/editor/hooks/useEventActionHandler";
18-
import { removeElementId } from "~/editor/helpers";
18+
import { addElementId, removeElementId } from "~/editor/helpers";
1919
import { useActiveElement } from "~/editor/hooks/useActiveElement";
2020
import { usePageBlocks } from "~/admin/contexts/AdminPageBuilder/PageBlocks/usePageBlocks";
2121

@@ -58,10 +58,12 @@ const SaveAction = ({ children }: { children: React.ReactElement }) => {
5858

5959
const onSubmit = async (formData: SaveElementFormData | SaveBlockFormData) => {
6060
const pbElement = (await getElementTree({ element })) as PbElement;
61-
const newContent = pluginOnSave(removeElementId(pbElement));
6261

6362
if (formData.type === "block") {
64-
// We can create a new block, or update an existing one.
63+
// We need to create new element IDs when saving a block.
64+
const newContent = pluginOnSave(addElementId(pbElement));
65+
66+
// We can create a new block or update an existing one.
6567
try {
6668
if (formData.overwrite) {
6769
await updateBlock({
@@ -89,6 +91,9 @@ const SaveAction = ({ children }: { children: React.ReactElement }) => {
8991
</span>
9092
);
9193
} else {
94+
// When saving a simple element, we remove all element IDs.
95+
const newContent = pluginOnSave(removeElementId(pbElement));
96+
9297
const { data: res } = await client.mutate({
9398
mutation: CREATE_PAGE_ELEMENT,
9499
variables: {

packages/cli-plugin-deploy-pulumi/src/commands/newWatch/listPackages.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export const listPackages = async ({ inputs }: IListPackagesParams) => {
2222
if (inputs.package) {
2323
packagesList = Array.isArray(inputs.package) ? [...inputs.package] : [inputs.package];
2424

25+
// Also split by commas.
26+
packagesList = packagesList.map(item => item.split(",")).flat();
27+
2528
// When providing packages manually, we also allow providing names of Webiny packages
2629
// without the `@webiny` scope. In that case, we need to add the scope to the package name.
2730
const webinyPrefixedPackagesToAdd = [];

0 commit comments

Comments
 (0)