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

When testing with local server, show editor with more realistic width #811

Open
chrisdavidmills opened this issue Apr 25, 2018 · 9 comments
Labels
enhancement Improves an existing feature. idle Issues and pull requests with no activity for three months.

Comments

@chrisdavidmills
Copy link
Contributor

I just thought — when writing the interactive examples we always try to make both the example and the code lines narrow enough so they fit comfortably inside their respective panes.

But when you text it locally, the editor is shown at the full screen width, which is a lot wider than it'll actually be shown in the content column on MDN.

It would be great to have an option to set it to the typical MDN content column size instead. I could resize my browser, but I'm lazy ;-)

@schalkneethling schalkneethling added the enhancement Improves an existing feature. label Apr 25, 2018
@atopal
Copy link
Contributor

atopal commented Apr 26, 2018

Yeah, this makes a lot of sense to me. A mockup MDN page would be even nicer :)

@wbamberg
Copy link
Contributor

This would definitely be useful, but IMO both writing examples and fixing #706 are higher priorities.

@a2sheppy
Copy link
Contributor

Yes please.

@stephanmax
Copy link
Contributor

I second this idea (struggled with that a bit in some examples).

My idea is to go for something in-between: Not a full-blown MDN mockup, but also not just adjusting the width of the editor. How about adding a mock MDN header and right sidebar and mimic the prod MDN widths and media queries?

Happy to file a PR against the https://github.com/mdn/bob repo. (I assume that’s where all the editor code went?!)

@wbamberg
Copy link
Contributor

wbamberg commented Oct 24, 2018

Happy to file a PR against the https://github.com/mdn/bob repo. (I assume that’s where all the editor code went?!)

Yes :). Thanks for offering to help: I think this is a good idea.

@stephanmax
Copy link
Contributor

stephanmax commented Oct 26, 2018

Just realized that this is more complicated than I thought.

My initial plan was to bundle in some CSS with the editor styles that makes sure the code demos are embedded in a more realistic surrounding. But if I understand mdn-bob correctly, this bundled CSS would also end up in the production demos.

What do you think @schalkneethling, can we add an env variable to the npm scripts to only add the mdn mock CSS when building locally/testing code demos?

@schalkneethling
Copy link
Contributor

@stephanmax Yup, that sounds like a good plan. I would move this over to BoB, as that is where this work is happening. I will open a new issue on that repo and tag you. Thanks!

@schalkneethling
Copy link
Contributor

@stephanmax There you go - mdn/bob#166

@stephanmax
Copy link
Contributor

Sweet, thanks @schalkneethling!

@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves an existing feature. idle Issues and pull requests with no activity for three months.
6 participants