mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #3669] [MERGED] fix: actions not working when sidebar is hidden #4485
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4485
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/3669
Author: @amk-dev
Created: 12/19/2023
Status: ✅ Merged
Merged: 12/19/2023
Merged by: @AndrewBastin
Base:
release/2023.12.0← Head:fix/actions-not-working-without-sidebar📝 Commits (1)
f862b4afix: fix actions not triggered when sidebar is not open📊 Changes
1 file changed (+5 additions, -5 deletions)
View changed files
📝
packages/hoppscotch-common/src/components/app/PaneLayout.vue(+5 -5)📄 Description
Fixes HFE-357
Before
If the sidebar is hidden, actions from components inside the sidebar are not working.
this is caused by the Sidebar Pane unmounting, resulting in the components which houses these environment models unmounting, which results in the actions defined by the defineActionHandlers unbinding, which when triggered does nothing.
this is also affecting entires in the spotlight,
etc.
After
First idea was to just use v-show instead of v-if for the pane. which will just hide the pane instead of unmounting it. this will fix our problem. but the library we use 'splitpanes' is not working properly with 'v-show'. But we simulate the behaviour by setting the pane size to 0 and hiding the splitter. This fixes the issue.
Note: this is a hotfix. The ideal way is to make a place where all our global models can be managed from. we need to make their state available globally as a service or something similar. this will be worked on later.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.