Keep settings tuned for one theme from applying under every other theme
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
Start with Sources/StableBar/ThemeConfiguration.swift and Sources/StableBar/ConfigurationLoader.swift to understand profile conditions and when the selected theme is resolved; then read Sources/StableBar/WidgetPackage.swift and Sources/StableBar/Configuration.swift for theme and configuration validation. The proposal also spans profile editing, Theme and widget Style settings, and undoable configuration changes, so identify those entry points before estimating implementation. Done means theme conditions match the selected theme as described and theme scoped settings can be edited and migrated in Settings.
索引モデルが issue の本文から書いたものです。
説明
Problem
A theme can't hold everything its look needs. A theme may contain only tokens, defaults, popupDefaults, roles, workspaceDefaults, bar, groups and profiles (validateThemeDocument in Sources/StableBar/WidgetPackage.swift), so the rest of the look goes in the main file:
- widget paddings sized for the theme's pills
- a clock drawn as an accent chip
- a filled slider style
- an Apple menu symbol
- a package widget's layout in
widgetOverrides - empty
groupsentries, needed only because a widget in a group the theme doesn't define fails the whole configuration ("Unknown group" inSources/StableBar/Configuration.swift)
Those values apply under every theme. Switch from Fern to Nord and the clock is still an @token.accent chip, and the widgets keep paddings meant for pills. Theme lists the values below the gallery, and Reset them deletes them, so going back to Fern means doing the work again.
Profiles can't help: they match appearance, onBattery, displayCount, externalDisplay and app (ProfileConditions in Sources/StableBar/ThemeConfiguration.swift), not the theme.
Proposal
-
A
themeprofile condition that matches the selected theme's ID, at any version, with"built-in"for Built-in:"profiles": [ { "name": "Fern", "when": { "theme": "fern" }, "configuration": { "widgetOverrides": { "date": { "group": "clock", "background": "@token.accent" }, "battery": { "group": "status", "style": { "paddingHorizontal": 12 } } }, "groups": { "clock": { "style": { "paddingLeading": 3 } } } } } ]composeFilesinSources/StableBar/ConfigurationLoader.swiftsettles the theme before profiles apply, including a screen setup's own theme and the theme Try Themes shows, so the condition reads that theme and a profile can't change it in a loop. Group memberships can move into the profile too, so the main file no longer needs emptygroups. Versions that don't know the condition never match it (Files from a newer StableBar), so the profile just stays off there. -
Settings → Profiles → + Condition offers Theme, listing the built-in and installed themes.
-
At the top of Theme and in a widget's Style tab, a scope switch: Every theme or Only with Fern. With Only with Fern, changes save into a profile with that condition, created on first use, the way Edit the bar for this profile saves into a profile today.
-
When the main file overrides the theme, Theme's notice offers to keep those values with a theme as well as Reset them: it moves them into that theme's profile in one undoable change.
The exact wording and placement of the switch and the notice are a matter of taste; renders of a few options can follow in a comment.
Possible today
Partly. Put the settings in a profile without when and turn it off with "enabled": false when switching theme, or pin it with "profile" or StableBar --profile. Pinning turns off automatic matching for every other profile, and nothing ties either way to the theme.
Related
- #81 asked for profile conditions set by commands and was closed as not planned ("
--profilecovers most of it"). The theme is different: StableBar already knows it, and pinning a profile turns off automatic matching for the others. - #28 stopped colors that StableBar wrote from overriding a chosen theme, #30 lists what overrides the theme, and Save as Theme (#91, #143) moves the shared look into a theme but leaves widget styles in the main file.
- #648 (open) adds group editing in Settings, which writes
groupsand widgetgroup. - Themes that carry named looks (any role name, with roles and groups the theme lacks ignored) were considered instead. They would let a theme package ship reusable looks, but they change what a role is, and they can't hold a widget's own layout or symbol.
Triaged by Claude Code (Claude Opus 5.5).
- 主要言語
- Swift
- スター
- 184
- フォーク
- 12
- 平均マージ
- 3時間 50分
- マージ済み PR(30日)
- 387
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Seb-GRAF/StableBar のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 1 日以内に返信
-
Menu bar items drawn as in the menu bar show the wrong part of the menu bar after a display change対応中かも @Jonathanm10 が今日担当しました。 オープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
-
Allow the App Menu to display the frontmost app icon対応中かも @khatami10 が今日担当しました。 オープンenhancement needs-triage
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
Seb-GRAF/StableBar の issue をすべて見る
似ている issue
-
good first issue help wanted testing
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
area:cli documentation good first issue priority:low
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
isaaclins/freesnitch#430 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
MasterJ93/ATProtoKit#354 ·
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
heysidhant/appvanish#4 ·
-
bug priority:low status:queued
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信