List third-party bar widgets that declare display modes in the Icons editor - #43
Open
monsonjeremy wants to merge 1 commit into
Open
List third-party bar widgets that declare display modes in the Icons editor#43monsonjeremy wants to merge 1 commit into
monsonjeremy wants to merge 1 commit into
Conversation
…editor
A third-party bar widget can now opt into the Control Center's Icons
appearance editor by declaring the displayMode values it renders in its
manifest: "x-shibumi": { "displayModes": ["full", "icon", "text"] }.
The plugin catalog carries the validated declaration, the workbench adds
one catalog option per declared enabled widget under its dynamic
G:<plugin id> group, and the mode chooser offers only the declared modes in
V2 (V1 stays at Default, matching the state service's normalization).
Widgets without the declaration keep their original rendering and stay in
Plugins.
Affected plugins: hancore.shibumi.control-center.
Checks: tests/control-center-regression.sh (installed-source-parity
baseline), tests/documentation-regression.py, git diff --check. The smoke
test now adds a flag-gated third-party fixture entry and asserts it is
listed with modes icon,full in V2, Default-only in V1, and that an
undeclared widget is not listed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Third-party bar widgets can opt into the Control Center's Icons appearance editor by declaring the
displayModevalues they render:Today the editor builds its list from the fixed
WidgetCataloggroups, so a third-party widget that already honors thedisplayModesetting the host injects (icon / full / text) has no tile and no way for the user to pick a mode (omarchy bar set … displayModeis overwritten by the group store). With this change:ControlCenterPanel.buildPluginEntriescarries a validateddisplayModeslist per plugin (unknown values dropped; a widget that cannot renderfullis not listed).WidgetAppearanceWorkbenchadds one catalog option per enabled, declared, non-suite bar widget under its dynamicG:<plugin id>group, and the mode chooser offers only the declared modes in V2. V1 keeps such widgets at Default, matchingnormalizedDisplayModein the state service. Surface/color/outline controls apply through the host slot as before.Affected plugins:
hancore.shibumi.control-center(plus docs, changelog, and tests). No state-service or bar-host changes.Motivating widget: monsonjeremy.omachess, which declares the key and renders all three modes.
Checks
All pass. The smoke test now adds a flag-gated third-party fixture entry (
thirdPartyAppearanceFixtureon the test panel, so baseline widget counts asserted elsewhere are untouched) and asserts that a declared widget is listed with modesicon,fullin V2 and Default-only in V1, and that an undeclared widget is not listed. I confirmed the new assertion fails againstmainwithout the implementation.tests/test_shibumi_suite.pywas run but itstest_sandbox_update_advances_beta_7_to_beta_9errors on my shallow clone (missing tagv0.1.1-beta.7); the other 98 tests pass and the error reproduces on an unmodified tree.The installed-package baseline could not be used because my installed Omarchy shell drifts from the pinned package digest, hence the source-parity profile.
Live evidence and remaining gate
Widget side, on a real Wayland session (Omarchy shell + Shibumi 0.1.1-beta.11, V2 layout): writing
displayModeicon / text / full intobar.shibumi.widgets["G:monsonjeremy.omachess"]renders the expected pill in each mode, which is the path this editor writes throughsetGroupSetting.Not exercised live: the modified Control Center itself on a Wayland session (I did not want to overlay files onto a suite-managed install). The remaining gate is opening Icons with a declared third-party widget enabled and confirming the tile, preview glyph, mode chooser, and reset behave in both V1 and V2.