default cardtype for cards created through Pointers
Ticket
+issues
Users often first add card names through pointers, then click to add the card itself. These users often don't understand cardtypes and should not have to know to choose the cardtype from the dropdown in cases where the cardtype needed is clear.
+solution
If there is a *options search card that specifies "type", that type should determine the type of the inclusion.
When I started in on this I realized that pointers render their links via the inclusion mechanism, which meant that cardtype-setting had to be handled by the pointer rendering, by inclusion processing, by our link-building functions (link_to_page / url_for_page), and by card/show and card/new. None of them were ready for it.
I got an end to end solution going, which had these consequences:
- to represent it in the pointer, I made a way to represent type pre-sets in inclusions: { {cardname| type:Cardtype} } It might be possible to skip that and represent it only in the slot if that is preferable. However this might actually be an easier way to build forms.
- so far, it only works in link view. fixing this in open/closed/content views will mean some javascript work, which we may want to coordinate with plans for overhauling the way all that business works.
- I don't think the link_to_page / url_for_page changes are intrusive or likely to cause performance hits, but it may merit review.
- in fixing card/show and card/new I think I improved considerably the behavior we get when you send bogus or incorrectly capitalized names through.
I have not pushed this code yet, because I think it may be a little riskier than the other changes, so I'm leaning towards putting it in Wagn 0.12
Not working. On http://sandbox.wagn.org/wagn/testing_default_cardtype_in_Pointer included John Abbe+tags|type:Image but clicking on yadda still gets Basic. Wasn't clear on implementation, so added a tags+*options Search card with {"type": "Image"} and yadda still gets Basic.
--John Abbe.....Tue Feb 10 15:16:55 -0800 2009
that's not how the type:Image thing works. that would mean that John Abbe+tags would be an image. So if I did then clicked to add, it should be an Image.
The *options route is correct. However, if you tried creating, deleting, and re-creating the card (yadda), then the problem is probably the old cardtype issue we have with recreating cards from the trash. Maybe try it with a new card?
--Ethan (Not signed in).....Tue Feb 10 18:50:57 -0800 2009
BTW, in general, the solution should be specified in the solutions section. It was in this case.
--Ethan McCutchen.....Wed Feb 11 10:28:42 -0800 2009
Seems to works but there are some issues:
If you click on an inclusion, cancel, then click on it again, it's type is set to Basic rather than what's indicated in +*options.
http://sandbox.wagn.org/wagn/typetest+*options finds Image cards. After creating the image (item num two) on http://sandbox.wagn.org/wagn/testing_default_cardtype_in_Pointer i changed typetest+*options to Number and then when i clicked on item num one or item num three (even after reloading the card) they were still set to type Image. (At one point they started returning 500 Internal Server Error, but i can't seem to reproduce this.) Maybe a caching issue, as editing http://sandbox.wagn.org/wagn/John_Abbe+typetest causes the current typetest+*options to be respected. (Right now typetest+*options is set to Image but the inclusions come up Number)
--John Abbe.....Fri Feb 13 18:48:55 -0800 2009
John, you're almost certainly right about the problem being caching. Nice catch. And these test records are super helpful.
Lew, I'm starting to think we shouldn't cache Pointer cards for now, since it causes the significant weirdness in respect itemlink when including Pointers. Then we could close that ticket and open one to "optimize pointer performance".
Re the cancel, I'm not entirely on what's going on there. I'll take a peek.
--Ethan McCutchen.....Sat Feb 14 08:40:24 -0800 2009
I think it may make sense to postpone fixing the cancel issue (and re-ticket it). Because of the way the slot system currently works, the add +whatever thing is actually adding a new slot as it goes further and further down, and the type isn't getting passed all the way thorugh the system. Rather then work on making it pass through, I'd rather wait until we implement the system that doesn't make us pass it all around!
--Ethan McCutchen.....Tue Feb 17 12:21:26 -0800 2009
Ticketed: respect default cardtype after cancelling
--John Abbe.....Tue Feb 17 22:39:30 -0800 2009
If you open this up and click on ADD CARDNAME everything's fine, but in closed view, the red links still need the URL syntax to be of type User.
--John Abbe.....Wed Feb 25 17:17:41 -0800 2009
pieces all there, just had to pass one more argument in line view.
--Lewis Hoffman.....Fri Feb 27 06:11:40 -0800 2009
Works; closing.
--John Abbe.....Fri Feb 27 15:18:29 -0800 2009
Started on Pointer. Also want to add an nesting+tips.
--John Abbe.....Sun Mar 01 07:38:26 -0800 2009