Skip to content

fix(advertising): toggle spacing under category autocomplete#4686

Open
adekbadek wants to merge 1 commit intotrunkfrom
fix/news-1681-advertising-wizard-toggle-spacing
Open

fix(advertising): toggle spacing under category autocomplete#4686
adekbadek wants to merge 1 commit intotrunkfrom
fix/news-1681-advertising-wizard-toggle-spacing

Conversation

@adekbadek
Copy link
Copy Markdown
Member

All Submissions:

Changes proposed in this Pull Request:

The All tag archive pages and All category archive pages toggles in Advertising > Display Ads > Settings sit flush against the inputs above them on WordPress 7.0. The 7.0 Gutenberg components dropped the default bottom margin from FormTokenField (which CategoryAutocomplete wraps), so the toggle ends up touching the autocomplete with no gap.

This adds a 16px top margin to any ToggleControl that immediately follows a CategoryAutocomplete inside the Display Ads wizard, restoring the previous spacing. Scope is intentionally narrow – only the wizard root, only the adjacent-sibling pair.

Closes NEWS-1681.

How to test the changes in this Pull Request:

  1. On a site running WordPress 7.0, go to Advertising > Display Ads > Settings (the Settings tab inside the Advertising wizard).
  2. Scroll to the Tags section. Confirm the All tag archive pages toggle has a visible gap (~16px) between it and the Tags to suppress ads on input above.
  3. Scroll to the Categories section. Confirm the All category archive pages toggle has the same gap above it.
  4. Confirm the Author Archive Pages section (which uses a section header above the toggle, not an input) is unchanged.
  5. Toggle each control on/off to make sure the click target still hits cleanly and the autocomplete becomes disabled as expected.
  6. Open the Providers and Placements tabs and verify nothing else moved.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the Advertising > Display Ads > Settings wizard styling to restore the visual gap between the Category/Tag autocomplete inputs and the immediately-following toggles on WordPress 7.0 (where FormTokenField no longer provides default bottom spacing).

Changes:

  • Add a narrowly scoped adjacent-sibling CSS rule to apply margin-top: 16px to ToggleControl when it directly follows CategoryAutocomplete within the Display Ads wizard.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adekbadek adekbadek marked this pull request as ready for review April 29, 2026 10:12
@adekbadek adekbadek requested a review from a team as a code owner April 29, 2026 10:12
@adekbadek adekbadek added the [Status] Needs Review The issue or pull request needs to be reviewed label Apr 29, 2026
Copy link
Copy Markdown
Contributor

@laurelfulford laurelfulford left a comment

Choose a reason for hiding this comment

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

That looks much better, and no other changes were introduced! 🚢

@github-actions github-actions Bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Approved The pull request has been reviewed and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants