Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Register studio as a url handler for foxglove:// files #604

Merged
merged 2 commits into from Apr 16, 2021

Conversation

defunctzombie
Copy link
Contributor

@defunctzombie defunctzombie commented Apr 16, 2021

This change adds support for foxglove:// urls and File -> New Window.

foxglove:// url support provides a way for hyperlinks links to invoke actions into the studio app. Such actions could include features like loading a bag file and jumping to a particular time, loading specific layouts, etc.

The first supported link is foxglove://open?type=rosbag&url=http://.... Clicking the link will inform studio to open the remote bag file.

Here is what a link to our demo bag would look like.
foxglove://open?type=rosbag&url=https://storage.googleapis.com/foxglove-public-assets/demo.bag

desktop/index.ts Outdated Show resolved Hide resolved
desktop/index.ts Outdated Show resolved Hide resolved
Add an "open" command with support for rosbag files from urls
@defunctzombie defunctzombie force-pushed the roman/fg-364-foxglove-url-handler branch from 155cba2 to 77377b4 Compare April 16, 2021 17:37
@defunctzombie defunctzombie merged commit d5a96d3 into main Apr 16, 2021
@defunctzombie defunctzombie deleted the roman/fg-364-foxglove-url-handler branch April 16, 2021 18:40
Comment on lines +83 to +84
// Note: this API is supposed to be superseded by webContents.setWindowOpenHandler,
// but using that causes the app to freeze when a new window is opened.
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 is fixed by electron/electron#29851

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants