Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Add scrollbars to preformatted code blocks.
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Forums Feedback
View previous topic :: View next topic  
Author Message
Flammie
Developer
Developer


Joined: 02 Jun 2003
Posts: 633
Location: Dublin, Ireland

PostPosted: Thu May 26, 2005 4:16 am    Post subject: Add scrollbars to preformatted code blocks. Reply with quote

Hi,
After much of pointless flaming by labrador in http://forums.gentoo.org/viewtopic-p-2441604.html#2441604 I realized that this bug can be patched quite easily! Just add "overflow: auto;" to code block's style sheet code for forums, and it will use scrollbars in the code block only, instead of making whole browser window use them. That way the thread stays easy to read even if someone posts something stupid in code blocks. We did that some months ago with gentoo documentation and haven't received any vocal complaints on issue since, so I suppose most of the linux browsers at least support this feature.
Back to top
View user's profile Send private message
ian!
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 3827
Location: Essen, Germany

PostPosted: Thu May 26, 2005 7:13 am    Post subject: Reply with quote

We already tried that out in our testforum. Problem is an annoing bug (Mozilla/Firefox) that you cannot use the mousewheel to scroll the page when the mousecursor is in such an overflow area. That's really annoing while browsing the forums. We tried that ourselfs and decided not to implement it unless it has been fixed on the browser side.
_________________
"To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins
Back to top
View user's profile Send private message
Flammie
Developer
Developer


Joined: 02 Jun 2003
Posts: 633
Location: Dublin, Ireland

PostPosted: Thu May 26, 2005 8:24 am    Post subject: Reply with quote

ian! wrote:
We already tried that out in our testforum. Problem is an annoing bug (Mozilla/Firefox) that you cannot use the mousewheel to scroll the page when the mousecursor is in such an overflow area. That's really annoing while browsing the forums. We tried that ourselfs and decided not to implement it unless it has been fixed on the browser side.


I thought that problem has already been fixed? At least it hasn't been bothering me as much as it used ton fora where overflow:auto has been set nearly everywhere, and I can't reproduce it with our docs eg. http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml (ignore the fact that someone has broken the layout such that overflow: auto doesn't make proper scrollbars anyways).
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4831
Location: Gothenburg, Sweden

PostPosted: Thu May 26, 2005 9:10 am    Post subject: Reply with quote

The bug triggers when the overflow starts to get scrolled up outside the visible area and you have the mouse pointer over it. Try for instance the firewall script (code listing 13.5, specifically) in the security guide.
_________________
Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.freenode.net
Back to top
View user's profile Send private message
rhill
Developer
Developer


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Sat May 28, 2005 5:44 am    Post subject: Reply with quote

? am i the only one that doesn't see scrollbars on either of those pages?
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
ian!
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 3827
Location: Essen, Germany

PostPosted: Sat May 28, 2005 5:47 am    Post subject: Reply with quote

dirtyepic wrote:
? am i the only one that doesn't see scrollbars on either of those pages?

Looks like they have been remove from the firewall script as well.
_________________
"To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4831
Location: Gothenburg, Sweden

PostPosted: Sat May 28, 2005 5:50 am    Post subject: Reply with quote

ian! wrote:
dirtyepic wrote:
? am i the only one that doesn't see scrollbars on either of those pages?

Looks like they have been remove from the firewall script as well.


Flammie wrote:
(ignore the fact that someone has broken the layout such that overflow: auto doesn't make proper scrollbars anyways)

So yeah, no scrollbars.

@dirtyepic: What about the mouse wheel scrolling?
_________________
Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.freenode.net
Back to top
View user's profile Send private message
gentsquash
l33t
l33t


Joined: 03 Nov 2004
Posts: 753
Location: Still a Gentoo beginner.

PostPosted: Tue Aug 09, 2005 6:55 pm    Post subject: Reply with quote

(I was led to this thread from my feature-request
http://bugs.gentoo.org/show_bug.cgi?id=82909.
)

Until the Firefox bug is fixed, would it be possible to give the
users an option, since some users use a different browser?

Could there be a stanza (like "style=printable") that could be
a attached to the URL, e.g,
Code:
style=CodeBlocks-have-scrollbars

? Or, to cause a line-wrap at 60, e.g, "linewrap=60" or
"linewrap=medium"? (I suppose it could also be stored in a browser cookie.)

Alternatively, instead of having this in the URL, this could a
"preference" attached to a Gentoo-user-account (like timezone)?
_________________
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Tue Aug 09, 2005 8:09 pm    Post subject: Reply with quote

You should be able to override it yourself*, I tried, but without success so far:
Code:
.code
{
    overflow: scroll !important;
    font-family: monospace !important
}
The font change works, the scroll bar doesn't.

*in ~/.mozilla/default/.../chrome/userContent.css or a file of your choice activated in Konqueror's CSS setting for the two browsers I've tested
Back to top
View user's profile Send private message
gentsquash
l33t
l33t


Joined: 03 Nov 2004
Posts: 753
Location: Still a Gentoo beginner.

PostPosted: Tue Aug 09, 2005 10:50 pm    Post subject: Reply with quote

I don't understand. FWIW, I use Galeon for browsing. (I don't
know what a ".css" file is.)
I have the feeling that your
solution is more complex than I have brain+desire to deal with,
and I thank you for the posting.
_________________
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida
Back to top
View user's profile Send private message
curtis119
Bodhisattva
Bodhisattva


Joined: 10 Mar 2003
Posts: 2159
Location: Toledo, OH, USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.

PostPosted: Wed Aug 17, 2005 4:50 pm    Post subject: Reply with quote

The overflow: auto; doesn't work in IE anyway. I wonder how many people use IE to browse this forum and the rest of the Gentoo sites? In the redesign I am planning on using overflow: auto; I have it on the test server for code listings and for images. It works perfectly in moz/konq/opera/firefox/(not sure about safari). I think the problem is that people are used to it working a certain way ( the mouse scroll wheel) and are resistant to change.
_________________
Please read the Forum Guidelines.
* | www.gayroughnecks.com | *
Back to top
View user's profile Send private message
tomk
Administrator
Administrator


Joined: 23 Sep 2003
Posts: 7219
Location: Sat in front of my computer

PostPosted: Wed Aug 17, 2005 6:11 pm    Post subject: Reply with quote

curtis119 wrote:
I wonder how many people use IE to browse this forum and the rest of the Gentoo sites?


~14% for forums
~23% for www
~9% for bugs
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Wed Aug 17, 2005 7:27 pm    Post subject: Reply with quote

tomk wrote:
curtis119 wrote:
I wonder how many people use IE to browse this forum and the rest of the Gentoo sites?


~14% for forums
~23% for www
~9% for bugs

Hmm, and how many of them are just pretending to be IE :wink:
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6377
Location: Graz / EU

PostPosted: Wed Aug 17, 2005 9:12 pm    Post subject: Reply with quote

Wow, that are pretty impressive numbers. Not that i personally care about the 13 people who are using a broken browser ;), but if it breaks IE it may not exactly be helpful to people who are forced to use it (e.g. at work) - and that's what the forum should be. I'm also not sure if everyone will like that feature, so making this optional via profile would probably really be a good solution to make everyone happy.
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
curtis119
Bodhisattva
Bodhisattva


Joined: 10 Mar 2003
Posts: 2159
Location: Toledo, OH, USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.

PostPosted: Wed Aug 17, 2005 9:20 pm    Post subject: Reply with quote

tomk wrote:
curtis119 wrote:
I wonder how many people use IE to browse this forum and the rest of the Gentoo sites?


~14% for forums
~23% for www
~9% for bugs


Interesting. I would bet that most of those are people browsing from work. Either way it's a good fact to back up cross-browser compatibility.
_________________
Please read the Forum Guidelines.
* | www.gayroughnecks.com | *
Back to top
View user's profile Send private message
PRC
Apprentice
Apprentice


Joined: 15 Aug 2005
Posts: 191

PostPosted: Tue Jan 03, 2006 2:04 am    Post subject: Interesting Forum Idea Reply with quote

merged this and following 2 posts.
amne


I was just thinking about those really big posts where people post their large config files or things like "emerge info". They usually make the posts difficult to read and interpret. What about a tag that toggled the collapse of the text. So that you would just have a link that expanded them or collapse them, to suit the readers needs at the time.

Idea, or not needed?

Editted...
_________________
Mayhem G4 (Asus z71v)
Back to top
View user's profile Send private message
mark_alec
Bodhisattva
Bodhisattva


Joined: 11 Sep 2004
Posts: 6066
Location: Melbourne, Australia

PostPosted: Tue Jan 03, 2006 2:40 am    Post subject: Reply with quote

Moved from Off the Wall to Gentoo Forums Feedback.

Sounds like a good idea, not sure if phpBB supports code-folding.
_________________
www.gentoo.org.au || #gentoo-au
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6377
Location: Graz / EU

PostPosted: Tue Jan 03, 2006 9:42 am    Post subject: Reply with quote

Moved from Gentoo Forums Feedback to Duplicate Threads, Add scrollbars to preformatted code blocks discusses the same topic (unless i misunderstood what you meant).

