Skip to content

Internal: Remove per-event app_type in favor of events-manager super property [ED-24820]#36368

Merged
Ntnelbaba merged 6 commits into
mainfrom
refactor/ED-24820-remove-app-type-event-property
Jul 1, 2026
Merged

Internal: Remove per-event app_type in favor of events-manager super property [ED-24820]#36368
Ntnelbaba merged 6 commits into
mainfrom
refactor/ED-24820-remove-app-type-event-property

Conversation

@Ntnelbaba

@Ntnelbaba Ntnelbaba commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove redundant per-event app_type from all editor event dispatch payloads across legacy JS, packages, and onboarding analytics.
  • Keep appType: 'Editor' registered via events-manager enableTracking() as the single source of truth for editor context on every event.
  • window_name and appTypes config entries are unchanged — still used for context-specific window identification.

Test plan

  • npm run test:jest -- --testPathPattern=editor-one-events-wpdash
  • Verify dispatched events in editor still include appType: Editor via super property (no per-event app_type)
  • Smoke-test publish dropdown, page list, onboarding, and pro-install connect flows

Ref: ED-24820

Made with Cursor

✨ PR Description

1. Problem & Context

Removing redundant app_type: 'editor' properties from event payloads across the codebase—this property is now managed centrally by the events manager as a super property (ED-24820), eliminating duplication and reducing payload overhead.

2. What Changed (Where)

Category Files
Onboarding events packages/apps/onboarding/src/analytics/events.ts, onboarding-tracking.ts
Editor app-bar 5 files in documents-save/hooks/, use-document-*.ts
Editor interactions & navigation editor-interactions/src/utils/tracking.ts, editor-site-navigation/src/components/top-bar/*.tsx
Core editor controls & commands assets/dev/js/editor/document/elements/commands/delete.js, editor/utils/editor-one-events.js, packages/libs/editor-controls/src/utils/tracking.ts
Pro install events & tests modules/pro-install/assets/js/pro-install-events.js, tests/jest/unit/assets/dev/js/editor/utils/editor-one-events-wpdash.test.js

3. How It Works

Event payloads previously included explicit app_type: 'editor' at dispatch time. This PR removes those lines from 13 files and 2 test files, relying on the centralized events manager to inject app_type as a super property automatically. No behavioral change—just cleaner payload construction and single source of truth.

4. Risks

Low risk. Change is mechanical and localized. Verify the events manager properly applies app_type super property in production; if not configured, analytics will lose this dimension. Test coverage via updated test assertions confirms payload structure.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

Rely on the events-manager appType super property as the single source
of truth for editor context on all dispatched events.

Ref: ED-24820
Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

✅ Overall: Focused, low-risk cleanup that correctly centralizes appType via events-manager register(). Test assertions updated for wpdash events; all dispatch paths route through events-manager.

Issues (1)

  1. 📝 Indentation regression in create-post-list-item.tsx and post-list-item.tsx — see inline comment.

@github-actions github-actions Bot added the auto-reviewed PR has been automatically reviewed by CI label Jun 29, 2026
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Elementor Build

Last updated at: 20260701.1124
Version: 4.3.0-20260701.1124

✅ Elementor build is ready for download.

You can download the latest build from the link below:

🔗 elementor-4.3.0-20260701.1124.zip

The build is available for 3 days.

@Ntnelbaba Ntnelbaba enabled auto-merge (squash) June 30, 2026 09:13
Ref: ED-24820
Co-authored-by: Cursor <cursoragent@cursor.com>
@Ntnelbaba Ntnelbaba changed the title Remove per-event app_type in favor of events-manager super property [ED-24820] refactor: Remove per-event app_type in favor of events-manager super property [ED-24820] Jun 30, 2026
@Ntnelbaba Ntnelbaba changed the title refactor: Remove per-event app_type in favor of events-manager super property [ED-24820] Internal: Remove per-event app_type in favor of events-manager super property [ED-24820] Jun 30, 2026
@Ntnelbaba Ntnelbaba merged commit defaf40 into main Jul 1, 2026
87 of 89 checks passed
@Ntnelbaba Ntnelbaba deleted the refactor/ED-24820-remove-app-type-event-property branch July 1, 2026 11:44
avivu pushed a commit to avivu/elementor that referenced this pull request Jul 7, 2026
…ED-24820] (elementor#36368)

## Summary
- Remove redundant per-event `app_type` from all editor event dispatch
payloads across legacy JS, packages, and onboarding analytics.
- Keep `appType: 'Editor'` registered via events-manager
`enableTracking()` as the single source of truth for editor context on
every event.
- `window_name` and `appTypes` config entries are unchanged — still used
for context-specific window identification.

## Test plan
- [x] `npm run test:jest -- --testPathPattern=editor-one-events-wpdash`
- [ ] Verify dispatched events in editor still include `appType: Editor`
via super property (no per-event `app_type`)
- [ ] Smoke-test publish dropdown, page list, onboarding, and
pro-install connect flows

Ref: [ED-24820](https://elementor.atlassian.net/browse/ED-24820)

Made with [Cursor](https://cursor.com)

[ED-24820]:
https://elementor.atlassian.net/browse/ED-24820?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
<!--start_gitstream_placeholder-->
### ✨ PR Description
## 1. Problem & Context

Consolidating analytics tracking by removing redundant per-event
`app_type` property across the codebase. The events-manager now handles
this as a super property (ED-24820), eliminating duplication.

## 2. What Changed (Where)

| File | Change |
|------|--------|
| onboarding events | Removed `app_type: 'editor'` from interface and
tracking payload |
| editor-app-bar hooks (5 files) | Removed `app_type` from event
payloads |
| editor-interactions, editor-controls tracking | Removed `app_type`
from base event properties |
| document delete command, editor-one-events | Removed `app_type` from
event data |
| pro-install events | Removed `app_type` from 4 tracking calls |
| test file | Updated assertions to expect payloads without `app_type` |

## 3. How It Works

Events previously included `app_type: 'editor'` at point of dispatch.
With this change, `app_type` is now injected by the events-manager as a
super property, applying uniformly across all events without repetition
in individual tracking calls.

## 4. Risks

Low risk—purely removes redundant payload fields already centralized in
events-manager. Verify events-manager super property implementation
correctly injects `app_type` to ensure backward compatibility in
analytics pipelines.

_Generated by LinearB AI and added by gitStream._
<sub>AI-generated content may contain inaccuracies. Please verify before
using.
💡 **Tip:** You can customize your AI Description using **Guidelines**
[Learn
how](https://docs.gitstream.cm/automation-actions/#describe-changes)</sub>
<!--end_gitstream_placeholder-->

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 min review auto-reviewed PR has been automatically reviewed by CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants