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

Support for Reason #4

Open
ShalokShalom opened this issue Sep 6, 2017 · 16 comments
Open

Support for Reason #4

ShalokShalom opened this issue Sep 6, 2017 · 16 comments

Comments

@ShalokShalom
Copy link

I like to see Reason on the Playground.

@glennsl
Copy link
Contributor

glennsl commented Sep 6, 2017

Check out https://reasonml.github.io/try/

@ShalokShalom
Copy link
Author

ShalokShalom commented Sep 6, 2017

I prefer the Playground for its dark background, the examples and it is also way more overseeable to me.

@glennsl
Copy link
Contributor

glennsl commented Sep 6, 2017

There will be a new BuckleScript website in the near future, based on infrastructure used to make the reason website, which will most likely use the same playground as is used there. Whether it'll have a dark background I don't know, but I doubt anything will be done to this playground until then. Especially considering there's already a reason playground that supports the use case :)

@OvermindDL1
Copy link

Check out https://reasonml.github.io/try/

Interestingly I cannot do anything on that page. Cannot type in to anything, no scripts blocked, no errors in console... Interesting...

@glennsl
Copy link
Contributor

glennsl commented Sep 6, 2017

The current version overrides console logging to capture program output, so there may still be errors. I just had a PR merged that does the evaluation and output capturing in a web worker instead, but the site hasn't been updated to use it yet.

cc @chenglou @jaredly

@ShalokShalom
Copy link
Author

What bothers me, is that a lot of the examples all over the page are not working in the try section, including the example on the front page.

@glennsl
Copy link
Contributor

glennsl commented Sep 6, 2017

There's work underway to have both a selection of examples in the playground, and runnable examples in the guide and elsewhere.

See reasonml/reasonml.github.io#128 and reasonml/reasonml.github.io#145 for details

@jaredly
Copy link

jaredly commented Sep 6, 2017

@OvermindDL1 could you give a screenshot of what you see? Also what browser are you using?
https://reasonml.github.io/try/?reason=DYUwLgBAHhC8EEYAMBuAUAKQM4DpgHsBzaFIA
image
this is what it should look like.
NOTE if you're using a browser other than chrome/firefox/safari, I can't vouch for your success.

@glennsl
Copy link
Contributor

glennsl commented Sep 6, 2017

You can copy-and-paste any of the examples here if you want to try them out right away: https://github.com/reasonml/reasonml.github.io/pull/128/files#diff-d91ff326bb64b518c5748a72456cbb64R26

@jaredly
Copy link

jaredly commented Sep 6, 2017

@ShalokShalom given that there already is a reason playground, would you like to open an issue there (https://github.com/reasonml/reasonml.github.io/issues) expressing your styling preferences?

@OvermindDL1
Copy link

OvermindDL1 commented Sep 6, 2017

@jaredly I'm running Chrome 60.

Your https://reasonml.github.io/try/?reason=DYUwLgBAHhC8EEYAMBuAUAKQM4DpgHsBzaFIA link works, what I saw before were the 4 boxes with their labels in the upper-right corners but they were entirely blank and unclickable, no code or line numbers in them.

Hmm, on some reloads I'm seeing things like this pop into the console:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' *". Either the 'unsafe-inline' keyword, a hash ('sha256-70UX0+cT/qf3p1Q8SUy0Vohe36d1GERDgd51d0kP+6g='), or a nonce ('nonce-...') is required to enable inline execution.

For note, I'm at work, and the browsers are enforced to certain security guidelines that do make things like react work poorly depending on how it is coded (yet not anything else that I've run across).

@ShalokShalom
Copy link
Author

Oh, there is one more: https://reasonml.github.io/reason-tools/popup.html#

@jaredly
Copy link

jaredly commented Sep 8, 2017

@OvermindDL1 that sounds like a chrome extension you're using is acting up. CSPs only apply, as far as I know, if a) the html document explicitly requires it (which ours doesn't) or b) the code is in a chrome extension.

@glennsl
Copy link
Contributor

glennsl commented Sep 8, 2017

It could be his employer uses a proxy that adds http headers or injects html code into webpages, which would be nuts, but i've seen worse. The playground does use eval, so the warning/error makes perfect sense if that's the case.

@OvermindDL1
Copy link

It could be his employer uses a proxy that adds http headers or injects html code into webpages, which would be nuts, but i've seen worse. The playground does use eval, so the warning/error makes perfect sense if that's the case.

No, they just do things like block requests that don't match the same security as the origin and things like that. No rewriting.

@OvermindDL1 that sounds like a chrome extension you're using is acting up. CSPs only apply, as far as I know, if a) the html document explicitly requires it (which ours doesn't) or b) the code is in a chrome extension.

I mostly just have uMatrix, but even entirely disabling it still had that randomly. It only ever happens on sites that use react I've noticed but I've not looked closely enough to find a pattern yet. Happens both at work and at home (at home I have a lot of extensions, not so at work).

@glennsl
Copy link
Contributor

glennsl commented Sep 11, 2017

Hmm, I use uMatrix too. Never seen anything like this, or had a problem with the reason playground once the necessary scripts were whitelisted.

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

No branches or pull requests

4 participants