edit:
I just realized you suggest something slightly different, but as a solution to the same problem, so merged to this thread instead of making it a dupe.
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Mon Mar 20, 2006 6:06 pm    Post subject: Reply with quote

http://forums.gentoo.org/viewtopic-p-3191474.html#3191474

What's your policy on page-warpingly wide posts?

BTW, other forum software like SMF will put scrollbars on the code block in cases like that.
Back to top
View user's profile Send private message
Earthwings
Administrator
Administrator


Joined: 14 Apr 2003
Posts: 7751
Location: Karlsruhe, Germany

PostPosted: Mon Mar 20, 2006 6:38 pm    Post subject: Reply with quote

StringCheesian wrote:
http://forums.gentoo.org/viewtopic-p-3191474.html#3191474

What's your policy on page-warpingly wide posts?

Fitted perfectly on my 409600x307200 screen. Fixed it manually for smaller ones though.

StringCheesian wrote:
BTW, other forum software like SMF will put scrollbars on the code block in cases like that.
Merging this from the report thread to this one where scrollbars were discussed before.
_________________
KDE 4.13 - Get It While It's Hot!
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Mon Mar 20, 2006 8:22 pm    Post subject: Reply with quote

Thanks!

Until we get scrollbars, should I just keep reporting them for moderation when I see them? Or PM the poster, or what?
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6377
Location: Graz / EU

PostPosted: Mon Mar 20, 2006 9:23 pm    Post subject: Reply with quote

Reporting them using the feedback thread will do just fine, thanks in advance. You could also PM the person who posted it, but telling the mods about it may be easier and get the issue resolved faster.
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Tue Mar 21, 2006 7:14 am    Post subject: Reply with quote

ian! wrote:
We already tried that out in our testforum. Problem is an annoing bug (Mozilla/Firefox) that you cannot use the mousewheel to scroll the page when the mousecursor is in such an overflow area. That's really annoing while browsing the forums. We tried that ourselfs and decided not to implement it unless it has been fixed on the browser side.

The SMF devs had the same problem, so they added horzontal-only scrollbars. Horizontal scrollbars don't interfere with scrollwheeling a page up/down even if the mouse is over the horizontally scrollable area.

I'm pretty sure the only browser problem with horizontal-only scrollbars is that IE for Mac and some versions of IE for Windows have a bug where if there is only 1 line of text, and a horizontal scrollbar, the scrollbar may cover that line. But you can work around it by adding padding to one-liners.

Another complaint encountered when this was implemented in SMF was that when a very huge block of code was posted and horizontal-only scrollbars were enabled, that scrollbar would be so far down that people sometimes found the code a little confusing because they didn't realize the code was wider than it looked until they got all the way to the bottom and saw the scrollbar.
Back to top
View user's profile Send private message
beatryder
Veteran
Veteran


Joined: 08 Apr 2005
Posts: 1138

PostPosted: Tue Mar 21, 2006 8:24 am    Post subject: Reply with quote

ian! wrote:
We already tried that out in our testforum. Problem is an annoing bug (Mozilla/Firefox) that you cannot use the mousewheel to scroll the page when the mousecursor is in such an overflow area. That's really annoing while browsing the forums. We tried that ourselfs and decided not to implement it unless it has been fixed on the browser side.



I use Konqueror, and I have to say that I would like this any how (even though it works the same as moz/ff) its not that hard to move a mouse. and its more irritating to have to scroll the entire window over to read the rest of the posts because the code block forces a change in the width of the page.
_________________
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Back to top
View user's profile Send private message
curtis119
Bodhisattva
Bodhisattva


Joined: 10 Mar 2003
Posts: 2159
Location: Toledo, OH, USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.

PostPosted: Wed Mar 22, 2006 2:06 am    Post subject: Reply with quote

beatryder wrote:
ian! wrote:
We already tried that out in our testforum. Problem is an annoing bug (Mozilla/Firefox) that you cannot use the mousewheel to scroll the page when the mousecursor is in such an overflow area. That's really annoing while browsing the forums. We tried that ourselfs and decided not to implement it unless it has been fixed on the browser side.



I use Konqueror, and I have to say that I would like this any how (even though it works the same as moz/ff) its not that hard to move a mouse. and its more irritating to have to scroll the entire window over to read the rest of the posts because the code block forces a change in the width of the page.


AMEN!

We are forcing everyone to move their mouse to the bottom of the screen in order to scroll the window horizontally. So what is wrong with having them move their mouse a little to the left or right of the codebox in order to use the scrollwheel?
_________________
Please read the Forum Guidelines.
* | www.gayroughnecks.com | *
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Forums Feedback All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum