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(www): Adds CodeSandbox in Try this starter #20948

Merged
merged 5 commits into from
Feb 1, 2020

Conversation

garethx
Copy link
Contributor

@garethx garethx commented Jan 28, 2020

Description

This PR adds a CodeSandbox option to 'Try this starter' on starter pages. Like Netlify, you can deploy the starter but with the CodeSandbox option folks will also be able to see and edit a copy of the code to test out changes to the starter too.

@garethx garethx requested a review from a team as a code owner January 28, 2020 13:45
@pieh pieh changed the title Adds CodeSandbox 'Try this starter' option feat(www): Adds CodeSandbox 'Try this starter' option Jan 29, 2020
@pieh
Copy link
Contributor

pieh commented Jan 31, 2020

I will just check how adding more items to "Try this starter" impacts displayed information on narrow viewports (mostly worried about "mobile/portrait" case).

But general feature to add CodeSandbox has "+1" from me!

MichaelDeBoey
MichaelDeBoey previously approved these changes Jan 31, 2020
@garethx
Copy link
Contributor Author

garethx commented Jan 31, 2020

It looks like that section gets hidden altogether on smaller viewports

@pieh
Copy link
Contributor

pieh commented Jan 31, 2020

It looks like that section gets hidden altogether on smaller viewports

Yeah, seeing same thing. I wonder now about those svg icons that doesn't seem to be displayed anywhere at the moment.

One thing is that it adds "CodeSandbox" link before Netlify, which I'm not sure if something we need to think too much about right now, but worth mentioning:
Screenshot 2020-01-31 at 15 40 26

The CodeSandbox might just make more sense as first option as it's quickly interactive, without having to pull things from fork/clone that Netlify creates on behalf of user.

@pieh
Copy link
Contributor

pieh commented Jan 31, 2020

Hmm, the svg imports seems to just come out as undefined, but this is not directly related to this Pull Request, so let's ignore it in this PR

@pieh
Copy link
Contributor

pieh commented Jan 31, 2020

Ok the import { CodesandboxIcon } from "../../assets/vendor-logos/codesandbox.svg" is trying to get named export, it should just grab default one so we should drop { } from those statements - but it results in:
Screenshot 2020-01-31 at 15 53 53

Which (to me) lacks a bit of whitespace between items

@garethx
Copy link
Contributor Author

garethx commented Jan 31, 2020

@pieh Thanks for the feedback. I've got the icons working, and added some whitespace between the options.

@pieh
Copy link
Contributor

pieh commented Jan 31, 2020

If you have site running locally - could you paste some screenshots for folks to see? If not, I'll just update mine to use your changes.

@garethx
Copy link
Contributor Author

garethx commented Jan 31, 2020

Screenshot 2020-01-31 at 15 48 20

www/src/views/starter/source.js Outdated Show resolved Hide resolved
Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

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

Nicely done! Thank you so much ❤️

@sidharthachatterjee sidharthachatterjee changed the title feat(www): Adds CodeSandbox 'Try this starter' option feat(www): Adds CodeSandbox in Try this starter Feb 1, 2020
@sidharthachatterjee sidharthachatterjee added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Feb 1, 2020
@gatsbybot gatsbybot merged commit d10b3e5 into gatsbyjs:master Feb 1, 2020
@gatsbot
Copy link

gatsbot bot commented Feb 1, 2020

Holy buckets, @garethx — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants