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

feature(website): Update Orbit integration to fetch local server #460

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

gabrieldonadel
Copy link
Member

Why

Closes ENG-9990

In order to remove the need for an "Enable Orbit" option inside User Settings, we need to check if Orbit is available in the user's machine so we can automatically display the "Open with Orbit" button in the editor toolbar.

To achieve this functionality, Orbit v1 will ship with a local HTTP server that we can just fetch from the website and verify if Orbit is running. As long as Orbit is open, the "Open with Orbit" button should be displayed.

For more context check expo/orbit#52

How

This PR updates the Orbit integration to fetch the localhost server using the predetermined ports (35783, 47909, 44171, 50799) and wraps all the logic of this feature in a new hook called useOrbit

Test Plan

With Orbit running in the background

Screen.Recording.2023-09-06.at.17.17.07.mov

With Orbit closed

Screen.Recording.2023-09-06.at.17.28.12.mov

@linear
Copy link

linear bot commented Sep 6, 2023

Copy link
Member

@byCedric byCedric left a comment

Choose a reason for hiding this comment

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

lgtm

@gabrieldonadel gabrieldonadel merged commit 9f66db2 into main Sep 15, 2023
5 checks passed
@gabrieldonadel gabrieldonadel deleted the @gabrieldonadel/fetch-orbit-local-server branch September 15, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants