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

remove express version from Hello World example #1000

Open
geocodinglife opened this issue Nov 8, 2018 · 7 comments
Open

remove express version from Hello World example #1000

geocodinglife opened this issue Nov 8, 2018 · 7 comments

Comments

@geocodinglife
Copy link

@geocodinglife geocodinglife commented Nov 8, 2018

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')

@geocodinglife geocodinglife changed the title remove express version form hello world example remove express version from Hello World example Nov 8, 2018
@dougwilson
Copy link
Member

@dougwilson dougwilson commented Nov 8, 2018

This is about copy and paste from Runkit. cc @boucher

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Nov 8, 2018

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.

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Nov 8, 2018

As far as I can tell, there is no option to turn off this version display in RunKit.

@tolmasky
Copy link

@tolmasky tolmasky commented Nov 8, 2018

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.

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Nov 8, 2018

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:

  1. Just remove the version number (option, custom style, however, as long as someone can point us to the how to for that)
  2. Just wrap the verion number in a block comment (i.e. the line would read var express = require('express' /* 4.16.4 */);
  3. Move the version to the end of the line as a line comment (seems more complicated to implement that (2) perahps (i.e. the line would read var express = require('express'); // 4.16.4).

Thoughts?

@tolmasky
Copy link

@tolmasky tolmasky commented Nov 8, 2018

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!

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Nov 8, 2018

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.