site-kit-wp: Key metrics layout broken at 960px

Bug Description

The key metrics setup CTA has a broken layout between 960-974px

Steps to reproduce

  1. Use a fresh site
  2. Go to SK dashboard after connecting GA (with data)
  3. See KMW setup CTA
  4. Adjust browser width to 960px up to ~974px
  5. See below

Note that to reliably reproduce the issue it may be necessary to view the site using a browser with always-visible scrollbars.

If using a Mac, set the system setting “Show scroll bars” to “Always”, and when using Chrome’s responsive devtool view ensure the device type is set to Desktop ensure the scrollbar is present.

Screenshots

Image Image

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The layout should be adjusted to display as designed across viewports

Implementation Brief

Test Coverage

  • Add test coverage for the new useWindowWidth() hook.
  • Fix any failing tests.

QA Brief

  1. Use a fresh site
  2. Go to SK dashboard after connecting GA (with data)
  3. See KMW setup CTA
  4. Adjust browser width to 960px up to ~974px. The banner should not break in these widths.

Changelog entry

  • Fix key metrics setup CTA layout at 960px.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15

Most upvoted comments

QA Update ✅

Was able to simulate it on my Mac OS on Chrome, Chrome emulator and Firefox. After switching to develop branch, the issues are no more.

https://github.com/user-attachments/assets/6ce1b04d-d2ca-440a-a619-2d6888c805a3