# 新主题和组件布局

**URL:** https://meta.discourse.org/t/new-themes-components-layout/357320
**Category:** UX
**Created:** [2025年三月14日 17:12 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320 "2025-03-14T17:12:49Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [2025年三月14日 17:12 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/1 "2025-03-14T17:12:49Z")

</div>

这个布局你确定吗？

 ![图片显示了一个可定制的 Discord 网站界面，提供主题和组件，例如“删除帐户请求”、“添加类别列”、“添加到关于信息”、“AI 机器人 - 新问题模态框”。 (Tekoälyn laatima kuvateksti)](https://global.discourse-cdn.com/meta/original/4X/3/b/d/3bd49dd26800a2228dbeb668292714fedf08b44d.jpeg)

这使得找到正确的组件非常困难。而且看起来……真的很不安宁。

而且我认为安装按钮应该是第一个组件，而不是最后一个。它比其他组件使用更频繁。

禁用的组件在哪里，那些没有连接任何主题的组件？

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2025年三月14日 19:38 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/2 "2025-03-14T19:38:03Z")

</div>

这个改动很有意思！

看看最初的 PR，例如：

> <https://github.com/discourse/discourse/pull/28828>
>
> This PR introduces the new config route for \`admin/config/look-and-feel\`, which …will house themes, components, and color schemes. Also included are new components to render themes as theme cards.
> 
> Work will continue to add other features, but to keep this PR contained to themes specifically, we are merging this as a WIP.
> 
> \<img width="1434" alt="image" src="https://github.com/user-attachments/assets/e4791bfe-bc4c-476c-80aa-823c174c08c1"\>

> <https://github.com/discourse/discourse/pull/29245>
>
> This PR:
> 
> \- Removes components from being displayed in the card
> \- Adds a DMen…u to house previous footer actions
> \- Allows themes to be updated from this grid, with an animation and different border to show the update is happening
> \- Stops position of cards changing when default changes
> \- Fixes outline colour not changing when default changes
> \- Show a global notice on the page when previewing a theme
> \- Allows updating a theme from the grid, and showing an indicator of what theme needs to be updated
> \- Moves "Set as default" to the dropdown for the theme
> \- Show screenshot for theme if it is available
> \- Prevent page reloading when updating the theme
> \- Fixes theme install modal on grid page
> 
> \<img src="https://github.com/user-attachments/assets/1bcf0a49-d078-4364-a67a-967fd0ab8e0a" width="300" /\>
> \<img src="https://github.com/user-attachments/assets/5c557030-fcc1-450e-877d-4686d3999dad" width="300" /\>

（还有 #29225, #29079）

我很欣赏简化和创建更用户友好界面的意图。  
我认为，配上合适的截图和描述，它会看起来相当不错！  
合并主题和组件是有意义的。  
避免多个侧边栏似乎也是个好主意。

我最直接的担忧是缺少搜索和过滤功能，但我相信 UI 稍后会通过改进得到完善。当有很多组件时，这是一个必备功能。

其他反馈：

- 正如 Jakke 所说，安装按钮应该放在顶部，或者至少有一个快捷方式。  
如果有很多组件，滚动可能会令人沮丧。

- 你可以为组件“设置默认值”，当然你不应该这样做  

- 当你更新一个组件时，我期望在点击后菜单会关闭：  

- 我们能找到一个更短的标签吗？ 😄  
 ![image](https://global.discourse-cdn.com/meta/original/4X/c/9/6/c96206f7edbe9af2d44b716accbec2ec9a497c6b.png)

- 我不介意在页面顶部有一个选项，可以选择网格或列表视图。例如：  
 ![image](https://global.discourse-cdn.com/meta/original/4X/3/5/a/35ab3fcd853640afe7c0f3d90f87582e60f31501.png)

我期待未来的改进！

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [2025年三月14日 19:42 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/3 "2025-03-14T19:42:03Z")

</div>

我真的很想在那里搜索。在滚动浏览 Google 字体组件时，我感到有点恶心……

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [2025年三月14日 22:30 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/5 "2025-03-14T22:30:25Z")

</div>

我完全同意，这并不可行：

 ![The image shows a variety of theme and component options for a website, labeled under headers like "Brand Header," "Canvas Styles," "Development," and "Extra Banners," each with an array of colored shapes and text descriptions such as "Theme development helpers and styles." (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/2/8/5/285a1c14b8a39324613a838a280964c69a5de058.png)

这让我头晕目眩……我实际上添加了一些样式，以便能够再次以直接的方式浏览组件页面 🙃 😵‍💫

 ![The image displays a management interface for Discourse themes, featuring a list of editable components and an installation button with helpful links and resources. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/b/3/e/b3e24c5abd22b3f8587c6f232f4c280687d1b865.png)

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2025年三月14日 22:34 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/6 "2025-03-14T22:34:21Z")

</div>

> [@manuel](#):
>
> 我实际上添加了一些样式，以便能够再次以直接的方式导航组件页面 🙃 😵‍💫

我试图做的也是一样。 😄  
出于好奇，我试图创建一个列表或网格按钮，并按状态对其进行分组。在顶部添加一些过滤选项会很酷。  
不过，网格视图对某些人来说可能很有趣。至少对于主题来说，这是有意义的。

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2025年三月14日 22:35 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/7 "2025-03-14T22:35:18Z")

</div>

@osama @ella 和 @hugh 对这项工作非常中级，并且正在内部讨论其中的一些内容。

当然，继续在这里分享你的反馈，但请预计在不久的将来，这些内容仍会不断变化。

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2025年三月15日 02:53 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/8 "2025-03-15T02:53:34Z")

</div>

补充我上面所说的内容：

- 按状态分组
- 搜索
- 网格或列表视图

这是一个粗略的演示（我不是设计师，只是好玩做的），如果能有类似的东西我会很高兴：

对于喜欢盒子但信息量最少的人来说，另一种可能的视图：

> **图片**
>
> （灵感来自 [https://fontawesome.com/search）](https://fontawesome.com/search%EF%BC%89)
> 
> ![该图片显示了可用于编辑的在线工具和功能列表，包括“已使用”、“可用更新”和“类别横幅”等部分，以及“品牌标题”、“类别图标”和“自定义标题链接”等选项。（由 AI 标注）](https://global.discourse-cdn.com/meta/original/4X/0/f/1/0f1971e47e575d83371ddd5917a09ad5d003fd1a.png)

我希望看到的最后一个功能是能够直接从列表中启用/禁用。这会比较不直观，所以欢迎提供快捷方式。

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [2025年三月15日 07:37 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/9 "2025-03-15T07:37:47Z")

</div>

> [@manuel](#):
>
> 我实际上添加了一些样式

你愿意分享一下吗？😏

（是的，我知道这只是一个临时的解决方案，但仍然如此）

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [2025年三月15日 10:43 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/10 "2025-03-15T10:43:56Z")

</div>

\n给你 🙂

> **临时样式**
>
> ```plaintext
> .admin-config.customize.components {
> .admin-detail {
> padding: 0;
> }
> .themes-cards-container {
> display: flex;
> flex-direction: column;
> max-width: 500px;
> gap: 0;
> }
> .admin-config-area-card__content {
> flex-grow: 0;
> margin: 0;
> padding: 0;
> }
> .theme-card {
> flex-direction: row;
> margin: 0;
> padding: 0.75rem;
> padding-right: 0;
> box-shadow: none;
> border: none;
> border-top: 1px solid var(--primary-low);
>     
> &:first-child {
> border-top: none;
> }
>     
> &__image-wrapper,
> &__content {
> display: none;
> }
>     
> &__footer {
> gap: 1rem;
> }
> }
> .theme-install-card {
> margin-top: 1rem;
> }
> }
> 
> ```

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [2025年三月15日 10:49 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/11 "2025-03-15T10:49:07Z")

</div>

你是我的新英雄！

——

嗯，创建新组件不是打开设置，而是应该在列表中查找并打开。

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2025年三月15日 11:06 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/12 "2025-03-15T11:06:55Z")

</div>

> [@mcwumbly](#):
>
> 我们在这项工作中还处于中期阶段，并且正在内部讨论其中一些相同的问题。  
> 请随时在此处分享您的反馈，但请注意，在不久的将来，无论如何，这种情况都会不断变化。

我越来越确信坚持使用稳定版是最好的选择。经历了上个月的站点设置风波后，这是又一个例子：某个之前运行良好的功能，在没有功能标志设置的情况下被更改并发布到生产环境，而且尚未完成或经过充分测试。

（另外，就这项特定功能提供一些更具建设性的反馈——如果能在概览屏幕上识别出未使用的和已禁用的组件，至少会非常有帮助）。

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2025年三月15日 13:58 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/13 "2025-03-15T13:58:17Z")

</div>

> [@RGJ](#):
>
> 但它被更改并发布到生产环境中，而没有功能标志设置，而且尚未完成或经过适当测试

实际上，我刚想起来。我真心想知道为什么这个更改不包含在 [Discourse Design team experimentation topic](https://meta.discourse.org/t/discourse-design-team-experimentation-topic/285362) 中。那里是合适的地方之一，#design-experiment。

我同意感觉很仓促；在没有事先通知和功能标志设置的情况下，我理解这可能不会为管理员提供最佳体验。

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2025年三月15日 16:30 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/14 "2025-03-15T16:30:48Z")

</div>

我们有几种不同的方式来推出功能，具体取决于我们对给定更改风险的看法。

在我看来，这种情况的风险相当低。没有人的工作流程受到破坏，而且更改仅限于管理员，而不是社区中的每个成员。

我理解那些花费大量时间处理主题和组件的人会受到一些干扰。我很乐意听到更多关于此更改如何破坏任何人工作流程的故事，因为它将有助于我们为应用程序这一部分的设计做出决定。

但我认为这种情况不至于需要设计实验或功能标志。

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2025年三月15日 17:17 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/15 "2025-03-15T17:17:33Z")

</div>

> [@Arkshine](#):
>
> To complement what I said above:
> 
> - Grouped by status
> - Search
> - Grid or list view

我认为为了方便起见，您还应该能够按主题筛选组件。

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2025年三月15日 17:22 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/16 "2025-03-15T17:22:58Z")

</div>

> [@mcwumbly](#):
>
> 依我看，这种情况相当糟糕。没有人的工作流程被破坏，而且改变仅限于管理员，而不是社区的每个成员。

管理员需要让事情让他们自己的生活更轻松。也许可以理解他们会进行实验。但要给管理员一个备用方案，或者一个在经典版和新版可乐之间切换的开关。顺便说一句，我记得新版可乐并没有成功。

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [2025年三月15日 17:26 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/17 "2025-03-15T17:26:35Z")

</div>

> [@mcwumbly](#):
>
> 我希望有更多关于更改如何扰乱任何人工作流程的故事

我曾为一个客户主题工作，在更新暂存实例后，遇到了新的布局。我不得不停下来添加我上面分享的样式才能有效地继续工作。当前的布局不允许任何概览，也无法提示当前正在使用哪些组件、哪些组件已被禁用等。我认为开发一个主题或新的设置会完全破坏工作流程。

之前的列表实际上非常好。如果我没记错的话，它不久前还得到了改进。它唯一缺少的是按当前主题使用的组件进行过滤（“已使用”过滤器实际上显示了任何已安装主题使用的所有组件）。但除此之外，它是一个不需要太多改进的界面，至少对于经验丰富的管理员或开发人员来说是这样。

 ![该图像是主题的软件组件界面的屏幕截图，列出了可用组件，例如“大轮播”、“类别横幅”和“CSS 类”。 (由 AI 题注)](https://global.discourse-cdn.com/meta/original/4X/4/2/8/4286068af9d64c9f574140b7a4ff4580fa97ec14.png)

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2025年三月15日 18:06 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/18 "2025-03-15T18:06:05Z")

</div>

> [@manuel](#):
>
> 我曾为一个客户主题工作，在更新了暂存实例后，遇到了新的布局。我不得不停止工作，并添加我上面分享的样式才能有效地继续工作。当前的布局不允许任何概览，也无法提示哪些组件正在使用、哪些已禁用等。我认为开发一个主题或新的设置会完全破坏工作流程。

谢谢你的分享。  
听到更多关于人们在不同场景中遇到的问题是有帮助的。

> [@manuel](#):
>
> 它唯一缺少的是按当前主题使用的组件进行过滤（“已使用”过滤器实际上显示了任何已安装主题使用的所有组件）

感谢分享这些。

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [2025年三月15日 18:09 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/19 "2025-03-15T18:09:52Z")

</div>

嗯，我想这个话题中的每一条通知都来自于试图做某事，这是工作流程的一部分🤷‍♂️

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2025年三月15日 23:23 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/20 "2025-03-15T23:23:06Z")

</div>

我刚注意到甚至没有按名称进行过滤。

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2025年三月15日 23:40 UTC](https://meta.discourse.org/t/new-themes-components-layout/357320/21 "2025-03-15T23:40:47Z")

</div>

> [@mcwumbly](#):
>
> 我希望有更多关于这个改变如何扰乱任何人工作流程的故事，因为它将有助于我们为这个应用程序部分的设计做出决定。

我建议你们团队尝试在真实场景中实际_使用_它……有太多功能被 ~~遗漏~~ 了，或者说_消失_了。

[下一頁](https://meta.discourse.org/t/new-themes-components-layout/357320.md?page=2)
