Tab support in posts

Having tab support added would be geatly beneficial, even if it is just inside codeblocks. As most everyone knows, unindented code is harder to read and makes helping people more of an annoyance.

Discourse co-founder Jeff Atwood doesn’t seem to think this is a good idea, so suggesting it directly to this forum seems like a better idea.

If accessability is a concern, this could be a toggleable setting of some sort.

2 Likes

If I recall correctly all features used on the Devforum are discourse features. We cant enable an option if it doesn’t exist sadly. Correct me if i’m wrong

1 Like

Discourse is open source, so a small modification could be made to change this.

1 Like

I am talking about adding tab support when you are writing a reply or topic. What you’re saying doesn’t make a lot of sense. Regardless, concern for automating access to the Developer Forums is entirely irrelevant to this request, which would not affect it.

I was a bit confused what you where talking about at first. The forum supports tab for most elements, and I can navigate using tab to the Reply button. Now I see that you mean when writing a reply. I completely agree, and it absolutely can be done using standard web features that do not assume everyone focuses on elements using tab (such as screen-readers).

To make an element focus-able, the element needs to have a tabindex attribute (standard and very well supported). The problem is, browser’s cycle through every tab-able element.
It definitely hurts usability more not to have tab support for replying. Anyone who either can’t see the interface, or can’t directly activate elements of the editor, won’t be able to post or reply. The Reply button may as well not be focus-able at all!

As with any usability feature, adding tab support to the editor could have a curb-cutting effect (9/10 non-encumbered pedestrians go out of their way to use a cut curb). Example: Reporting a bug from a console.

Alternatively you can hit space four times to mimic a tab, which sucks but it works at least!

Trying to type code inside of the developer forum can take a lot of time because you are forced to put spaces instead of indents. You can’t even copy and paste indents from other posts into yours, so you are forced to use spaces or not indent at all.

function EnableFrame(Frame)
if Frame then
if not Frame.Enabled then
Frame.Enabled = true
end
end
end
EnableFrame(script.Parent)

As you can see, the code above is unorganized and hard to read because it’s not indented, and you can’t use the tab key so you must put four spaces to represent an indent. This alone is a reason to add us a feature to indent, but even spaces can be an issue once added.

When copying and pasting a piece of code from the developer forum into studio, if the poster used spaces instead of indents then the alignment is uneven and can look very odd, along with being a pain to replace. Here is a visual example:


The lines aren’t properly aligned and you have to replace them with indents for the proper look.

Regardless of alignment, it would be much easier to create code on the dev forum using the tab key instead of pressing the space key multiple times for each line.

4 Likes