Tabbed navigation is starting to happen

I got some time to work on things again tonight. I’ve been busy adding the navigation tabs and figuring out how that all works. I decided to use Tabnav because it seemed like the path of least resistance. So far I think that was a good choice. It took me about 20 min to get oriented and then I was off and running. Once again I’m impressed how easy it is to get a basic skeleton going for things in rails.

So far I’ve got the recipe page with tabs to a users inventory. After writing this I’ll work on getting the tabs fleshed out more, I’m still not sure what elements it makes sense to navigate to. I keep having this internal debate that tabs should take you to content and not actions. For instance it should take you to your recipes but we should not have a tab to start a new recipe. I think I might add tabs for recipes, inventory and brews, and possibly the BJCP guidelines (If I choose to reproduce them here, still up in the air on that too). Each of those tabs will have the list you would expect, as well as action links for deleting, editing and adding / starting a new whatever.

Its funny how little time this took, about an hour but how productive it feels because it changed the way the site looks. In my day job I don’t ever see a user interface change for the work I do…. instant gratification is nice.

One gotcha I don’t particularly understand about Tabnav. Whenever I update what a tab links to, or the text in the tab I have to restart mongrel… what the heck? Not a huge deal but I wasted about 15 min figuring out why my changes wouldn’t take effect.

Comments

Starting to work on CSS

Tonight I started playing with CSS to get the color scheme that Chris came up with onto a web page. No tabs or navigation or anything yet, but I’ve splashed the colors on the page. Kinda like that guy that used to paint on MTV. You can take a peek at what we have started to play with here. I’ve embellished the original scheme slightly and we will see if Chris beats me up for it. It’s easy enough to change back I suppose.

Be warned that that page is in no way functional. Anything posted under the pre alpha site is really just for Chris to take a peak and what I’m doing and is never guaranteed to work (I update things haphazardly and make no effort to ensure that it reflects a consistent image) and it isn’t really for public consumption. I probably should not have named it pre alpha….

Anyway I’ve learned that I don’t know much about CSS. This is not a terribley huge suprise. I am muddling my way through and making decent progress. If anyone’s got a good web page or book on CSS to recommend I’d appreciate it. I’ve read some stuff online and haven’t found any good comprehensive thing I’m supper happy with. I plan to go pickup a book this weekend maybe. Surley O’Reilly has something that can help me out.

Anyway, thats my quick update and now I’m back to it.

Comments

One step forward two steps back

Chris and I met and had some discussions about a visual theme and layouts. We think we’ve got a target layout idea for v1. At the risk of articulating it incorrectly I’ll let Chris talk about it if he wants to comment (Chris if you want to blog stuff here yourself let me know and we can make that happen).

During the demo for Chris and playing with the site myself I have come to the realization that I have gotten the relationship wrong between ingredients and recipes. Currently we have the notion of an ingredient that says what it is, but nothing really specific beyond that. For example you would have a malt extract ingredient. There was another object called recipe ingredient that had more specific information about manufacture, extract percentages (60/40 wheat to malt or whatever) and quantity. Recipes and inventories were both constructed using the recipe ingredient object. After working with that I found it became a pain in the ass to build a recipe because you need to link it to a specific instance of a recipe ingredient. This meant you had to fill out manufacturer and all that for things in your recipe. This is wrong and just made things a bear. Its also what caused me to take so long to get recipe creation working (since it had a bunch of dependencies on inventory functionality).

I’ve decided to ditch that idea and just construct recipes with the base ingredients. So instead of saying Briess Malt Extract you just say Malt Extract as an ingredient in a recipe. This feels better and is how recipes are usually written. I’ve renamed the recipe ingredients class to be inventory ingredients.

A recipe will control how much of each ingredient it has and what not. There will still be an intermedary object that will encapsulate quanty and the ingredient, this will also be used in the inventory and proably be able to perform converesions (cups to oz etc)). This should reduce the coupling between recipes and inventories and save me a few headaches.

Comments

It’s alive

In a clunky Frankensteins sort of way. Recipes can be created and attached to a user. Ingredients can be added to said recipe. At the moment all recipe ingredients are shared between all users… I’m not sure how I feel about that. A recipe ingredient is a more specific ingredient. It adds Manufacture, Quantity and Unit of Measurement… the more I think about it those last two may belong somewhere else. Anyway. An ingredient would be something like DME, while a Recipe Ingredient would be something like 2 cups of Briess DME.

The nav is still incredibly clunky. Hopefully Chris has had some time to think about what navigation should look like. Next tasks is to figure out if the measurement stuff should move out of the recipe class itself and into a helper of some sort. I’ll also make it so recipe ingredients aren’t shared between users (may hap we will have some common pool of them and then you make them your own).

The other task I’ll tackle is the ability to add steps to a recipe. This should get recipe creation all done and I’ll have produced something capable of storing recipes per user that can be searchd by everyone.

One thing I’ve done, that I’m not sure what to do about is allow recipes to be created by an unregistered user. This is cool, and they can create it and add ingredients and all that. The thing is they can’t come back and edit it later. Once they click ‘save’ that’s the ball game. I’m officially soliciting suggestions. One thing I was thinking bout is using gravatar’s. They have the ability to bind a session to an IP which is kinda cool, and it just looks like it would be a neat thing to integrate. I don’t think they provide anything I couldn’t get with a session cookie or the like…. but eh… why not. Other ideas appreciated. Should I just restrict recipe creation to registered users (not wild about that).

Also, wordpress has this autosave feature that turns spell check off (when using the wyswig editor)… anyone know how to disable that?

Comments (1)