Skip to content

feat(sidebar): add collapsible pinned places and devices sections - #1390

Merged
l0gicgate merged 4 commits into
mainfrom
feat/1389-collapsible-sidebar-sections
Oct 31, 2026
Merged

l0gicgate merged 4 commits into
mainfrom
feat/1389-collapsible-sidebar-sections

Conversation

@JoeJoeflyn

@JoeJoeflyn JoeJoeflyn commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds collapsible sections for PINNED and DEVICES in the sidebar:

  • Adds toggle headers with animated chevron indicators and item count badges when collapsed.
  • Implements split revealers (upper and lower) for the PINNED section so the currently active pinned item (first, middle, or last) smoothly glides into place under the header during collapse and glides back into its slot on expand without disappearing, flickering, or popping.
  • Persists collapsed state across windows and restarts via saved preferences.

Visual evidence

screenrecording-2026-10-03_01-46-52.mp4

How to test

  1. Open Strata and pin several folders (e.g. 3 or more).
  2. Select a middle or last pinned folder in the sidebar.
  3. Click the "PINNED" section header to collapse the section.
  4. Click the "PINNED" section header again to expand the section.

Expected result:
When collapsing, the items above and below the active folder fold away smoothly while the selected item glides up under the header without disappearing or jumping. When expanding, it glides back down to its original slot.

Related issue

Closes #1389

@JoeJoeflyn
JoeJoeflyn force-pushed the feat/1389-collapsible-sidebar-sections branch from f9c7f7a to 066994f Compare October 2, 2026 19:05
@JoeJoeflyn
JoeJoeflyn force-pushed the feat/1389-collapsible-sidebar-sections branch from 574aad4 to 8404fbd Compare October 3, 2026 07:32
Integrate the collapsible sections with the Pinned section main grew since
this branch: the per-row drop gaps, the hidden drop-only Pinned section, the
compact icon rail and the localized headings.

- Pinned rows and their drop gaps move together between the two revealers,
  so the drop targets stay interleaved with the rows after every partition.
- Collapsing happens through the shared preference binding only, so one
  toggle updates every sidebar and the binding never writes back.
- Pin chords and keycaps keep their numbers while a section is collapsed,
  matching a hidden sidebar; the icon rail, which has no headers, shows all
  sections.
- Headers use the localized PINNED and DEVICES titles with an accessible
  item count instead of tooltips on a text button.
The section boxes added their own 2px spacing on top of the drop gaps, so
pinned and device rows sat 4px further apart than the static places, and
rows next to a held-out active pin lost that spacing again.
@l0gicgate

Copy link
Copy Markdown
Contributor

Review and cleanup

Merged main at 64a90b971. The branch predates the Pinned section's drop gaps (#1692, #1713), the hidden drop-only Pinned section, the compact icon rail (#1606) and the localized headings (#1519), so the merge is an integration rather than a textual resolution. Conflicts resolved in src/ui/window.rs, src/ui/window/sidebar.rs, src/ui/preferences.rs (+ fixtures and tests), src/ui/window/tests/keyboard_dispatch.rs and docs/preferences.md.

Review against the description and #1389.

  • Toggle headers with chevron and hidden-item count: confirmed; the headers now use the existing localized PINNED/DEVICES titles and carry an accessible name, expanded state and item-count description. The tooltips were removed: the header is a text button and the repository allows tooltips on icon-only buttons only, which also removed the only untranslated strings the branch added.
  • Split revealers keeping the selected pin under the header: confirmed and kept. The partition now moves each pin together with its drop gaps, so pin-by-drag and reorder targets stay interleaved with the rows after collapsing, expanding and navigating. The original partition only moved the row buttons and would have left the gaps stranded in the upper revealer.
  • Persisted and shared across windows: confirmed. The header click now only writes the preference; the shared binding applies it to every sidebar, instead of the binding calling the setter back.
  • g 1..9 chords: the branch reported No pin N for collapsed pins while giving the still-visible selected pin chord 1, so its keycap said 2 while g 1 opened it. Chords and keycaps now keep their numbers while a section is collapsed, as they already do when the whole sidebar is hidden with Ctrl+B.
  • Compact icon rail: the rail hides the headers, so a collapsed section had no rows and no way to expand it. The rail now shows every section; the saved state applies again when the rail releases.
  • Row pitch inside the sections matched main's static places again after dropping the extra box spacing.
  • Styling uses the semantic @strata_* colors; the branch used @theme_* names that no longer exist.

Fixes pushed

  • a7bcf04f3 merge of main: carries the integration above (gap-aware partition, binding-only collapse, chord and rail behaviour, localized accessible headers, @strata_* colors) because the branch's partition and the main Pinned section could not coexist otherwise.
  • f53e7dec6 fix(sidebar): keep section rows at the sidebar's row pitch: the section boxes added 2px spacing on top of the drop gaps.

Tests removed

  • sidebar_sections::devices_section_absent_without_devices_but_pref_survives: counted header widgets and re-read a preference after a rebuild; persistence is owned by ui::preferences::tests::every_saved_preference_loads_before_any_settings_page_exists and the setter test, both extended by this PR.
  • sidebar_sections::interactive_sidebar_detach_cycle_keeps_every_row: repeated collapsed_section_keeps_active_pin_visible in a second window; the remaining test also checks the gap/row order after expanding.
  • The remaining tests seed pins through the isolated GTK bookmarks file instead of pushing into pinned_places: the bookmark watch replaced the in-memory pins mid-test, which is why the animated test could only pass by timing.

Validation

  • ./scripts/test-headless.py sidebar_sections — 7 passed
  • ./scripts/test-headless.py ui::window::tests — 228 passed
  • ./scripts/test-headless.py ui::preferences::tests — 47 passed
  • ./scripts/test-headless.py i18n:: — 12 passed; pinned_drop::tests — 5 passed; sidebar_drop_feedback — 3 passed; bookmarks — 12 passed
  • ./scripts/quality.sh fmt, ./scripts/quality.sh clippy — clean
  • Manual: launched the branch build on a private Xvfb with three pins; checked the expanded section, the collapsed section with the count badge and the active pin held under the header, and the row pitch against the static places. No QA scenario covers the section headers; qa.sh was not run.

CI: all required checks green on f53e7dec6 (run 41240345584); the QA scenarios job is dispatch-only and skips on pull requests.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(sidebar): collapsible pinned places and devices sections

3 participants