scalafiddle / scalafiddle-core

Source code for the scalafiddle.io compilation service
https://scalafiddle.io
Apache License 2.0
101 stars 37 forks source link

Added font size increase/decrease buttons to embedded fiddle #11

Closed janschultecom closed 4 years ago

ochrons commented 7 years ago

Thanks, looks useful!

However, couple of points to consider. The font-size buttons are quite prominent (same size / position as the main Run/Reset buttons) although they are not frequently used. It would be better to create a separate Options popup menu and put the size selector in there.

Also, settings like font size should be persistent and stored in the user's browser (eg. local storage) so that they don't need to adjust size every time they encounter an embedded fiddle.

Finally the initial size should be a parameter for the embedded fiddle, so that the person embedding a fiddle onto their page can select the size that works well with the other content on the page.

Let me know if you're interested in implementing (some of) these improvements. They do go a bit beyond the scope of just changing the font size in the UI...

janschultecom commented 7 years ago

Hi,

I am completely open for making it less prominent. For me its just important to have the functionality at all, since it is really necessary when you are presenting on a projector or something. Browser zoom in/out doesnt really help there. Do you have a design or idea how you want it, cause I am not really a good at web design :-)

Regarding the other two points: Will try to figure out how to do that and update the PR.

ochrons commented 7 years ago

A quick MVP would be to enable that parameter and if the parameter is not set it would not show the buttons at all. This way it would be opt-in for now. Then later we can move the buttons to a more appropriate location etc.

janschultecom commented 7 years ago

Sounds good to me!