-
Notifications
You must be signed in to change notification settings - Fork 5
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: Artsy Open #156
feat: Artsy Open #156
Conversation
c6437a8
to
1580776
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this looks like a cool tool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this!! 💜 Left a few non-blocking comments.
src/lib/open/data/config.json
Outdated
}, | ||
"environments": { | ||
"local": "http://localhost:3000", | ||
"production": "https://artsy.net", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update this from https://artsy.net
to https://www.artsy.net
to avoid the redirect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
const templatePath = removeTrailingSlash(pages[dashify(input)] || input) | ||
|
||
const path = template(templatePath, variables) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool! 💯
src/lib/open/index.ts
Outdated
Ios.openAsync({ uri }) | ||
break | ||
case "web": | ||
open(uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oclif has a built in utility for opening URLs in the browser: https://github.com/oclif/cli-ux#cliopen
Might be worth using so we can drop a dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!! 👏🏽
Unless I've misunderstood I think there are a few documentation examples that need updating. Otherwise this looks great to me, and will be very useful!
1713817
to
eb71f40
Compare
7ed660f
to
a0c05ac
Compare
🚀 PR was released in |
Description
Open Artsy pages with the iOS, Android or the browser which allows to fastly navigate to any page in our app.
Pages can be opened via a URL, a path, or an alias (e.g.
artsy open artist
will open the artist page using an artist id from the config file that can be customized).Examples:
With an alias:
opens https://artsy.net/artwork/banksy-love-rat-signed-16 on iOS
With a path:
opens https://artsy.net/artwork/banksy-love-rat-signed-16 on iOS
With a full URL:
opens https://staging.artsy.net/artwork/banksy-love-rat-signed-16 on iOS
With flags:
opens https://localhost:3000/artwork/banksy-love-rat-signed-16 on Android
With custom variables:
opens https://artsy.net/artist/andy-warhol on Android