diff options
author | Joey Hess <joey@kitenet.net> | 2011-02-01 21:08:32 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-02-01 21:08:32 -0400 |
commit | 9ed779b746de86b92a1c08f1b2b4196d42149e55 (patch) | |
tree | d7e93ffb8574c8c396971bda2db8b4fb28e55249 /doc/bugs | |
parent | b752e7fec4d2bdd788a70722455018245900126b (diff) | |
parent | 148d18b04276474027a8e0eb537616b55c8103dc (diff) |
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
Diffstat (limited to 'doc/bugs')
-rw-r--r-- | doc/bugs/maps_with_nested_directories_sometimes_make_ugly_lists.mdwn | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/doc/bugs/maps_with_nested_directories_sometimes_make_ugly_lists.mdwn b/doc/bugs/maps_with_nested_directories_sometimes_make_ugly_lists.mdwn new file mode 100644 index 000000000..f66e2c0e5 --- /dev/null +++ b/doc/bugs/maps_with_nested_directories_sometimes_make_ugly_lists.mdwn @@ -0,0 +1,60 @@ +I'm using the [[map_directive|ikiwiki/directive/map]] to build dynamic navigation menus, and it's working really nicely! + +However on some pages, each nested item each get wrapped in a full set of `<ul>` tags. This doesn't actually hurt anything, but it's does it inconsistently which seems like a bug. I don't like it because it puts extra vertical spacing into my menu bar. + +Here's what I expect it to look like: + + <div class="map"> + <ul> + <li><span class="selflink">Archives</span> + <ul> + <li><a href="./2010/" class="mapitem">2010</a></li> + <li><a href="./2011/" class="mapitem">2011</a></li> + </ul> + </li> + </ul> + </div> + +And here's what it's actually doing: + + <div class="map"> + <ul> + <li><span class="selflink">Archives</span> + <ul> + <li><a href="./2010/" class="mapitem">2010</a></li> + </ul> + <ul> + <li><a href="./2011/" class="mapitem">2011</a></li> + </ul> + </li> + </ul> + </div> + +I've tried to replicate the problem on this site and cannot, I'm not sure if that's because of exactly how I'm using map or if there's something different with my site. I just upgraded ikiwiki to the latest Debian unstable as well as most of the required Perl modules and nothing changed. + +If you look at [this page on my site](http://adam.shand.net/ikidev/archives/) (getsource is enabled) you can see it working as expected in the main page and not working in the side bar. + +But it also doesn't work on the sitemap page: <http://adam.shand.net/ikidev/site/map/> + +This might be really simple, but I've been staring at it too long and it only looks like a bug to me. :-( Any suggestions would be gratefully accepted. -- [[AdamShand]] + +> Okay, I think I've figured this out, it looks like ikiwiki behaves differently depending on the level of heirarchy. I'll post the details once I'm sure. -- [[AdamShand]] + +>> I managed to replicate the issue on my ikiwiki, and I believe it is a +>> bug. The current upstream logic for going up/down by a level opens +>> (and closes) the unnecessary lists that you are seeing. Although the +>> resulting markup is semantically correct, it has superflous stuff +>> that introduces whitespace issues at the very least. + +>> I have a [[patch]] up [on my git repo](http://git.oblomov.eu/ikiwiki/patch/55fa11e8a5fb351f9371533c758d8bd3eb9de245) +>> that ought to fix the issue. + +>>> Wonderful, thank you very much for the help! I've installed the patch and it's working great, but it looks like there a minor bug. Sometimes it doesn't print the top/first map item. Cheers, -- [[AdamShand]] +>>> +>>> <http://adam.shand.net/tmp/map-orig.jpg> +>>> <http://adam.shand.net/tmp/map-patched.jpg> + +>>>> Thanks for testing. I managed to reproduce it and I adjusted the logic. +>>>> An updated [[patch]] can be found [here](http://git.oblomov.eu/ikiwiki/patch/dcfb18b7989a9912ed9489f5ff15f871b6d8c24a) + +>>>>> Seems to work perfectly to me, thanks! -- [[AdamShand]] |