Skip to content

style: bordered frame for stacked popover sections - #15

Open
perlowja wants to merge 1 commit into
singularityos-lab:mainfrom
perlowja:feat/sensors-resource-section-outline
Open

perlowja wants to merge 1 commit into
singularityos-lab:mainfrom
perlowja:feat/sensors-resource-section-outline

Conversation

@perlowja

@perlowja perlowja commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Adds .sensors-resource-section -- a 1px border, 8px radius, and padding around each grouped section, so stacked resource-pool sections sharing one popover column (GPU, VPU, Storage, ...) read as distinct cards instead of one continuous list.

Restores styling from an earlier, unmerged NCZ patch to singularity-shell (commit df20256, from before the sensors popover moved into its own plugin) -- the class never made it into libsingularity, so it silently had no effect once the code it targeted was rewritten.

Companion PR against singularity-plugins (to follow) applies this class in the sensors plugin's section builder.

Assisted-by: Claude Code:claude-sonnet-5
AI scope: added the CSS rule, ported from the prior unmerged patch.

AI assistance: disclosed

@perlowja
perlowja force-pushed the feat/sensors-resource-section-outline branch from e1a10f4 to 006a583 Compare September 18, 2026 20:13
perlowja added a commit to perlowja/singularity-plugins that referenced this pull request Sep 18, 2026
Two related restorations to the sensors popover's detail layout, both
regressed when sensors moved from panel.vala into its own plugin:

1. Column count now derives from the monitor scale factor as well as
   logical width (see configure_detail_layout()), up to 3 columns
   instead of a fixed 1-or-2 split at one logical-width breakpoint. A
   scaled HiDPI panel can therefore use more columns than a native
   low-resolution display at the same logical width. Ports the density
   calculation from a working, screenshot-verified prototype
   (SensorsIndicator, merged upstream once already as #27, later
   simplified when sensors moved into this plugin).

2. begin_detail_section() now applies the sensors-resource-section CSS
   class (singularityos-lab/libsingularity#15) so each resource-pool
   section reads as a bordered card, restoring styling from an earlier
   unmerged NCZ patch (df20256) that never survived the plugin rewrite.

Section-to-column placement stays the same always-balance-the-shortest-
column approach already in place, just generalized from 2 fixed fields
(detail_left/detail_right) to an array sized by the new column count.
The scrolled-window safety net for unusually many rows on a short
display is unchanged.

Depends on singularityos-lab/libsingularity#15 for the CSS class.

Assisted-by: Claude Code:claude-sonnet-5
AI scope: generalized the column layout to N columns with scale-factor
awareness, wired the outline CSS class into begin_detail_section().

Assisted-by: Claude Code:claude-sonnet-5

AI-Scope: Ported DPI-aware balanced column layout (get_scale_factor()-based density calc, up to 3 columns) for the sensors panel from a prior NCZ prototype.
Adds a .sensors-resource-section CSS class: a 1px border, 8px radius,
and padding around each grouped section so stacked resource-pool
sections sharing one popover column (GPU, VPU, Storage, ...) read as
distinct cards instead of one continuous list.

Restores styling from an earlier, unmerged NCZ patch to singularity-shell
(commit df20256, before the sensors popover moved into its own plugin) --
the class was never carried into libsingularity when that patch was
written, so it silently had no effect once the panel code it targeted was
rewritten. Companion PR against singularity-plugins applies this class in
the sensors plugin's section builder.

Assisted-by: Claude Code:claude-sonnet-5
AI-Scope: Restored .sensors-resource-section bordered-card CSS outline styling from a prior isolated NCZ commit, never carried into the current sensors plugin.
@perlowja
perlowja force-pushed the feat/sensors-resource-section-outline branch from 006a583 to 9884b17 Compare September 18, 2026 20:14
perlowja added a commit to perlowja/singularity-plugins that referenced this pull request Sep 18, 2026
Two related restorations to the sensors popover's detail layout, both
regressed when sensors moved from panel.vala into its own plugin:

1. Column count now derives from the monitor scale factor as well as
   logical width (see configure_detail_layout()), up to 3 columns
   instead of a fixed 1-or-2 split at one logical-width breakpoint. A
   scaled HiDPI panel can therefore use more columns than a native
   low-resolution display at the same logical width. Ports the density
   calculation from a working, screenshot-verified prototype
   (SensorsIndicator, merged upstream once already as #27, later
   simplified when sensors moved into this plugin).

2. begin_detail_section() now applies the sensors-resource-section CSS
   class (singularityos-lab/libsingularity#15) so each resource-pool
   section reads as a bordered card, restoring styling from an earlier
   unmerged NCZ patch (df20256) that never survived the plugin rewrite.

Section-to-column placement stays the same always-balance-the-shortest-
column approach already in place, just generalized from 2 fixed fields
(detail_left/detail_right) to an array sized by the new column count.
The scrolled-window safety net for unusually many rows on a short
display is unchanged.

Depends on singularityos-lab/libsingularity#15 for the CSS class.

awareness, wired the outline CSS class into begin_detail_section().

Assisted-by: Claude Code:claude-sonnet-5
AI-Scope: Ported DPI-aware balanced column layout (get_scale_factor()-based density calc, up to 3 columns) for the sensors panel from a prior NCZ prototype.
@perlowja

Copy link
Copy Markdown
Contributor Author

@mirkobrombin bumping this - small CSS-only addition, the sensors-plugin PR (singularity-plugins#2) depends on it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant