Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upremove express version from Hello World example #1000
Comments
This is about copy and paste from Runkit. cc @boucher |
Or maybe not. When I copy and paste, the version number is not included. @geocodinglife are you just typing it as you see it displayed? I agree it is confusing for users who don't know that's not actually part of the source code. |
As far as I can tell, there is no option to turn off this version display in RunKit. |
We can certainly add an option to disable the version if you guys don't want it, I do however want to point out that you can alternatively currently modify the style of it I believe (I think our theming lets you change the color, etc). Most everyone that uses this really likes that feature so we'd only be adding it for this use case as far as I know, so want to make sure this is something you all for sure want before going through with it (but again, its certainly not hard for us to add if you deem it absolutely necessary, just coming from an over-configuration API perspective, and also from the angle of the alternative styling options). We're also open to anything else that would make it even more obvious that it is not a part of the source text. |
Hi @tolmasky thanks for weighing in :) So there are a lot of users who enter in to Node.js through Express.js, so it isn't surprising to see this as a confusion point. I just was searching through the history of our Gitter and I see it's been mentioned several times since the RunKit has landed. I was not aware of the custom styling option. I looked at the docs for the embed and didn't see it mentioned anywhere (https://runkit.com/docs/embed) and since it's within a iframe, the styling can't just be added to our site's stylesheet, right? Really, I think from this report, and from the stuff I'm seeing on Gitter, I think it would be best for this very early on in the experience example to work when someone types it out from what they see on the display. I thought of three possibilities here, but there could be others:
Thoughts? |
Just discussed this with the team -- we mocked out the comment version but I think it might still be confusing since you wouldn't be able to select it (and if you could select it, then we wouldn't let you edit it, etc.), so just having a way of removing it seems best here. Just for a sense of our timeline, we're currently close to rolling out a big performance change for embeds in the upcoming weeks. Separately, we were already planning on unrelated customization options for the version pill which this might be able to be rolled into, so I think I safe estimate for when you can turn this off would be December. We figure that worst case scenario if we haven't found an "elegant" place to put this customization option by December, we can just quickly throw it into its own custom bool and ship it out quickly for you all then. We can go ahead and issue the PR at that point too so we can keep tracking this bug. Let me know if all that sounds reasonable! |
We appreciate your responsiveness and assistance. I don't think there is any rush, as this has been like this for quite some time, and was apparently expressed before, though this was the first that landed in the issue tracker and made me aware of the issue :) I think your assessment makes sense too. Thanks again! If you want to ping here eventually when there is something we can change, that would be much appreciated! |
can the version in the hello world example be eliminated
in the docs show like this
const express = require('express' 4.16.4)
and only works like this
const express = require('express')