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

chore(website): Update Orbit deep link route #548

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

gabrieldonadel
Copy link
Member

@gabrieldonadel gabrieldonadel commented Jan 26, 2024

Why

With the new experienceURL format Orbit can no longer distinguish an Expo Update from an Snack just by checking the URL, because of that we should use the /snack route which is specific for snacks

Closes ENG-11059

How

Update Orbit deep link route to use /snack

Test Plan

Run snack locally and launch Orbit from the button

Screen.Recording.2024-01-26.at.11.34.46.mov

@@ -66,14 +66,15 @@ export function useOrbit() {
return;
}

const deeplink = `expo-orbit://snack/${experienceURL.replace('exp://', '')}`;
Copy link
Member

Choose a reason for hiding this comment

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

I think this might actually break the URL spec. What you'll get is something like this:

expo-orbit://snack/u.expo.dev/XXX?snack=YYY&snack-channel=ZZZ...

I don't think the u.expo.dev is allowed as path name characters.

Copy link
Member

@byCedric byCedric Jan 26, 2024

Choose a reason for hiding this comment

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

A good example here is Cloudflare, no idea wtf is going on here but it seems I broke their implementation of matching CNAME records with this type of URL https://expo-snack.app/u.expo.dev/xxx?snack=yyy

And even the actual URL breaks due to some SSL cypher issues https://xxx.50.expo-snack.app/u.expo.dev/xxx?snack=yyy

Copy link
Member

Choose a reason for hiding this comment

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

That being said, if it works 🤷

Copy link
Member Author

@gabrieldonadel gabrieldonadel Jan 26, 2024

Choose a reason for hiding this comment

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

Ohh I see, we should probably try to stay in the URL spec. What if we used expo-orbit://snack/?url=exp://u.expo.dev/XXX?snack=YYY&snack-channel=ZZZ... instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've updated this PR and Orbit to support the following format expo-orbit://snack/?url=exp://u.expo.dev/XXX?snack=YYY&snack-channel=ZZZ

Copy link

linear bot commented Jan 29, 2024

@gabrieldonadel gabrieldonadel merged commit f820185 into main Jan 29, 2024
4 of 5 checks passed
@gabrieldonadel gabrieldonadel deleted the @gabrieldonadel/fix-orbit-integration branch January 29, 2024 16:14
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