Skip to content

fix: persist Building Blocks sidebar filter toggles#4448

Open
coffeenjoyer17 wants to merge 1 commit intosuperplanehq:mainfrom
coffeenjoyer17:fix/persist-building-blocks-filters
Open

fix: persist Building Blocks sidebar filter toggles#4448
coffeenjoyer17 wants to merge 1 commit intosuperplanehq:mainfrom
coffeenjoyer17:fix/persist-building-blocks-filters

Conversation

@coffeenjoyer17
Copy link
Copy Markdown

Closes #4370

Summary

The Connected Integrations on Top and Show integration setup status toggles in the Building Blocks sidebar reset whenever the sidebar remounts — selecting a component, opening the sidebar again, or navigating away and back. The issue references the connected-on-top filter; the setup-status toggle sits in the same dropdown and exhibits the same problem, so this PR persists both for consistency.

Implementation

Both toggles are now hydrated from localStorage on mount and written back on every change, matching the pattern already used for sidebarWidth in the same component:

  • componentSidebarShowSetupStatus — default true
  • componentSidebarConnectedOnTop — default false

Key constants are exported from ui/CanvasPage/index.tsx next to the existing COMPONENT_SIDEBAR_WIDTH_STORAGE_KEY. SSR-safe (typeof window === "undefined" guard) like the existing width init.

Verification

  • tsc --noEmit -p . clean.
  • Existing filter.spec.ts and CategorySection.spec.tsx still pass (15 tests).
  • npm run lint:budget totals are unchanged from main.
  • DCO sign-off included.

The 'Connected Integrations on Top' and 'Show integration setup status'
toggles in the Building Blocks sidebar previously reset every time the
sidebar remounted (selecting a component, navigating, etc.) because the
state was held only in component state.

Both toggles are now backed by localStorage, mirroring the pattern already
used for the sidebar width. Defaults are preserved (setup status on,
connected-on-top off) when no value has been written yet.

Closes superplanehq#4370

Signed-off-by: coffeenjoyer17 <pufleacristian56@gmail.com>
@superplanehq-integration
Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

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.

Connected Integrations on Top filter does not persist

1 participant