Skip to content

refactor(toggle): Rename toggle_visibility to toggle and preserve popup IDs#18

Merged
mhiro2 merged 1 commit intomainfrom
refactor/toggle-api
Feb 24, 2026
Merged

refactor(toggle): Rename toggle_visibility to toggle and preserve popup IDs#18
mhiro2 merged 1 commit intomainfrom
refactor/toggle-api

Conversation

@mhiro2
Copy link
Copy Markdown
Owner

@mhiro2 mhiro2 commented Feb 24, 2026

Summary

  • Rename toggle_visibility() to toggle() for a more concise API
  • Rename command :PeekstackToggleVisibility to :PeekstackToggle
  • Fix popup ID persistence across hide/show cycles

Changes

  • 64f6321 : refactor(toggle): rename toggle_visibility to toggle and preserve popup IDs
    • Rename the API function from toggle_visibility() to toggle() and update the user command accordingly
    • Preserve popup IDs when reopening hidden popups by passing the original ID to popup.create()
    • Add tests to verify close operations and keymaps work correctly after hide/show cycles

…up IDs

- Rename `toggle_visibility()` to `toggle()` for brevity
- Rename command `:PeekstackToggleVisibility` to `:PeekstackToggle`
- Preserve popup IDs across hide/show cycles by passing id to popup.create()
- Rename test file to `toggle_spec.lua`
@mhiro2 mhiro2 self-assigned this Feb 24, 2026
@mhiro2 mhiro2 added the enhancement New feature or request label Feb 24, 2026
@mhiro2 mhiro2 changed the title refactor(toggle): Rename toggle_visibility to toggle and preserve popup IDs refactor(toggle): Rename toggle_visibility to toggle and preserve popup IDs Feb 24, 2026
@mhiro2 mhiro2 merged commit 246762b into main Feb 24, 2026
3 checks passed
@mhiro2 mhiro2 deleted the refactor/toggle-api branch February 24, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant