Widget width not matching expected result on larger screen sizes

未关闭
#14,412 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@jasonvarga 已经在做这个了。

开始于 2026年8月28日。

  • #15305 来自 @jasonvarga —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
javascript, php
领域
frontend

调研方向

Read cms/resources/js/pages/Dashboard.vue and inspect the @7xl width class identified in the issue. Reproduce with two dashboard widgets configured at width 50 and a screen at least 1554px wide; done means both widgets display at 50% width. An open linked pull request already addresses this issue.

由索引模型根据 Issue 内容生成。

描述

ui widgets
Bug description

The widget width value at the 50% option does not match expectations when viewed at larger screen sizes. When set to 'width' => 50 in the configuration, it will instead show at 33% width rather than 50% width.

I've identified the source of the issue is defined in cms/resources/js/pages/Dashboard.vue, where @7xl:w-1/3 is set instead of @7xl:w-1/2. Manually changing this in the web inspector tools corrects the problem.

How to reproduce
  1. Create two collections named example_1 and example_2, or use two existing collections
  2. Define dashboard widgets in config/statamic/cp.php to the above collections:
'widgets' => [
    [
        'type' => 'collection',
        'collection' => 'example_1',
        'width' => 50,
    ],
    [
        'type' => 'collection',
        'collection' => 'example_2',
        'width' => 50,
    ],
],
  1. Navigate to the dashboard page
  2. Enlarge screen size to at least 1554px wide
  3. Observe error with width of widgets being shown at 33% instead of 50%
Logs

Environment
Environment
Application Name: **REDACTED**
Laravel Version: 12.55.1
PHP Version: 8.3.30
Composer Version: 2.9.5
Environment: local
Debug Mode: ENABLED
URL: **REDACTED**
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: redis
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 1
Sites: 1
Stache Watcher: Disabled
Static Caching: Disabled
Version: 6.7.3 PRO

Statamic Addons
statamic/seo-pro: 7.3.0
Installation

Fresh statamic/statamic site via CLI

Additional details

No response

主要语言
PHP
星标
4.9k
派生
647
平均合并
1 天 45 分钟
30 天内合并 PR
221

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

statamic/cms 的其他 Issue

查看 statamic/cms 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

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