mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #1867] [MERGED] feat: add socket.io-client version selector menu #3532
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#3532
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/1867
Author: @blenderskool
Created: 10/11/2021
Status: ✅ Merged
Merged: 10/12/2021
Merged by: @liyasthomas
Base:
main← Head:socket.io-versions📝 Commits (1)
87c7dd7feat: add socket.io-client version selector menu📊 Changes
3 files changed (+212 additions, -8 deletions)
View changed files
📝
packages/hoppscotch-app/components/realtime/Socketio.vue(+62 -5)📝
packages/hoppscotch-app/package.json(+3 -1)📝
pnpm-lock.yaml(+147 -2)📄 Description
Addition of socket.io-client version selector for Socket.IO connections
This fixes the compatibility issues that were occurring due to Hoppscotch running socket.io-client v4 and servers running an older version of socket.io. Reference: Compatibility chart
A dropdown menu has been added to allow the user to choose the appropriate version of socket.io-client to use when making the connection. The default value has been set to v4 as this was the only version available before this change.
Currently, only v2, v3, v4 versions of socket.io-client are available, and all these versions of the same package were installed using the aliases feature in pnpm. I'm not sure if this has added a significant overhead on the bundle size, it might be a possible caveat to this approach(We can use dynamic imports to load rarely used versions dynamically to fix this)
Demo
https://user-images.githubusercontent.com/21107799/136808586-3a077e2e-13d4-41bd-8c18-3b9fff6be839.mp4
Fixes #1614
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.