X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b41cc4b15bc096f00791afc2c7dca95adc1cce77..b33efc1d715fd81ed7b83665c998c663cd5db4b4:/doc/todo/pedigree_plugin.mdwn diff --git a/doc/todo/pedigree_plugin.mdwn b/doc/todo/pedigree_plugin.mdwn index d1eb6fdf9..1977c3d4d 100644 --- a/doc/todo/pedigree_plugin.mdwn +++ b/doc/todo/pedigree_plugin.mdwn @@ -73,6 +73,14 @@ Any opinions on the idea/design/implementation? >>> Javascript might do the trick, but if it's getting so complicated, I'll >>> just style my parentlinks another way. +>>>> Perhaps I misunderstood what `is_grand_mother` is supposed to do. The +>>>> docs were not very clear to me. If it's supposed to be 2 down from +>>>> the page, (and not from the root), this could be achieved by reversing +>>>> the `depth_n` variables. So the page gets `depth_1` set, its parent gets +>>>> `depth_2` set, etc. If you want to be able to include/exclude +>>>> from both ends, you could also have a `height_n` that is 1 for the +>>>> root, and counts upwards. --[[Joey]] + >>> In my understanding, your suggestion gives us little more than can already >>> be achieved anyway with `HTML::Template`'s `loop_context_vars` (i.e. >>> `__first__`, `__last__` and `__counter__`). The only added bonus is doing @@ -119,6 +127,38 @@ Any opinions on the idea/design/implementation? >>> bare minimum. Let's say it is my up-to-date proposal. (Well, if the various >>> shortcuts don't really annoy you, I'd be glad to keep them ;) +>>>> This sounds fairly similar to what I just described above. (I called +>>>> DISTANCE "height".) I don't know about the CSS tricks; seems like if +>>>> `DEPTH_n` and `DISTANCE_n` are provided, you can test for them inside +>>>> the loop using HTML::Template's lame testing, and isolate any page or +>>>> range of pages. --[[Joey]] + +>>>>> Ok, I definitely like this idea, as an effective and generic +>>>>> page-range selection tool; this seems the way to go to me. + +>>>>> But if you discard the `DEPTH` and `HEIGHT` +>>>>> counters, we lack a way to **style**, for example, every parent link +>>>>> depending on its depth or height; one can do this for arbitrary +>>>>> parents (chosen by their height or depth), but *not* for *any* parent, +>>>>> since there is no way to express, with HTML::Template, something like +>>>>> "display the name of the only `DEPTH_n` variable that is currently +>>>>> true". So I am in favor of keeping the `DEPTH` and `HEIGHT` counters, +>>>>> to allow constructs like: + + + " class="parentdistance"> + + / + + +>>>>> This seems to me a nice functionality bonus, and should not +>>>>> imply too bloated code. I'm thus going to rewrite the plugin +>>>>> with only `PEDIGREE`, `DEPTH`, `HEIGHT`, `DEPTH_n` and +>>>>> `HEIGHT_n`. -- intrigeri + +>>>>>> Done, and pushed in my pedigree branch. Update: I've also done and +>>>>>> pushed two commits that rename the plugin and replace +>>>>>> the core parentlinks with this one. --[[intrigeri]] (I'll try never to rebase this branch, but writing this plugin has been a pretext for me to start learning Git, so...) @@ -140,3 +180,15 @@ default templates do use parentlinks ;). >> Just commited a testsuite for this plugin, BTW. It's nearly twice >> big as the plugin itself, I'm wondering... -- intrigeri +Merged, nice work. (Overkill having a test suite. ;-) --[[Joey]] + +> Thanks. If the testsuite reveals itself to be harder to maintain than +> the plugin, my ego won't be offended to see it removed. It's been +> nice to find a way, step by step, to work with you on this small +> plugin thing. I'm starting to feel a bit at home in ikiwiki +> sourcetree, which is great since I may have to start working on some +> more ambitious ikiwiki stuff, such as the ~multilingual wiki +> (master language + translations) support. Expect news from me on +> this front in the next weeks. --[[intrigeri]] + +[[!tag patch done]]