Monospaced Option w/o Code Box?

Discussion about the board itself, forums organization and site bugs.
User avatar
CelticKat
Junior Member
Posts: 22
Joined: Wed Mar 11, 2015 9:23 pm

Monospaced Option w/o Code Box?

Post by CelticKat » Tue Mar 17, 2015 11:12 pm

Monospaced font styles are extremely useful for depicting many computing-related things other than code, and even with code it's sometimes necessary (or at least desirable) to not have the big gigantic box surrounding it. I understand the box is there to make it easier to display code w/o the spam filter being annoying, but it would be helpful to have that option at least for things other than code. I know in a lot of other forums I've participated in, if you use [code] tags, a box won't display; it will just change the text to monospaced font style.

Just a thought on my part.

Thanks.
__________
Sit down and chat with a fundamental particle sometime. You might find it has a QUARKY side!
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0

User avatar
Thrawn
Senior Member
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Monospaced Option w/o Code Box?

Post by Thrawn » Wed Mar 18, 2015 2:13 am

I don't think the [font] BBCode is allowed here.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0

barbaz
Senior Member
Posts: 9145
Joined: Sat Aug 03, 2013 5:45 pm

Re: Monospaced Option w/o Code Box?

Post by barbaz » Wed Mar 18, 2015 2:19 am

@Seib: Unless you're going to post ASCII art in Ragnarök, why would you need that?
Example use case where code tags (and their scrollbars for large volumes of text) wouldn't work for a tech support request and/or response please?
*Always* check the changelogs BEFORE updating that important software!
-

User avatar
CelticKat
Junior Member
Posts: 22
Joined: Wed Mar 11, 2015 9:23 pm

Re: Monospaced Option w/o Code Box?

Post by CelticKat » Fri Mar 20, 2015 7:18 pm

Well, for example, some people like to use it to easily set URLs or site/file directories apart from the rest of the sentence, but still keep it displayed as actually part of the sentence (that is, instead of as its own paragraph (i.e., the box format I referred to above)).

Just some examples I came up with on the spot:

Image

Image

I in particular have found this method extremely useful. Like I said, it doesn't have to be code; it just has to be monospaced font. Lol. Just so happens that the [code] tag is usually the way to do it. xD
__________
Sit down and chat with a fundamental particle sometime. You might find it has a QUARKY side!
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0

User avatar
CelticKat
Junior Member
Posts: 22
Joined: Wed Mar 11, 2015 9:23 pm

Re: Monospaced Option w/o Code Box?

Post by CelticKat » Fri Mar 20, 2015 7:19 pm

You never have to put it in monospaced fonts, but some people find it easier to read when set apart like that stylistically.
__________
Sit down and chat with a fundamental particle sometime. You might find it has a QUARKY side!
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0

barbaz
Senior Member
Posts: 9145
Joined: Sat Aug 03, 2013 5:45 pm

Re: Monospaced Option w/o Code Box?

Post by barbaz » Fri Mar 20, 2015 7:50 pm

OK. Actually seeing it visually, while I don't think it's critical, I get how it can be a useful option to have.

Giorgio uses italics for the former use case (except when naming about:config prefs, where he uses bold). However personally, I don't like to use italics for that because I find italics hard to read when I have to distinguish between | (pipe) and / (forward-slash).
Myself, I normally don't style that sort of thing but I wouldn't be averse to using fixed-width font there if I know it would help a particular poster.

The latter could be useful also as yet another work-around for this board's url truncation bug and possibly more convenient than code tags for displaying URLs that we don't want linkified...

Seib wrote:Just so happens that the [code] tag is usually the way to do it. xD

I would not want the code tag to be replaced with this because in its current form it saves us looking at huge walls of text when reading through posts that have long console logs, for example. Let's have this be a new tag please, if Giorgio decides it's worth it.
Maybe [v] for verbatim, assuming anything inside those tags should be displayed literally as well as in fixed-width font?
*Always* check the changelogs BEFORE updating that important software!
-

barbaz
Senior Member
Posts: 9145
Joined: Sat Aug 03, 2013 5:45 pm

Re: Monospaced Option w/o Code Box?

Post by barbaz » Sun Mar 22, 2015 7:21 am

Had occasion to play with the phpBB install on my local server, and I think this probably wouldn't be hard to implement. Is it enough to just have this new BBCode tag correspond to the HTML5 <code> tag?

I'm assuming it's more or less just a matter of Giorgio copying his existing means to ensure proper escaping of HTML, into the middle of <code></code> and adding that as a new BBCode.

