|
right from the start I got confused by all the options that where offered (4 radio buttons, 1 check box) under the edit box in Q&A as well as in T&T. I never understood what they were meant to do, and why they all were required.
Today I investigated a bit and I don't like it at all. There are two problems:
1. the functionality is wrong IMO.
2. the wording is short and unclear.
OBSERVATIONS ON RADIO BUTTONS
I used two samples, shown here (warning: I did not HTML-escape the samples while composing this message so one needs to look at the message source to see what is really there, i.e. a real BOLD tag, and a plain for with less-than test):
for (i=0; i<10; i++) log(i);
string rating="";
m=rRatng.Match(article);
if (m.Success) {
idx=m.Value.LastIndexOf(":")+2;
rating=m.Value.Substring(idx);
if (rating.StartsWith("0")) rating="";
}
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type specimen book.
// this is a bold statement
// does it HTML-encode?
for (i=0; i<10; i++) log(i);
It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset
sheets containing Lorem Ipsum passages, and more recently with desktop publishing software
like Aldus PageMaker including versions of Lorem Ipsum.
Both samples have all lines starting with a TAB; they both include an HTML tag and a less-than operator.
The four radiobuttons are numbered 1-4 left-to-right.
For the C# code sample the results were:
adds PRE tags with lang moves left HTML encodes preserves HTML
1 yes yes yes yes no
2 no no no yes no
3 no no no no yes
4 yes yes yes yes no
For the text sample the results were:
adds PRE tags with lang moves left HTML encodes preserves HTML
1 no no no yes no
2 no no no yes no
3 no no no no yes
4 no no no yes no
CONCLUSION ON FUNCTIONALITY:
it is all wrong IMO, for several reasons:
- 1 and 4 do exactly the same; I cannot force the adding of PRE tags (which 1 is supposed to do).
- the HTML encoding (handling of < > &) should be independent of the PRE choices. As is, I can't get it to
paste code that has HTML (say in comments), it will HTML encode or not give PRE tags.
- when HTML tags are to be preserved, the HTML encoding still needs to be applied, hence more intelligence seems required (which I was told is available in the forum message editor!)
- when PRE tags are present, none should be added (I tried paste code, cut the result which now has PRE tags, paste that again, and the outcome got its PRE tags doubled).
THE CHECKBOX
I haven't looked into the checkbox yet; I'm not happy it exists at all. One reason is: after all the attempts to make intelligent choices about PRE, HTML encoding, and preserving HTML tags, it looks like a main switch that turns it all off. Do we really want that? I have a feeling it relates to the way a forum message, its signature, and its "modified on..." remark are all stored in one field.
SUGGESTION
- list all relevant use cases
- then come up with the logical user interface that deals with those use cases
WORDING
as long as functionality isn't clear and settled, it is too early to discuss wording.
Once we agree on what it does, I could easily come up with wording that is both clear and concise (although I'm sure I will suggest a tooltip approach to allow for an alternative less-than-concise-but-absolutely-clear wording.
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Please use <PRE> tags for code snippets, they improve readability. CP Vanity has been updated to V2.3
|
|
|
|
|
The broken functionality has been fixed, the wording clarified, and your code sniffer is now in the forums.
My apologies for the delay.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Chris Maunder wrote: The broken functionality has been fixed
Really? There is at least one show stopping bug right now. Took me two tries and less than a minute to get it. Why do you release untested stuff?
The functionality offered is still a bit of a mystery, some features ought to be orthogonal: when I paste something, I should be able to decide always-PRE/auto-PRE/never-PRE, and HTML escape on/off. That looks like two independent three/two-way decisions, not a single four-way decision. If you only offer all or some combinations, please list all aspects of each choice; if you offer several groups of choices, please use GroupBoxes or something equivalent to make that obvious.
|
|
|
|
|
Apart from having a separation between "wrap in PRE" and "encode" (which I agree would be nice and I will try and find more spare time to add) I can't replicate exactly what is broken based on the UI provided.
If you're saying the system / UI itself is broken (and untested) because I don't offer separate options that's a different story.
In any case, thanks as always for the feedback
[Apologies for the double notification: I had two windows open in Reply mode while testing and hit the wrong "Submit" button ]
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|