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
docs(playground): Ability to use console for playground #4261
docs(playground): Ability to use console for playground #4261
Conversation
Basically I like the idea. Thanks for coming up with it, but I would be interested how much the bundle size is affected by it?! I'm not sure if many users will make use of that feature? |
Hey, I was going based off of an issue, ReactiveX/reactivex.github.io#374 , that I saw and thought it would be good to have that as an option if someone wants to get a quick example working. I guess someone will have to put a twitter poll out and see what the response is :-) |
Also, what bundle size are you referring to? This is using cdn so it should not have anything to do with bundle size of this end.....at least I don't think |
Pull Request Test Coverage Report for Build 8189
💛 - Coveralls |
I was referring to the initial download volume when you initially visit the website. What's the difference in kb between loading the website with this playground and without? |
@jwo719 Hey bro, thanks for clarifying. I will take a look and get back to you |
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.
Change the commit message to start with docs()
... feat
will show up as a new feature for RxJS, which isn't right, necessarily.
@benlesh changed to |
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.
I checked the js script additionally loaded is just < 30 kb therefore I don't see any problem adding it...
Thanks @pertrai1
docs_app/src/index.html
Outdated
@@ -151,6 +151,7 @@ <h2 style="color: red; text-align: center;"> | |||
<b><i>This website requires JavaScript.</i></b> | |||
</h2> | |||
</noscript> | |||
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/6.3.3/rxjs.umd.min.js"></script> |
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.
This can be loaded asynchronously, to prevent it from blocking the main application loading. Please add the async attribute <script src="" async></script>
. This will allow content loaded events to fire before that script is done loading.
@pertrai1 can I support you in some way to solve the requested changes? I would really like to merge this one! |
This adds rxjs to the global namespace in the docs app so that anyone can use the console as a playground in learning and testing. An example would be: ``` rxjs.interval(4000).pipe(rxjs.operators.take(4)).subscribe(console.log); ```
843fe88
to
62c5e2a
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.
LGTM
Description:
This adds rxjs to the global namespace in the docs app so that anyone can use the console as a playground in learning and testing while looking at the docs. An example would be: