Jump to content

Suggestion: Max size for codeboxes, or hide them by default

iamdarkyoshi

This thread is a long mess with codes, especially on a phone.

 

Can we make it so codes become a box with a finite size where you can scroll through the box? Like the ones on the EEVBlog forum? If not, maybe make them act like spoilers, hidden by default?

Screenshot_2016-07-05-14-28-25.png

The ones here are much better. There is only about 1/10 of the code visible there, and thats all there needs to be. The user can scroll through it if they want to read all the code.

 

 

It takes soooooo long to scroll through a page on the LTT forums with any decent amount of code.

Spoiler

Especially considering I cant scale it down any further. The site's font and stuff is way too huge for me, I want the desktop site on my phone. And a BBCode editor.

And this spoiler is useless

Microwave

Can it be done?

Link to comment
Share on other sites

Link to post
Share on other sites

I'd thing putting a max size for codeboxes would be a poor idea as for some things, you need a large amount of code all together.

 

Having it hidden by default would be a good idea though.

Specs: CPU - Intel i7 8700K @ 5GHz | GPU - Gigabyte GTX 970 G1 Gaming | Motherboard - ASUS Strix Z370-G WIFI AC | RAM - XPG Gammix DDR4-3000MHz 32GB (2x16GB) | Main Drive - Samsung 850 Evo 500GB M.2 | Other Drives - 7TB/3 Drives | CPU Cooler - Corsair H100i Pro | Case - Fractal Design Define C Mini TG | Power Supply - EVGA G3 850W

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, TheKDub said:

I'd thing putting a max size for codeboxes would be a poor idea as for some things, you need a large amount of code all together.

 

Having it hidden by default would be a good idea though.

The one on the EEVblog forum still allows you to enter plenty of code, but only shows a portion of it (unless you scroll through the codebox)

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, iamdarkyoshi said:

The one on the EEVblog forum still allows you to enter plenty of code, but only shows a portion of it (unless you scroll through the codebox)

unless the box could be expanded it would mean anyone that wants to view all of the code at the same time or easily copy paste it would be out of luck.  I think simply default hiding it like a spoiler or asking people to hide long ones it in a spoiler box if possible would be better.  Or maybe an end user option to choose to make code boxes, quotes or other things shrunk in a spoiler for them so that it doesn't effect those that would rather be able to view the full thing.

There's something cool here - you just can't see it.

Link to comment
Share on other sites

Link to post
Share on other sites

Having seen that thread, I agree that it would be a useful feature, but unfortunately it's not something that can be added very easily, and it's also not something that the forum software devs have expressed much interest in adding.

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

Actually, just adding a scroll bar would be pretty easy (I was thinking of having some shown, then an expand button). Can you install the "Stylish" browser extension, and add this as a style:

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("linustechtips.com") {
  .ipsCode {
    max-height: 600px;
  }
}

(If you're using Chrome, you need to import from Mozilla format), then leave that on for a while and let me know whether it breaks anything, or whether you think it would look better if it was taller/shorter/etc?

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

20 minutes ago, colonel_mortis said:

Actually, just adding a scroll bar would be pretty easy (I was thinking of having some shown, then an expand button). Can you install the "Stylish" browser extension, and add this as a style:


@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("linustechtips.com") {
  .ipsCode {
    max-height: 600px;
  }
}

(If you're using Chrome, you need to import from Mozilla format), then leave that on for a while and let me know whether it breaks anything, or whether you think it would look better if it was taller/shorter/etc?

I almost always use LTT on mobile due to every PC of mine in the house having a massive pile of "projects" in front of the keyboard.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×