Skip to content

New playground#3573

Merged
duailibe merged 45 commits intoprettier:masterfrom
duailibe:new-playground
Apr 20, 2018
Merged

New playground#3573
duailibe merged 45 commits intoprettier:masterfrom
duailibe:new-playground

Conversation

@duailibe
Copy link
Copy Markdown
Collaborator

@duailibe duailibe commented Dec 26, 2017

Context: #3352

This is still WIP and just a POC of a Preact app with no build steps (I opened facebook/docusaurus#292 to discuss how to reuse Docusaurus infrastructure - then we could use classes and stuff). This is very early but it was usable (commit is a few weeks old, before the big refactor).

I'm opening before finishing to gather feedback: should we keep the "no build steps" for this? It's nice having only one command and not as nice having to use two separate workflows when working on the site (one for docusarus part, other for the playground only) but it's doable.. Ideally I'd want a way to integrate with docusaurus infrastructure (transpilation, dev server, React itself).. anyway, tell me what you think!

@duailibe
Copy link
Copy Markdown
Collaborator Author

duailibe commented Dec 26, 2017

Something's wrong in the preview (as I said, commit is pretty old) will investigate

@azz
Copy link
Copy Markdown
Member

azz commented Dec 26, 2017

Would be really cool if Docusaurus worked like a GatsbyJS plugin. Keep the SSR, single build step, but ability to hydrate the DOM for the playground.

@duailibe
Copy link
Copy Markdown
Collaborator Author

@azz Yeah that's the gist of what I suggested in facebook/docusaurus#292

@lipis
Copy link
Copy Markdown
Member

lipis commented Dec 29, 2017

Can you deploy this somewhere, so people could test it easier?

@j-f1
Copy link
Copy Markdown
Member

j-f1 commented Dec 29, 2017

@lipis
Copy link
Copy Markdown
Member

lipis commented Dec 29, 2017

screen shot 2017-12-29 at 17 23 57

@j-f1
Copy link
Copy Markdown
Member

j-f1 commented Dec 29, 2017

Something's wrong in the preview (as I said, commit is pretty old) will investigate

From @duailibe above.

@ikatyang
Copy link
Copy Markdown
Member

That's #3581, should be fine now.

@duailibe
Copy link
Copy Markdown
Collaborator Author

I merged the master branch, let's see if that fixes it

@j-f1
Copy link
Copy Markdown
Member

j-f1 commented Dec 29, 2017

[off-topic]: Could whoever has access to Netlify make the deploy logs publicly visible so contributors can see what wen wrong if the build fails?

@duailibe
Copy link
Copy Markdown
Collaborator Author

duailibe commented Dec 29, 2017

Sorry guys, I forgot this is based on #3433 and I removed the reference to it before creating the PR

Let's see if we can land that soon... otherwise, I'll reference by the commit hash and continue work on this

@duailibe
Copy link
Copy Markdown
Collaborator Author

Yay it's finally working :)

@j-f1
Copy link
Copy Markdown
Member

j-f1 commented Dec 31, 2017

👍, but 3️⃣❓:

  1. What happened to the “Debug” section?
  2. Would it be possible to add a “Reset to default” button that resets all of the buttons to their defaults?
  3. Would it be possible to make the example code a placeholder so you don’t have to delete it before putting your own code in? (or would that be a bad idea?)

@duailibe
Copy link
Copy Markdown
Collaborator Author

  1. Not implemented yet
  2. Yeah sure.. as a P/React component it's easy to do that =)
  3. I don't know.. we can choose to:
    • always use a placeholder
    • save last code used (+ options)
    • always empty

Those are great but are unrelated to this PR (2 & 3).. I mostly wanted to gather feedback if we should continue with no build steps (just serving from static/) or if we should put a separate build step for the playground

I think we can add separate issues for those subjects :)

@duailibe
Copy link
Copy Markdown
Collaborator Author

duailibe commented Jan 7, 2018

@azz @ikatyang @vjeux do you guys think I should go forward to get this landed "as is", wait for docusaurus to support this or implement a separate build step? Or give up on this at all

@vjeux
Copy link
Copy Markdown
Contributor

vjeux commented Jan 7, 2018

I don't personally care either way as long as we have a working playground at the end :)

@azz azz added the status:wip Pull requests that are a work in progress and should not be merged label Jan 9, 2018
@azz
Copy link
Copy Markdown
Member

azz commented Jan 11, 2018

I just reviewed the code, it does look a lot better than what we have now. Do you want to bring it back up to date and land it as-is?

Possibly related, I was just reading the code of https://github.com/sandhose/prettier-animated-logo which is also written with Preact, but is for the main page. Would be nice to get full p?react support with Docusaurus to make integrating that easier. Currently it is rendered to static markup build-time.

@duailibe duailibe removed the status:wip Pull requests that are a work in progress and should not be merged label Apr 17, 2018
@duailibe duailibe changed the title [WIP] New playground New playground Apr 17, 2018
Comment thread .eslintrc.yml Outdated
- error
- never
- exceptRange: true
overrides:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You could put this in website/playground/.eslintrc.yml instead to avoid having to use the overrides.

@lipis
Copy link
Copy Markdown
Member

lipis commented Apr 18, 2018

Placeholders were nice to have (or any other way to have have the sample code).. will they land in another PR if this is about to get merged or we dropping them?

@duailibe
Copy link
Copy Markdown
Collaborator Author

I'm still gonna add them in this PR.. only the range stuff I'm gonna do in another PR

@duailibe
Copy link
Copy Markdown
Collaborator Author

I ended up doing both the examples and the range feature in this PR =)

Gonna merge when lint/tests pass and I do some smoke testing with the deploy preview

@duailibe duailibe merged commit 091edee into prettier:master Apr 20, 2018
@duailibe duailibe deleted the new-playground branch April 20, 2018 15:08
@duailibe
Copy link
Copy Markdown
Collaborator Author

I hate when I press merge instead of the squash button 😔

@j-f1
Copy link
Copy Markdown
Member

j-f1 commented Apr 20, 2018

@duailibe Should we disable the other merge types (admins can do it in settings), or are there times we use them in this repo?

@duailibe
Copy link
Copy Markdown
Collaborator Author

duailibe commented Apr 20, 2018

@j-f1 I think we can (TBH I don't think there's much use in doing it other way anyway) cc @vjeux @azz @suchipi

@vjeux
Copy link
Copy Markdown
Contributor

vjeux commented Apr 20, 2018

Sgtm

@lipis
Copy link
Copy Markdown
Member

lipis commented Apr 23, 2018

I disabled the other two options (if for whatever reason, we need any other option, we can easily enable it before doing it)

screen shot 2018-04-23 at 13 28 24

@lipis lipis added this to the 1.13 milestone May 9, 2018
@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 18, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants