Native window chrome: one title row on every OS (no stacked bars), a contract every desktop app follows

Đang mở
#1,315 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
15/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
css, typescript
Lĩnh vực
design, desktop-dev, frontend

Hướng nghiên cứu

Start with the existing Windows WindowControls.svelte and the Svelte 5 component conventions in the kit, since that is the one piece of prior art the issue names. Read the per-OS rules table as the spec for TitleRow, CaptionButtons, AppMenu and the platform probe, and settle the token names (--title-row, --window-pad) before writing components. Done looks like the components and rules doc landing with the per-OS light/dark screenshot matrix and visual tests in the kit gate, then the Linux one-row fix in codeatlasdev/atlas#269. This is a design proposal spanning many files and three operating systems, so it needs a maintainer to scope it down before anyone starts.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Why

Atlas Desktop (Tauri) runs on macOS, Windows and Linux. Each app currently decides its window chrome by itself, and on Linux the result looks improvised: a native title bar, then a GTK menubar ("Atlas File Edit View Go Window Help") in an otherwise empty band, then the page's own drag row. That is three stacked bars (codeatlasdev/atlas#269). A native app built on @codeatlasdev/ui should look deliberate everywhere, and the kit is where that rule should live, so every app gets it for free.

Proposal: a WindowChrome contract in the kit

One title row, drawn by the page, on every OS. The rules:

macOS Windows Linux (GNOME, KDE, …) Linux tiling (Hyprland, Sway, i3)
Native title bar overlay (traffic lights inside the row) none (decorations: false) none none
Native menubar the system's own, at the top of the screen none none none
Caption buttons system traffic lights page-drawn, right, Windows 11 metrics page-drawn, order and side from gtk-decoration-layout / button-layout hidden: the WM owns the window
Drag / double-click title row title row → maximize title row → maximize n/a
Menu commands menubar plus palette palette plus a ⋯ app menu in the row palette plus ⋯ palette plus ⋯

Components and tokens:

  • TitleRow with drag region, slots (leading, title, trailing), height token --title-row, and the window pad --window-pad.
  • CaptionButtons (min / max-restore / close): per-OS glyphs, hit areas that reach the screen edge (Fitts), hover and pressed states, a red close on Windows, symbolic icons on GNOME.
  • AppMenu (⋯): every command of the old native menu, with its shortcut; the same source as the command palette.
  • A platform probe the app passes in (os, tiling, buttonLayout, prefersReducedTransparency), never sniffed from navigator.platform alone.
  • Rules doc: no stacked bars, never an empty band, one row of max --title-row height, focus order, a11y names for the caption buttons, and what to test (drag, double-click, resize edges, fullscreen F11, RTL).

Acceptance

  • The components and tokens in the kit, documented with a per-OS screenshot matrix.
  • A visual test per OS and theme (light and dark) in the kit's gate.
  • Atlas Desktop adopts it: Linux shows one row (codeatlasdev/atlas#269), and Windows moves its WindowControls.svelte into the kit.
Ngôn ngữ chính
TypeScript
Star
6
Fork
3
Merge trung bình
5 giờ 21 phút
Pull request đã merge (30 ngày)
378

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codeatlasdev/ui

Tất cả issue của codeatlasdev/ui

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.