close
Skip to content

fix: add inline class to connector approval admin notice for proper l…#628

Merged
dkotter merged 7 commits into
WordPress:developfrom
Malayt04:fix/connector-approval-notice-placement
May 27, 2026
Merged

fix: add inline class to connector approval admin notice for proper l…#628
dkotter merged 7 commits into
WordPress:developfrom
Malayt04:fix/connector-approval-notice-placement

Conversation

@Malayt04
Copy link
Copy Markdown
Contributor

@Malayt04 Malayt04 commented May 27, 2026

What?

Closes: #596

Fixes the connector approval notice overlapping the header on the AI Request Logs screen when both the Connector Approvals and AI Request Logging experiments are enabled.

Why?

WordPress Core's common.js automatically relocates .notice elements to after the first h1 in .wrap. The @wordpress/admin-ui Page component renders its h1 inside a flex header container, so the notice ends up as an inline flex child in the header row.

How?

Added the inline class to the notice output in Admin_Notice::render(). WordPress Core's common.js explicitly skips elements with the inline class when relocating notices, so the notice stays in its natural output position instead of being moved into the flex header.

Use of AI Tools

AI assistance: Yes
Tool(s): Antigravity
Used for: Deciding most optimal approach

Screenshots or screencast

Before

Screenshot 2026-05-27 at 5 08 38 PM

After

Screenshot 2026-05-27 at 5 09 13 PM

Changelog Entry

Fixed - Connector approval notice no longer overlaps the page header on the AI Request Logs screen.

Open WordPress Playground Preview

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Malayt04 <malaytiwari@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@jeffpaul jeffpaul requested a review from dkotter May 27, 2026 13:36
@jeffpaul jeffpaul added this to the 1.0.1 milestone May 27, 2026
@jeffpaul
Copy link
Copy Markdown
Member

@dkotter this is probably a good visual fix, so as long as this appears less hacky solutionwise then perhaps we merge this instead of #598?

@dkotter
Copy link
Copy Markdown
Collaborator

dkotter commented May 27, 2026

I think this is the better fix but my main concern here is we're adding that inline class to the notice on all pages, which changes the rendering of that admin notice for all pages. I think we should scope that to just the Request Logging page.

For example, here's the before and after on the Dashboard screen:

Before After
Screenshot 2026-05-27 at 8 33 04 AM Screenshot 2026-05-27 at 8 33 13 AM

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.45%. Comparing base (c818723) to head (4872fc6).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #628      +/-   ##
=============================================
+ Coverage      74.01%   74.45%   +0.43%     
- Complexity      1738     1740       +2     
=============================================
  Files             85       85              
  Lines           7517     7521       +4     
=============================================
+ Hits            5564     5600      +36     
+ Misses          1953     1921      -32     
Flag Coverage Δ
unit 74.45% <100.00%> (+0.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Malayt04
Copy link
Copy Markdown
Contributor Author

I've updated the implementation to scope the .inline class conditionally so it is only applied on the Request Logs page. On other screens, the default relocation behavior remains completely untouched.

dkotter
dkotter previously approved these changes May 27, 2026
@dkotter dkotter merged commit cb195b8 into WordPress:develop May 27, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connector Approvals request misplaced on Request Logs screen

3 participants