fix: My Sites, Limits and Current Membership columns above 3 collapse to one column (missing grid utilities)

未关闭
#2,134 5 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@superdav42 已经在做这个了。

开始于 2026年11月21日。

  • #2135 来自 @superdav42 —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

auto-dispatch bug origin:interactive status:in-review tier:standard

What

The columns setting on the My Sites, Limits & Quotas and Current Membership elements builds a utility class from the chosen number (wu-grid-cols-N, sm:wu-grid-cols-N, lg:wu-grid-cols-N, xl:wu-grid-cols-N). assets/css/framework.css only defines some of them. Where the class is missing, the grid has a single column.

With the default columns=4, My Sites shows four columns only from 1280px up and a single column at 1024px and 768px. columns=5 is always a single column. The block-editor preview shows the same single column, because its canvas is narrower than 1280px.

Evidence

Measured on a published account page ([wu_my_sites], default columns=4), by reading the computed grid-template-columns of the grid container:

Viewport Grid columns
1440px 4
1280px 4
1024px 1
768px 1

The classes on the element are wu-grid-cols-4 sm:wu-grid-cols-4 xl:wu-grid-cols-4. Only the xl: rule exists for 4.

Utilities that exist today in assets/css/framework.css:

Variant Defined for N Lines
base 1, 2, 3 667-673
sm: 2, 3, 12 1696-1702
md: 2, 3, 4, 5, 6 1866-1878
lg: 3, 4 1947-1950
xl: 3, 4 1959-1962

Templates that build the class from a setting:

  • views/dashboard-widgets/my-sites.php:31: base, sm: and xl:; columns is 1 to 5 (inc/ui/class-my-sites-element.php:177).
  • views/dashboard-widgets/limits-and-quotas.php:30: lg:; columns is 1 to 10 (inc/ui/class-limits-element.php:137).
  • views/dashboard-widgets/current-membership.php:116: sm:; columns is 1 to 5 (inc/ui/class-current-membership-element.php:192).
  • views/checkout/templates/template-selection/clean.php:88 and legacy.php:175: md:, which is fully covered today.

None of this changed in the account work (#2133). It is on main.

Files to modify

  • assets/css/framework.css and the regenerated assets/css/framework.min.css (run pnpm run cleancss; the PR build checks the minified file is current).
  • Possibly the three dashboard-widget templates above, if the responsive pattern is changed rather than the utilities added.
Files Scope
  • assets/css/framework.css
  • assets/css/framework.min.css
  • views/dashboard-widgets/my-sites.php
  • views/dashboard-widgets/limits-and-quotas.php
  • views/dashboard-widgets/current-membership.php

Reference pattern

The existing rules, for example framework.css:667 and framework.css:1866:

.wu-styling :is(.wu-grid-cols-3) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

inside the matching @media (min-width: ...) block for the variants.

Decision to make

Either define every N each template can emit (smallest change, no markup change, keeps "N columns at every width" for the base class), or make the templates responsive so the setting is the maximum, for example wu-grid-cols-1 sm:wu-grid-cols-2 lg:wu-grid-cols-3 xl:wu-grid-cols-N. The second avoids four cramped columns on a phone but changes the layout of sites that already use 2 or 3 columns, so keep existing sites unchanged at N <= 3 unless there is a clear reason.

Verification

  • With a customer who owns at least four sites, measure the grid's computed column count at 375, 768, 1024, 1280 and 1440px for columns 1 to 5 on a published page, and in the block-editor preview.
  • Confirm the limits and current-membership elements at their own maximum columns.
  • git diff of the stylesheet is additions only. pnpm run cleancss leaves no diff.

Tier

tier:standard. The affected files and reference pattern are known, but the responsive behaviour is a design choice.


aidevops.sh v3.39.189 plugin for OpenCode

主要语言
PHP
星标
219
派生
88
平均合并
1 天 7 小时
30 天内合并 PR
58

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Ultimate-Multisite/ultimate-multisite 的其他 Issue

查看 Ultimate-Multisite/ultimate-multisite 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。