So, I've been working off-and-on on getting form-based editing of listings working. An example is now up at http://wikitravel.org/examples/listings/Listing.html . It doesn't have all the listings fields (I'm thinking a "more fields" and "fewer fields" toggle for that kind of thing), and it doesn't work well with Internet Explorer, Konqueror, Opera or Safari, but some folks may enjoy seeing this in Firefox as the working model for how the listings editing will work.
Some other notes:
- The edit link is grayed-out so it doesn't get in the way of normal reading. I think that people who want to edit a listing will look around for a second to see it.
- The "Save" button will do an Wikipedia:AJAX call to the server to save the listing and get back a rendered replacement. There's an AJAX library built into MediaWiki just for this kind of interface.
Feedback welcome, please. --Evan 14:25, 22 March 2007 (EDT)
- Looks like a nice start in Firefox2 on OSX/XP/Vista. Since you renamed the page... Safari now works right. IE7 XP/Vista shows the dialog boxes arranged with one item per row, but each entry field is blank and the "save" button does nothing. Would be nice to have a popup associated with each field telling a little about it. -- Colin 15:18, 22 March 2007 (EDT)
- That would be pretty neat. I'll see if there's an easy way to do that. Yeah, I saw the same problem with IE. I had to move the page, IE was choking on the .xhtml file (same content, different mime type... sigh). It may be a difference between the XML and HTML DOM handling in IE. I'm going to concentrate on making it work better in IE just so more folks can review. --184.108.40.206 15:24, 22 March 2007 (EDT)
Moved here from Tech:Popup editing for listings tags:
For listings, it would be nice to have a form-based editing interface, preferably pop-up and AJAX-y. --Evan 16:05, 17 June 2006 (EDT)
- Copied in from en:Wikitravel talk:Listings
Review testing of San Diego
I put the first version of the listing editor up on review today. There should be edit links next to all of the listings that allow you to edit via an in page form. If the links don't show, try saving the page to update the cache. It currently doesn't handle adding items (something we'd like to do), but you can add a stub listing <see name="my attraction"> and then edit that without having to mess with all of the tags. KevinSours 16:59, 2 November 2007 (EDT)
- Looking good! Three things jump out at me at first glance:
- Lack of a
- It's not possible to edit listings on an "out of date" page that have since been deleted
- Editor box can sometimes cover up important information while editing—would it be possible to make it float, and to enable a click-and-drag functionality to move it around while editing?
- I'm really looking forward to having this listings editor completed! Also, is there a better place to discuss the draft version? --Peter 18:41, 2 November 2007 (EDT)
- That looks great! I don't have any real critique at the moment, but I'll try and look at it more later... but glad to see this moving forward! —Unsigned comment by Cacahuate (talk • contribs) .
- Peter, do you mean lack of a directions box? There is a description box, although on my browser (Firefox on a small laptop screen) it overflows pretty badly (screenshot). Another important missing bit is the alt box.
- Some thoughts from a usability point of view:
- As the listing attribute names are not always obvious, I think it would be better to give full descriptions (eg. "Official website" instead of "url"), with little click-to-pop-up or mouseover help boxes for further help.
- The space given for some of the bits (eg. phone and name) is also insufficient at the moment.
- And last but not least, when I click "save", nothing seems to happen for quite some time. Eventually the edit goes through, but it would be nice to have some immediate feedback. Jpatokal 21:54, 2 November 2007 (EDT)
- Thanks, I did mean directions. I'm also using firefox, but do not experience the description box overflow problem. A few more comments:
- The listings editor should be different for hotels—they do not have "hours," but rather "checkin" and "check out" times.
- It's been a long-standing goal to get the international code of the phone number to appear in italics, so that the US White House phone number, for example, would be displayed: +1 202 456-1111.
- "Email" and "Fax" fields are also lacking.
- Lastly, I wanted to echo Jani's comment about the save delay—it is a bit confusing when it seems as though nothing is happening. --Peter Talk 22:41, 2 November 2007 (EDT)
Peter, can you walk me through point 2 a little? What exactly are you doing and why do you want to do it? That will help me figure out how I can address it. KevinSours 12:52, 4 November 2007 (EST)
- In point two I'm referring to editing out-of-date pages. It's often useful to edit a page from the history of an article, in particular when the current version has undergone significant vandalism. So I would go to a previous version through the history page and then hit edit. Clicking on the edit button for a listing on this out-of-date version, which has since been deleted, will not work and gives an error message that you are trying to edit an item that does not exist. The workaround would be to revert to the previous version and then edit it, but that adds an extra step and several extra steps if an editor is unaware of what the problem is. --Peter 20:37, 4 November 2007 (EST)
I put another update that addresses some of these issues.
- Missing fields -- I'm afraid that if we put every possible field onto the form as it is, it will be overwhelming. Particularly for new users. The ultimate goal is to divide the fields into "common" and "extra" groups and put the latter on an expanding section that is hidden by default. For the initial go around I'd like to focus on getting the common group right and push the "extra" logic off until I can get some other things done.
- Field widths -- I expanded a few of the fields. This can be tweaked further if people feel the need. However we have to be careful not to make the overall form too large.
- Saving from old revisions -- I need to look at this further and see what might be done.
- Something I've probably forgotten.
As always feedback is welcome and encouraged.
KevinSours 16:27, 7 November 2007 (EST)
- The changes are all working very well—it's really looking great.
- On the missing fields note, I would strongly encourage you to include the "directions" tag in the "common" group—in much of the world (e.g., India, Japan, etc.) addresses are not the primary means of identifying locations and we rely heavily on contributors ability to add and fix the "directions" content. Otherwise, the expanding section sounds like a good idea, although the present lack of the extra group does cause a few odd things to happen:
- If a set of listings tags already has content under a tag not used in the listings editor, after once editing using the editor, that tag will move in the wiki-markup to the end of the listings tags. Example:
- * <see name="One Magnificent Mile" alt="Two Mag Mile" address="980 North Michigan Avenue" phone="" url="http:fake.onemagmile.net/phony" hours="M-W 5PM-3AM, Th-Su 11AM-4AM" hoursextra="" price="$57/hour" priceextra="" lat="" long="">673 ft. A highrise including luxury retailers, office space, and luxury condos on top.</see>
- * <see name="One Magnificent Mile" address="980 North Michigan Avenue" phone="" url="http:fake.onemagmile.net/phony" hours="M-W 5PM-3AM, Th-Su 11AM-4AM" hoursextra="" price="$57/hour" priceextra="" lat="" long="" alt="Two Mag Mile">673 ft. A highrise including luxury retailers, office space, and luxury condos on top.</see>
- Since this fortunately does not alter the appearance in the article, that's not a big deal, but there may be other strange effects that I've missed.
- This is an artifact of merging the changes from the editor into the existing tag. Other than the reordering of attributes, there shouldn't be any strange behavior. I don't believe order of attributes matters for anything, so unless people really have a problem with it, I don't intend to change this. KevinSours 18:56, 7 November 2007 (EST)
- Lastly, I agree with the comment somewhere above that it would be slightly more intuitive to replace "url" with "official website." --Peter Talk 18:26, 7 November 2007 (EST)
- That would be the bit I forgot. I'm not opposed, but right now I think a number of other things are more pressing (like an add listing link). KevinSours 18:56, 7 November 2007 (EST)
- I think having an Add Listing function will be very helpful in encouraging contributions from Wikitravellers. Redondo 21:03, 7 November 2007 (EST)
- Looking good! The "Saving..." bit is great. Regarding the fields, I'd suggest dropping "hoursextra" and "priceextra", which are very rarely used, in favor of "directions" and "alt". I'm also not sure that "lat" and "long" are the kind of thing average users are going to be contributing.
- It would also be really good to some kind of "help" function, so a user would see eg. "hours?" and they'd get a box that says "The opening hours of the attraction" when they click on the question mark. You can copy the texts straight from en:Wikitravel:Listings for starters. Jpatokal 22:15, 7 November 2007 (EST)
- Looking great! Agree regarding swapping hoursextra and priceextra for directions and alt, definitely more common... but I think the lat/long is a good idea, that's becoming more popular, and may well encourage their use... definitely something that gives us an edge over the traditional guidebooks. – cacahuate talk 01:39, 9 November 2007 (EST)
- Regarding the "extra" fields. If I read the history right, those fields exist because people were adding notes to the main price and hours fields -- making the data breakdown a lot less clean. I'm worried that if we hide those fields we'll end up with the same problem that led to their creation in the first place. Namely that people, unaware that they they exist, will go ahead and add the notes to the main field. I think we can add alt and directions to the existing set and I will do that on the next revision I push. KevinSours 12:17, 9 November 2007 (EST)
- I don't think the extra fields are really used at all. I don't see a reason to try have a "clean data breakdown" for the price and hours fields: their content varies a lot, because pricing and hours/days open are often complex, and I don't see why this should be a problem. Jpatokal 00:49, 10 November 2007 (EST)
- Jani, are you saying that it should just all go in the price/hours box, just put a comma and then list anything else that needs saying? I'd agree with that – cacahuate talk 13:18, 10 November 2007 (EST)
- Basically yes. Jpatokal 21:54, 10 November 2007 (EST)
- What I am going by is this (from en:Wikitravel_talk:Listings)
- So, I'd like to split the difference here and limit our phone number fields to four: phone, fax, toll-free and phone-extra. The last one would be a catch-all text field in which extra phone information or extra phone numbers could be added (without any special styling). I'll add separated lat and long attributes and fall back to geo if they don't exist. Finally, it will make me sad, but I'll add the check-in and check-out attributes for sleep entries, with a fallback to hours if they don't exist. Finally, I'm going to add an hours-extra and price-extra attribute for extra price and hours info. --Evan 14:54, 4 December 2006 (EST)
- I don't have strong feelings on whether or not we need the extra fields (Evan might). However, if we have them around we should encourage their use. Otherwise you get some listings one way, other listings the other and you get the worst of both possibilities. KevinSours 12:28, 12 November 2007 (EST)