Skip to content

Add hotkey and button for layer visibility #8122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

hipsterusername
Copy link
Member

A new feature was implemented to show/hide all non-raster layer categories in Canvas Layers.

  • A new Redux action, allNonRasterLayersIsHiddenToggled, was added to canvasSlice.ts. This action toggles the visibility of Control Layers, Inpaint Masks, and Regional Guidance. The logic ensures that if any non-raster layer is visible, all are hidden; if all are hidden, all are shown. Raster layers remain unaffected.
  • A new hook, useNonRasterLayersIsHidden.ts, was created to derive the current hidden state of all non-raster layers, informing UI elements.
  • A new component, CanvasNonRasterLayersIsHiddenToggle.tsx, was introduced. This component provides a button that visually indicates the hidden state (eye open/closed) and dispatches the toggle action on click.
  • The CanvasNonRasterLayersIsHiddenToggle button was integrated into EntityListSelectedEntityActionBar.tsx for easy access within the Canvas Layers panel.
  • A new hotkey hook, useCanvasToggleNonRasterLayersHotkey.ts, was implemented and integrated into CanvasLayersPanelContent.tsx. This registers Shift+H as a hotkey in useHotkeyData.ts to trigger the allNonRasterLayersIsHiddenToggled action, providing a quick keyboard shortcut.
  • New translation strings were added to en.json for the hotkey documentation and button tooltips.

@github-actions github-actions bot added the frontend PRs that change frontend files label Jun 23, 2025
@psychedelicious psychedelicious force-pushed the cursor/add-hotkey-and-button-for-layer-visibility-33c6 branch from 1be27fb to 2bd0e98 Compare June 27, 2025 01:35
@psychedelicious psychedelicious merged commit 605b912 into main Jun 27, 2025
12 checks passed
@psychedelicious psychedelicious deleted the cursor/add-hotkey-and-button-for-layer-visibility-33c6 branch June 27, 2025 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants