PluginProbe
Extendify / 3.2.2
Extendify v3.2.2
3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 All 128 releases
← All changes | src/QuickEdit/lib/agent-block-descriptor.js +7 -0 3.1.6 → 3.2.2 View file →
@@ -6,8 +6,9 @@
6 6
7 7 const AGENT_ATTR = 'data-extendify-agent-block-id';
8 8 const PART_ID_ATTR = 'data-extendify-part-block-id';
9 9 const PART_ATTR = 'data-extendify-part';
10 +const PART_SLUG_ATTR = 'data-extendify-part-slug';
10 11
11 12 export const buildAgentBlockDescriptor = (match) => {
12 13 if (!match) return null;
13 14 const templatePart = match.closest?.(`[${PART_ATTR}]`);
@@ -36,7 +37,13 @@
36 37 if (templatePart) {
37 38 details.id = templatePart.getAttribute(PART_ID_ATTR);
38 39 details.target = PART_ID_ATTR;
39 40 details.template = templatePart.getAttribute(PART_ATTR);
41 + // Part ids number their own space; without the scope the agent's read
42 + // and save land on the page post's block of the same number.
43 + details.source = {
44 + kind: 'template-part',
45 + partSlug: templatePart.getAttribute(PART_SLUG_ATTR) || '',
46 + };
40 47 }
41 48 return details;
42 49 };