TiddlySpace / tiddlyspace

A discoursive social model for tiddlers
http://tiddlyspace.com
Other
106 stars 38 forks source link

single character spacename rejected #445

Closed psd closed 13 years ago

psd commented 13 years ago

attempting to create a space called "x" resulted in the error message "error: invalid space name - must only contain lowercase letters, digits or hyphens".

I'm unclear if we have a minimum spacename length and the error should say so, or if the regex testing this should be along the lines of: ([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9]) to match allowed old school DNS addresses ..

FND commented 13 years ago

The reason that message is unhelpful is simply that when we wrote the early prototype, I couldn't come up with an adequate, concise phrase that included length - and apparently that never got much attention until now...

From TiddlySpaceConfig:

isValidSpaceName: function(name) {
    return name.match(/^[a-z][0-9a-z\-]*[0-9a-z]$/) ? true : false;
},

So the minimum is two characters (as it should be IMO).

If anyone can come up with a better phrasing, it's as simple as changing TiddlySpaceSpaces's charError.

cdent commented 13 years ago

a hostname (a node label in rfcs 1034 and 1035) may be from 1-63 octets

since space names are hostnames and usernames are space names

then hostnames are the limiting factor for space and user names

FND commented 13 years ago

So the minimum is two characters (as it should be IMO).

My reason for that was to avoid misunderstandings and potential deception (e.g. the subdomain in http://l.tiddlyspace.com is easy to miss).

Having said that, I don't really have strong opinions on this.

In terms of actionables, are we dealing with two separate issues here: Misleading phrasing and contentious artificial limitation.

The latter seems more of a story.

jdlrobson commented 13 years ago

I think we should just update the copy text to add at least 2 characters in length.

I personally don't see the benefit in 1 letter subdomains but if we want them this should be a story.

jdlrobson commented 13 years ago

https://github.com/TiddlySpace/tiddlyspace/pull/457 if you agree with the above.

jdlrobson commented 13 years ago

(Note I'd rather we encouraged more meaningful space names. I see little use in letters as space names unless they are talking about the letter a or letter b etc.. in great detail.)

FND commented 13 years ago

adapted jdlrobson's phrasing in TiddlySpace@e0ed04842b020be102df16285e1d523ab8c0e251 - closing, as any further issues/stories should be discussed separately