mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #1298] [MERGED] WIP Feat/realtime tab session persistence #3215
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#3215
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/1298
Author: @badsketch
Created: 10/24/2020
Status: ✅ Merged
Merged: 10/24/2020
Merged by: @liyasthomas
Base:
feat/realtime/persistence← Head:feat/realtime-tab-session-persistence📝 Commits (6)
750bea5add persistence for tab switch and refresh to websocket realtime tab2cafc1fadd event listener to add disconnect to logs on refreshd2d3da9add persistence for tab switch and refresh to sse realtime tab760a742add partial persistence for tab switch and refresh to socketio realtime time. socket itself still has issues when stored in vuex7f8fdbbadd persistence for tab switch and refresh to mqtt realtime74b2abbremove logging because I couldn't get debugger to work📊 Changes
6 files changed (+392 additions, -152 deletions)
View changed files
📝
components/realtime/mqtt.vue(+82 -24)📝
components/realtime/socketio.vue(+107 -65)📝
components/realtime/sse.vue(+54 -28)📝
components/realtime/websocket.vue(+78 -35)📝
store/mutations.js(+44 -0)📝
store/state.js(+27 -0)📄 Description
Hey, sorry for taking so long with this 😕
I was able to add persistence to 3 out of the 4 realtime tabs. It's just SocketIO that's giving me some trouble. What I've done in each tab is move all the data into
vuexincluding each client. Like @LeoMartinDev suggested, I changed the connectionStates to be computed from the instance of each client, and renamed all of them toisConnected.SocketIO is giving me trouble because I've followed the same pattern of putting it in
vuex, but on connect, it says I'm mutating state outside of a store handler for some reason.I also haven't added persistence where it stays on the same realtime tab on refresh or going to a different tab. It just always defaults to WebSocket tab.
Anyways, hope I can get some feedback on this to match coding standards of this repo. Thanks! 🙂
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.