Merge pull request #22482 from backstage/camilaibs/fix-analytics-context
[DI] Add analytics api backward compatibility
This commit is contained in:
@@ -14,7 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import {
|
||||
ExtensionBoundary,
|
||||
coreExtensionData,
|
||||
createApiExtension,
|
||||
createComponentExtension,
|
||||
@@ -50,9 +52,13 @@ export const App = createExtension({
|
||||
output: {
|
||||
root: coreExtensionData.reactElement,
|
||||
},
|
||||
factory({ inputs }) {
|
||||
factory({ node, inputs }) {
|
||||
return {
|
||||
root: inputs.root.output.element,
|
||||
root: (
|
||||
<ExtensionBoundary node={node}>
|
||||
{inputs.root.output.element}
|
||||
</ExtensionBoundary>
|
||||
),
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -211,8 +211,8 @@ describe('RouteTracker', () => {
|
||||
action: 'navigate',
|
||||
attributes: {},
|
||||
context: {
|
||||
extensionId: 'App',
|
||||
pluginId: 'root',
|
||||
extensionId: 'app',
|
||||
pluginId: 'app',
|
||||
},
|
||||
subject: '/not-routable-extension',
|
||||
value: undefined,
|
||||
@@ -221,8 +221,8 @@ describe('RouteTracker', () => {
|
||||
action: 'click',
|
||||
attributes: undefined,
|
||||
context: {
|
||||
extensionId: 'App',
|
||||
pluginId: 'root',
|
||||
extensionId: 'app',
|
||||
pluginId: 'app',
|
||||
},
|
||||
subject: 'test',
|
||||
value: undefined,
|
||||
|
||||
Reference in New Issue
Block a user