@Giorgio, I can actually try to add this BBCode (inline monospace + verbatim contents) on my local phpBB 3.0.12 test board and post back what's involved, if that would help you decide whether to do this or not.. please let me know.
*Always* check the changelogs BEFORE updating that important software!
-

User avatar
CelticKat
Junior Member
Posts: 22
Joined: Wed Mar 11, 2015 9:23 pm

Re: Monospaced Option w/o Code Box?

Post by CelticKat » Tue Mar 24, 2015 1:49 am

I agree about the italics thing; for some things it's just too ambiguous; also it looks ugly in a lot of computing-related contexts. As for emboldening, I don't usually like doing that either, because then what would I use to denote emphasis not quite strong enough for all-caps? :D

And, just out of curiosity, what is this truncation bug? :|

Also, I would agree—I also wouldn't want the code tag to be replaced. With the purposes of this forum, you run into a lot of code and I too feel the box in such circumstances would be extremely useful. Lol.

And the [v] tag sounds like an okay idea. :) What's this about the HTML <code> tag, though? Correct me if I'm wrong (and considering your text thus far, I'm probably wrong here), but I thought the [ ] tags were the same as < > tags. That is, I thought they were both HTML, with the more standard format being < > but like with search engine operators some websites like doing it their own way instead of the standard way.

Are you saying that [code] is not the same as <code> but that [code] is not a nonstandard form of HTML but BBCode? Because I know in a lot of other forums I've participated in, both [code] and <code> puts the text in non-boxed, monospace font style.

Just trying to understand you, that's all.
__________
Sit down and chat with a fundamental particle sometime. You might find it has a QUARKY side!
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36

User avatar
Thrawn
Senior Member
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Monospaced Option w/o Code Box?

Post by Thrawn » Tue Mar 24, 2015 2:29 am

Seib wrote:And, just out of curiosity, what is this truncation bug? :|

When the board parses URLs, it automatically truncates long ones.

However, if you preview or edit the truncated URL, then it puts the truncated text (with dots) into the edit box, and you end up with a broken URL.

I thought the [ ] tags were the same as < > tags. That is, I thought they were both HTML, with the more standard format being < > but like with search engine operators some websites like doing it their own way instead of the standard way.

No, square brackets are not HTML, and no browser will recognise them as such. However (perhaps partly because of this), they are commonly used in contexts like this one, where users are allowed to use some limited markup that will be interpreted by the server.

Are you saying that ... [code] is not a nonstandard form of HTML but BBCode?

Yes.
Because I know in a lot of other forums I've participated in, both [code] and <code> puts the text in non-boxed, monospace font style.

That means the server is choosing to interpret both types. Only angle brackets are HTML.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0

barbaz
Senior Member
Posts: 9145
Joined: Sat Aug 03, 2013 5:45 pm

Re: Monospaced Option w/o Code Box?

Post by barbaz » Tue Mar 24, 2015 2:38 am

Seib wrote:And, just out of curiosity, what is this truncation bug? :|

Best way to explain that is to demonstrate it.
Untruncated URL:

Code: Select all

https://groups.google.com/d/msg/mozilla.addons.user-experience/qIgLq28aTdI/IyD2p_CFAEUJ

Post it outside URL or code tags, leave "Do not automatically parse URLs" un-checked, and preview your post: https://groups.google.com/d/msg/mozilla ... D2p_CFAEUJ
Look what happened inside the text box containing your post. Leave it as-is and preview that again or submit it, and your link gets truncated as seen above. Boo.

Seib wrote:And the [v] tag sounds like an okay idea. :) What's this about the HTML <code> tag, though? Correct me if I'm wrong (and considering your text thus far, I'm probably wrong here), but I thought the [ ] tags were the same as < > tags. That is, I thought they were both HTML, with the more standard format being < > but like with search engine operators some websites like doing it their own way instead of the standard way.

Are you saying that [code] is not the same as <code> but that [code] is not a nonstandard form of HTML but BBCode? Because I know in a lot of other forums I've participated in, both [code] and <code> puts the text in non-boxed, monospace font style.

[ ] = BBCode.
< > = HTML.

BBCode is just a simplified interface to a limited set of HTML but is otherwise totally unrelated to HTML. It also includes some tags to enclose things in specially preformatted blocks (like code and quote).

The HTML5 <code> tag produces inline monospace font exactly like you want. Check out what your sample post would look like with HTML code tag:
data:text/html,Hi.<br><br>What%20does%20the%20Time%20Zone%20setting%20under%20<code>Account%20Details%20&gt;%20General%20&gt;%20Time%20Settings</code>%20mean?%20%20Is%20it%20referring%20to%20GMT%20or%20UTC?<br><br>Thanks.

(paste that in your URL bar. also I couldn't post it in code tags so it's probably going to get cut off by forum software, you may need to quote my post to get the full text.)

Therefore, I'm suggesting that part of implementing this BBCode could involve translating its contents to the contents of a HTML5 <code> tag - that's possibly simpler than trying to use a styled span.

Those other boards where that worked probably allow limited HTML to be used for formatting in posts. This forum only allows BBCode formatting in posts.

Hope that helps.


EDIT oops, looks like I collided posting with Thrawn :?
*Always* check the changelogs BEFORE updating that important software!
-

barbaz
Senior Member
Posts: 9145
Joined: Sat Aug 03, 2013 5:45 pm

Re: Monospaced Option w/o Code Box?

Post by barbaz » Tue Mar 24, 2015 2:42 am

Thrawn wrote:When the board parses URLs, it automatically truncates long ones.

However, if you preview or edit the truncated URL, then it puts the truncated text (with dots) into the edit box, and you end up with a broken URL.

I should note that this apparently doesn't happen with links to Giorgio's own sites. I wanted to link some page on one of Giorgio's sites in my demo, but the bug didn't surface there.
*Always* check the changelogs BEFORE updating that important software!
-

barbaz
Senior Member
Posts: 9145
Joined: Sat Aug 03, 2013 5:45 pm

Re: Monospaced Option w/o Code Box?

Post by barbaz » Wed Mar 25, 2015 6:00 pm

barbaz wrote:I think this probably wouldn't be hard to implement.

[...]

@Giorgio, I can actually try to add this BBCode (inline monospace + verbatim contents) on my local phpBB 3.0.12 test board and post back what's involved, if that would help you decide whether to do this or not..

Decided to try it anyway, just for fun. :mrgreen:

Well, getting inline monospace font is easy (takes about one minute in the ACP), but not only did I not find any easy way to make its contents display verbatim, it seems from searching the Internet that either no one else has ever even tried to do that, or the way to do it is blatantly obvious and I'm overlooking it, as I get no relevant results at all.
Assuming I'm not overlooking anything, my guess is if Giorgio hasn't already hacked a new placeholder for "HTML-escaped text not to be parsed by the board" into this board's custom BBCode feature, the "verbatim contents" thing won't be happening because he most likely doesn't have that much time and effort to spend over it... maybe in that case a [fix] or [mono] tag would be better (for "fixed-width font" or "monospace font")?
*Always* check the changelogs BEFORE updating that important software!
-

User avatar
CelticKat
Junior Member
Posts: 22
Joined: Wed Mar 11, 2015 9:23 pm

Re: Monospaced Option w/o Code Box?

Post by CelticKat » Mon Mar 30, 2015 2:15 am

Wow... ... ... I'm going to be fully honest with you both. This is extremely fascinating to me. I only just started learning how to code (hooray for Udacity! :D ) and seeing you both talk about this just inspires me to keep going! ^_^
__________
Sit down and chat with a fundamental particle sometime. You might find it has a QUARKY side!
Mozilla/5.0 (X11; CrOS armv7l 6680.78.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.102 Safari/537.36

barbaz
Senior Member
Posts: 9145
Joined: Sat Aug 03, 2013 5:45 pm

Re: Monospaced Option w/o Code Box?

Post by barbaz » Thu May 21, 2015 2:07 am

suggestion that doesn't seem to be a reasonable one anymore, please ignore
Just to throw another thought on this out there. The HTML <pre> tag often use monospace. Why not use that (and combine with either HTML <code> tag or some other styling to ensure that it's monospace)? Then the board won't do things like
*not* indent this line of text by a ridiculous amount, if it were inside that tag.
It'll allow more uses of the tag.
*Always* check the changelogs BEFORE updating that important software!
-

User avatar
CelticKat
Junior Member
Posts: 22
Joined: Wed Mar 11, 2015 9:23 pm

Re: Monospaced Option w/o Code Box?

Post by CelticKat » Tue May 26, 2015 8:37 pm

I suppose that BBCode example you gave could definitely give an option, but I see two problems overall:

1) You said that the [pre] tag often uses monospaced font; when does it not, and what would I then do if in such a situation?

2) The HTML example you gave won't work because for the situations I described above, usability would depend on there not being a code box around it. The box would just be obstructive.

Also, is there a <pre> tag as well?
__________
Sit down and chat with a fundamental particle sometime. You might find it has a QUARKY side!
Mozilla/5.0 (X11; CrOS armv7l 6812.88.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.153 Safari/537.36

Post Reply