Skip to content

bug: Help (keyboard shortcuts) modal content renders without layout/styling #1689

Closed

Description

@sunheyi6

What happened

When opening the Help (keyboard shortcuts) modal — via ? or Ctrl/Cmd + /, or the Command Palette's "View keyboard shortcuts" entry — the dialog box/background renders, but the shortcut content inside is not laid out. The rows and sections appear without the expected grid layout: shortcut key descriptions and their <kbd> keys are not aligned into the two-column description/keys grid, the section headings lack their caption styling, and the + separators between multi-key combos are not visually distinct. In effect the content reads as plain stacked text rather than a structured cheat sheet.

The modal's own classes (.maka-help-body, .maka-help-section, .maka-help-plus) do have rules defined in apps/desktop/src/renderer/styles/help.css, and that file is imported in styles.css under layer(maka.legacy). The styles are not taking effect on the rendered content.

How to reproduce

  1. Launch the desktop app.
  2. With no input focused, press ? (or Ctrl/Cmd + /), or open the Command Palette (Ctrl/Cmd + K) and choose "View keyboard shortcuts".
  3. Observe the Help modal. The dialog box opens, but the shortcut rows are not laid out in the grid — descriptions and keys appear as unaligned plain text.

Environment

  • Maka version or commit: 72f5d981 (main)
  • OS and version: Windows 10.0.26220
  • Surface: Desktop
  • Node.js version, if running from source: —

Logs, screenshots, or additional context

  • The Help modal component lives in apps/desktop/src/renderer/keyboard-help.tsx; it renders .maka-help-body / .maka-help-section content inside a DialogContent with className="maka-help-modal".
  • The content styles are defined in apps/desktop/src/renderer/styles/help.css and imported in styles.css line 68: @import "./styles/help.css" layer(maka.legacy);.
  • maka.legacy is the last layer in cascade-layers.css, so legacy product CSS should win. Suspect the rules are either not matching the rendered DOM (e.g. the Astryx dialog surface wraps content in shadow/scoped elements that the .maka-help-* selectors don't reach), or help.css's display: grid rules are being overridden/reset by the Astryx dialog component defaults (DialogContent defaults to padding=0 and may reset child layout).
  • Note: .maka-help-modal (the class set on DialogContent) has no corresponding CSS rule anywhere — only the .maka-help-body/section/plus selectors are defined. If the intended dialog-surface styling was meant to live under .maka-help-modal, that rule appears to be missing.
中文说明(点击展开)

现象

打开帮助(键盘快捷键)弹窗——通过 ? 或 Ctrl/Cmd + /,或命令面板中的"查看键盘快捷键"入口——弹窗的框/背景能显示,但里面的快捷键内容没有布局。各行和分区没有按预期的网格布局排列:快捷键描述与其 <kbd> 按键没有对齐成两列(描述/按键),分区标题缺少其小号字样式,多键组合之间的 + 分隔符在视觉上没有区分。内容实际上看起来像普通堆叠文本,而不是结构化的速查表。

弹窗自身的类(.maka-help-body、.maka-help-section、.maka-help-plus)确实在 apps/desktop/src/renderer/styles/help.css 中有规则定义,且该文件在 styles.css 中以 layer(maka.legacy) 导入。但这些样式没有在渲染内容上生效。

复现步骤

  1. 启动桌面应用。
  2. 在没有输入框聚焦时按 ?(或 Ctrl/Cmd + /),或打开命令面板(Ctrl/Cmd + K)选择"查看键盘快捷键"。
  3. 观察帮助弹窗。弹窗框打开了,但快捷键行没有按网格布局排列——描述和按键显示为未对齐的普通文本。

环境

  • Maka 版本或提交:72f5d981(main)
  • 操作系统及版本:Windows 10.0.26220
  • 界面:Desktop
  • 若从源码运行,Node.js 版本:—

日志、截图或补充上下文

  • 帮助弹窗组件位于 apps/desktop/src/renderer/keyboard-help.tsx;它在 DialogContent(className="maka-help-modal")中渲染 .maka-help-body / .maka-help-section 内容。
  • 内容样式定义在 apps/desktop/src/renderer/styles/help.css,在 styles.css 第 68 行导入:@import "./styles/help.css" layer(maka.legacy);。
  • maka.legacy 是 cascade-layers.css 中的最后一个层,因此遗留产品 CSS 应当胜出。怀疑规则要么没有匹配到渲染的 DOM(例如 Astryx 弹窗表面将内容包裹在 shadow/作用域元素中,而 .maka-help-* 选择器无法触及),要么 help.css 的 display: grid 规则被 Astryx 弹窗组件默认值覆盖/重置(DialogContent 默认 padding=0,可能重置子元素布局)。
  • 注意:.maka-help-modal(设置在 DialogContent 上的类)在任何地方都没有对应的 CSS 规则——只有 .maka-help-body/section/plus 选择器有定义。如果原本打算在 .maka-help-modal 下放置弹窗表面样式,该规则似乎缺失了。

Activity

  1. sunheyi6 commented on Jul 31, 2026

    @sunheyi6
    ContributorAuthor
    Image
  2. GabrielDrapor commented on Aug 7, 2026

    @GabrielDrapor
    Contributor

    Investigated this on current main (4243e4f03, macOS, CDP against the live renderer) — the reported layout breakage no longer reproduces:

    • .maka-help-section dl computes the two-column description/keys grid (grid-template-columns resolves to two tracks)
    • section headings carry the caption typography (12px/600)
    • Kbd chips render their keycap chrome (background + radius), and the + separators render distinctly

    The plain-stacked-text state traces to the maka.legacy-era cascade this issue was filed against (72f5d981); the layer-governance refactors since (#1878/#1893 and the cascade-layers rework) resolved it.

    Two follow-ups came out of the investigation:

    Recommend closing this once #2418's regression pins land — happy to adjust if anyone can still reproduce the layout state on a current build.

  3. sunheyi6 commented on Aug 7, 2026

    @sunheyi6
    ContributorAuthor

    ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions