Internal: Fix conversion banner placeholder shifting admin buttons [ED-25235] - #683
Merged
Merged
Conversation
Mount the conversion banner in JavaScript only when welcome config exists, place it after the page title action by default, and add Playwright regression tests for suppressed and visible placement flows. Ref: ED-25235 Co-authored-by: Cursor <cursoragent@cursor.com>
Hello Elementor BuildLast updated at: 20260819.0919 ✅ Hello Elementor build is ready for download. You can download the latest build from the link below: The build is available for 7 days. |
CI uses free Elementor without guaranteed Go Pro suppression on list tables, so stub admin-settings to assert no DOM mount deterministically. Ref: ED-25235 Co-authored-by: Cursor <cursoragent@cursor.com>
Ntnelbaba
enabled auto-merge (squash)
August 19, 2026 11:41
davseve
approved these changes
Aug 20, 2026
| }, | ||
| }; | ||
|
|
||
| test.describe('Conversion banner flows [ED-25235]', () => { |
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
#ehe-admin-cbplaceholder rendered in PHP viain_admin_header, which sat between the page title and.page-title-actionand shifted buttons in Editor One admin layouts.config.welcome.title), so suppressed banners leave no DOM node..page-title-actionon standard list-table screens (fallback: after the configured heading selector); preserve existingbeforeandbeforeWrapplacement for special screens.AdminProviderto avoid a duplicate REST request; add Playwright regression tests for the main flows.Jira
ED-25235
Test plan
#ehe-admin-cbwhen Elementor suppresses welcome config; title row stays aligned.page-title-actionh1and buttonsbefore: truescreens (templates library, system info) — banner still appears before anchorbeforeWrap) — banner appears before.wrapLabels
patchMade with Cursor
✨ PR Description
1. Problem & Context
Banner's fixed width and PHP-injected placeholder DOM were causing admin buttons to shift. Moved rendering to JavaScript with dynamic insertion logic to avoid layout thrashing and ensure proper positioning.
2. What Changed (Where)
render_conversion_banner()method andin_admin_headerhook; banner now created client-side.initialSettingsprop to skip redundant API call when config already fetched.3. How It Works
Init function fires on DOMContentLoaded, fetches config via REST API, creates hidden container, calls
insertBanner()to locate insertion point (beforeWrap > before selector > after page-title-action > after selector), renders React app, then reveals container viauseLayoutEffect. This prevents reflow of admin buttons since container is invisible during DOM insertion.4. Risks
Minor: API fetch failure silently aborts (no retry). Banner won't render if
initialSettings.welcome.titlemissing, but test coverage validates this. Insertion logic depends on specific DOM selectors being present—validate across WordPress admin pages where selectors differ (dashboard special-cases to#wpbody-content .wrap h1).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