| «« Mysterious Presents | My Top Music List of '04 »» |
|
About
I'm Ryan Lowe, a Software Engineering graduate living in Ottawa, Canada. I like agile software development and Ruby on Rails.
I write this blog in Canadian English and don't use a spell checker. Typos happen.
Projects
» Full-time Ruby on Rails freelancer
» Full-time with Rails since May 2005 » Former committer for RadRails (now Aptana) » I also have a few Rails side-projects in development: 1. wheretogoinTO.com Toronto nightlife 2. Hey Heads Up! TODO list and sharing 3. Layered Genealogy family history research 4. foos for foosball scoring 5. fanconcert for music fans (on hold) Hiring Rails developers? I can telecommute by the hour from Ottawa, Canada »» Email: rails AT ryanlowe DOT ca
BulletBlog
Now hosted on Hey! Heads Up -- check it out!
Syndication
Pings
Recent
Derek Lowe's (Ryan's older brother) words at Ryan's funeral
blog@ryanlowe.ca no more Forging Email Headers: Good, Bad or Ugly? Sarcastic Dictionary (Part 1 of Many) Tags Hierarchies Twisting Rails is Risky Business Risky Business? My Take on Early Alphas Whoa, it's August 2007 Closing Comments A Postscript to "Growth at the grassroots" »» All Blog Posts
Linkage
del.icio.us/ryanlowe
technorati/ryanlowe.ca/blog Aurora Roy Jim Andrew Trasker Travis Kibbee Karen Dr. Unk Ayana Van Bloggers Joel Spolsky Robert Scoble Tim Bray Dave Winer Raymond Chen James Robertson Ruby/Rails Bloggers rubyonrails.org weblog David Heinemeier Hansson Dave Thomas James Duncan Davidson Mike Clark Jamis Buck Signal vs. Noise Tobias Luetke Amy Hoy: (24)slash7 Jeremy Voorhis Eclipse Bloggers Planet Eclipse EclipseZone Luis de la Rosa Eclipse Foundation Kim Horne Billy Biggs Ian Skerrett Mike Milinkovich Bjorn Freeman-Benson Denis Roy
Archives
|
An Expanding Text Box for Property Values
I'd like a custom widget for Durham, to be able to handle arbitrary property values. A file's metadata is name/value pairs, or properties. The names are usually short but the values can be arbitrarily long. In a form to edit metadata there may be text widgets a few lines high for entering values that are expected to be long. But what if you don't know what to expect? I want to make a form for arbitrary metadata from any file type. I don't want to have to go through each of the properties and say which could be long. An easy solution would be to make every text box a few lines high -- but that would be ugly and would take up too much space. The form will be in a scrolling view, but scrolling is a bitch. Plus when you expect a short value a regular one line text box just looks better. It would be nice to have a standard one-line-high textbox widget that can adjust its height either manually or automatically. The manual way involves something like a button beside it representing "switch between one line and multiline". That doesn't seem difficult. The automatic way could increase the height of the text box widget as needed. If you get to the end of the text box it will add another line as you type. There would also be a maximum height for the widget (ie. 4 lines) after which a vertical scrollbar would appear inside it. Would that be too confusing or weird to use? Posted at December 24, 2004 at 03:35 PM ESTLast updated December 24, 2004 at 03:35 PM EST Comments
Great idea. Forget about putting that checkbox for multi-lines. Just automatically adjust the height. That way you're minimizing the form's size in the beginning and adjusting as needed. Automation is the godliness of computer software. If you save the user time, the user will love you. » Posted by: roy at December 25, 2004 03:27 PMI think that this would be wonderful, with one warning though: you'd have to check to make sure that UI that you designed with this "looked okay" and could handle both the one line and expanded boxes. Just boundary checking which I know you'd do in spades. ;-) » Posted by: Jim at December 26, 2004 03:17 PMThere's a couple things you might want to think about. What constitutes one line? Depending on text size, one line might not be much at all. Some people have their text set quite large, because they have trouble seeing. Maybe selecting a length for the fields, and then building a form to suit the input would be a better idea. Specifying the type of data that's going to go somewhere will make things a lot easier in the end. » Posted by: Kibbee at December 28, 2004 09:10 PMHere's a link I stumbled across that might be of interest. Basically the rule states that if you are going to allow some value of N > 1, then you might as well add for infinity, or as much as the memory can handle. Creating arbitrary limits just causes problems. http://c2.com/cgi/wiki?ZeroOneInfinityRule » Posted by: Kibbee at December 30, 2004 11:50 AMIt's been a long holiday -- how does this relate to an expanding text box? » Posted by: Ryan at December 30, 2004 11:53 AMI think it goes like this. How do you make your UI cope with the expanding textbox. Depending on the text size, font used, and probably a billion other things, how will you adjust your entire UI to compensate for the new space taken up by the widget. Anyway, basically what i'm trying to say, is that it's probably better, and a lot easier from a design perspective to go with a one-line,N-Line input rather than a one-line, two-line, three-line, four-line, N-line. Something, (eg. Copyright date) are only every going to need one line. Other things, are going to need N lines, it's either 1, or N. » Posted by: Kibbee at December 30, 2004 12:05 PMThe view that contains the expanding text box widget could expand vertically and scroll if the form becomes long. The inside of the text boxes also scroll when they get past 4 lines -- the text box will only display 4 lines at a time maximum. When it comes to software there's a certain amount of planning you can do to get corner cases, but corner cases sometimes make a simple thing a very complicated thing. Complicated things take more time to maintain, which is bad. I may have to plan for large fonts but until enough people complain about it I probably won't worry about it. I have to set priorities or else the software will stop doing new useful things -- it will just be perfect looking for every combination of monitor, video card, resolution, colours and it just goes on and on. Perfection like that doesn't seem worth it. » Posted by: Ryan at December 30, 2004 12:17 PMThe real problem i forsee, and what I've seen in many applications, is that expanding the UI height can have bad effects is that if the UI is expanded too high, it might go off the bottom edge of the screen. Unless the UI will account for this, and have the UI scroll much like webpages do, then you will probably run into problems. You do not know how many Linux applications I have seen where you can't reach stuff in the UI unless you have 1024x768 resolution. Anyway, I think there might be a better way to create the widget. Maybe a button beside a text box that opens a small windows that lets you entere longer strings. » Posted by: Kibbee at December 30, 2004 01:21 PMThat's a lot of mights for something minor. Let's just see when we get there, my good man. YAGNI! Cheers! » Posted by: Ryan at December 30, 2004 01:48 PM |