#tantekGWG, the challenge of conditional code for the presence/absence of particular properties is a real challenge
#tantekbest way is to start from the presentation and work backwards
#tantekthat is, sketch out how the presentation could/should/would ideally look if you have a certain set of properties, for all possible sets like that
#GWGI am starting with a basic presentation design. I'm actually going backward to that. I want to write that in a way I can remember how to work with it. Then enhance it.
#tantekyou can approach that set of sketches two ways. you can start with, assume you have all the properties, what would a good presentation look like? which of the properties would you use and not use (even if you have them) ?
#tantekor you can start with - assuming you only had *one* property, what would you present?
#tantekand within those two approaches, you could start with text-first design
#GWGtantek: You raised the question of differing presentations based on single or feed view, and that added a second layer of questions on my part
#tantekonce you have design sketches like that that look good to you, then you can figure out the minimal code necessary to produce them based on the presence/absence of properties
#GWGMy plan at the moment was to break out reusable parts of the code into separate functions.
#tantekGWG, correct. there is different presentation of a permalink page vs. in-stream.
#tantekanother (more subtle) difference is logged in vs. logged out view
#tantekand within the logged-in variant, another difference is has-write/edit/delete-permissions, or read-only (may choose to hide/show particular webactions like edit/delete)
#GWGThat is why after thought, the best way to make it readable was to break it into pieces.
#tantekperhaps - it is difficult to figure out the pieces boundaries without first figuring out the variants that the pieces must fit into
#tantekby figuring out the variants first, you can look across them, side-by-side, and the common pieces will be more apparent. then you can implement those common pieces, vs the pieces that are different for each variant
#tantekthe overall presentation variants of a whole post (whether on a whole page, or in a stream, or in an archive)
#tantekKevinMarks is right. The key with presentation-first design is that it is a way of making sure that every conditional driven by a specific presentational need/desire, which is a good way to minimize the number of such conditionals, and thus simplify the resulting code.
j12t, friedcell, wolftune, nitot, tantek and jciv joined the channel
#tantekwithout a URL of the thing being liked/favorited, it doesn't make much sense - though I suppose you could just like something by name without linking to anything