-
Notifications
You must be signed in to change notification settings - Fork 40
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
Tutorials: Merge editor and preview area in tutorials? #64
Comments
Should we merge @musicEnfanthen 's PR first, and then work to improve it? |
Sounds good to me. |
yes, since this is in a separate branch anyway, I believe this simplifies everything a bit.
… Am 07.12.2018 um 09:38 schrieb Laurent Pugin ***@***.***>:
Sounds good to me.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Really like your idea of having something like a "combined" editor, this would greatly reduce some confusion potential as you already mentioned and convinced me ;) Would not see any conflict with #57 . I did not touch the tutorial's main |
Go ahead! |
This is a discussion about a potential improvement for the tutorials. It has been mentioned in the discussion of #57 already. Right now, the preview area duplicates the code the user enters in the editor, and usually adds additional context before and after the user's content. It is not possible to edit within the preview area. I think this is confusing. Instead, I'd like to find a way to merge this into one editor box, in which the user may change only parts of the content.
According to https://jsfiddle.net/tripflex/y0huvc1b/, it should be quite simple to restrict editing at the begin and end of the editor box. The benefit here is that the user may enter as many new lines in the middle as he needs – we could, for example, prevent editing in the first three and last five lines, as they provide the content we want the user to see. This solution still allows code-folding in readonly lines, which might be helpful in larger examples.
When making selected lines readonly, we should render them differently, so that the user immediately understands the difference between editable and non-editable lines. According to https://stackoverflow.com/a/27548260, it should be quite simple to add CSS classes to selected lines. With those, we could probably change the background color of the "context lines", and set syntax highlighting to different gray values (or something along these lines).
Before implementing these changes, I'd like to get some opinions about this. @musicEnfanthen, @soniawronkowska, @margrethesb, @ahankinson, anyone?
The text was updated successfully, but these errors were encountered: