Internal: Remove per-event app_type in favor of events-manager super property [ED-24820]#36368
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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)
- 📝 Indentation regression in
create-post-list-item.tsxandpost-list-item.tsx— see inline comment.
Contributor
Elementor BuildLast updated at: 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. |
Ref: ED-24820 Co-authored-by: Cursor <cursoragent@cursor.com>
davseve
approved these changes
Jul 1, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app_typefrom all editor event dispatch payloads across legacy JS, packages, and onboarding analytics.appType: 'Editor'registered via events-managerenableTracking()as the single source of truth for editor context on every event.window_nameandappTypesconfig entries are unchanged — still used for context-specific window identification.Test plan
npm run test:jest -- --testPathPattern=editor-one-events-wpdashappType: Editorvia super property (no per-eventapp_type)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)
packages/apps/onboarding/src/analytics/events.ts,onboarding-tracking.tsdocuments-save/hooks/,use-document-*.tseditor-interactions/src/utils/tracking.ts,editor-site-navigation/src/components/top-bar/*.tsxassets/dev/js/editor/document/elements/commands/delete.js,editor/utils/editor-one-events.js,packages/libs/editor-controls/src/utils/tracking.tsmodules/pro-install/assets/js/pro-install-events.js,tests/jest/unit/assets/dev/js/editor/utils/editor-one-events-wpdash.test.js3. 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 injectapp_typeas 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_typesuper 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