Skip to content
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

feat: add socket.io-client version selector menu #1867

Merged
merged 1 commit into from
Oct 12, 2021
Merged

feat: add socket.io-client version selector menu #1867

merged 1 commit into from
Oct 12, 2021

Conversation

blenderskool
Copy link
Contributor

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

socketio-version-menu.mp4

Fixes #1614

@netlify
Copy link

netlify bot commented Oct 11, 2021

👷 Deploy request for hoppscotch accepted.

🔨 Explore the source changes: 87c7dd7

🔍 Inspect the deploy log: https://app.netlify.com/sites/hoppscotch/deploys/61644e3282adb60008af77d8

@liyasthomas liyasthomas added the hacktoberfest-accepted Approved for Hacktoberfest label Oct 12, 2021
@liyasthomas liyasthomas self-requested a review October 12, 2021 05:51
Copy link
Member

@liyasthomas liyasthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liyasthomas liyasthomas merged commit b8ffa87 into hoppscotch:main Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Approved for Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Websocket (socket.io) not connecting
2 participants