Record another couple of pending bugfixes
[ikiwiki] / doc / todo / comments.mdwn
1 # Known issues with the [[plugins/comments]] plugin
2
3 ## Unimplemented
4
5 * Instead of just a link to add a comment, it could have a form to enter
6   the title, similar to the form for adding a new blog post.
7
8   > I'm not sure this is so useful? On Livejournal titles are allowed on
9   > comments, but very rarely used (and indeed usually not very useful);
10   > it's hard enough to get some people to title their blog posts :-)
11   > --[[smcv]]
12
13 * If a spammer posts a comment, it is either impossible or hard to clean
14   up via the web. Would be nice to have some kind of link on the comment
15   that allows trusted users to remove it (using the remove plugin of
16   course).
17
18   > Won't the remove plugin refuse to remove internal pages? This would be
19   > a good feature to have, though. --[[smcv]]
20
21 * Now that inline has some comments-specific functionality anyway, it would
22   be good to output `<link rel="comments">` in Atom and the equivalent in RSS.
23
24 ## Patches pending merge
25
26 * The default template should have a (?) icon next to unauthenticated users (with the IP address
27   as title) and an OpenID icon next to OpenIDs
28
29   > Done in my comments git branch, at least as a mockup (using the (?),
30   > {x} and {*} smileys for anonymous, OpenID and login respectively).
31   > --[[smcv]]
32
33   >> I've improved this to use independent icons from the wikiicons
34   >> directory (untested!) --[[smcv]]
35
36   >>> The new code produces links like /wikiisons/openid.png, which
37   >>> fail if ikiwiki is not at the root of the web server. --[[Joey]]
38
39   >>>> Sorry, I should have spotted that (the assumption failed on my demo
40   >>>> site, but the push to that site was when I was on the way out, so I
41   >>>> didn't have time to investigate). As a note for other ikiwiki hackers,
42   >>>> I should have used
43   >>>> `<img src="<TMPL_VAR NAME=BASEURL>wikiicons/openid.png" />`. --[[smcv]]
44
45   >>> I got to wondering if the icons are needed. On my comments branch
46   >>> (not master), I've dropped the icons and info can be seen by hovering
47   >>> over the author's name. Idea being that you probably don't care how
48   >>> they authenticated unless something is weird, and in that case you
49   >>> can hover to check. Does that make sense, should I merge it?
50   >>> --[[Joey]]
51
52   >>>> Yeah, go ahead. I preferred my layout with the author before the
53   >>>> comment - perhaps that's Livejournal's influence :-) - but I can always
54   >>>> edit the templates for my own site. As long as the default is something
55   >>>> reasonable and both layouts are possible, I don't really mind.
56   >>>> Minimizing the number of "resource" files in the basewiki also seems
57   >>>> a good goal. --[[smcv]]
58
59 * Previews always say "unknown IP address"
60
61   > Fixed in my comments branch by commits bc66a00b and 95b3bbbf --[[smcv]]
62
63 * The Comments link in the "toolbar" is to `index.html#comments`, not the
64   desired `./#comments`
65
66   > Fixed in my comments branch by commit 0844bd0b; commits 5b1cf21a
67   > and c42f174e fix another `beautify_urlpath` bug and add a regression test
68   > --[[smcv]]
69
70 ## Won't fix
71
72 * There is some common code cargo-culted from other plugins (notably inline and editpage) which
73   should probably be shared
74
75   > Actually, there's less of this now than there used to be - a lot of simple
76   > things that were shared have become unshareable as they became more
77   > complex. --[[smcv]]
78
79 * It would be useful to have a pagespec that always matches all comments on
80   pages matching a glob. Something like `comment(blog/*)`.
81   Perhaps postcomment could also be folded into this? Then the pagespec
82   would match both existing comments, as well as new comments that are
83   being posted.
84
85   > Please see [[plugins/comments/discussion]]. If I've convinced you that
86   > internal pages are the way forward, then sure, we can do that, because
87   > people who can comment still won't be able to edit others' comments
88   > (one of my goals is that commenters can't put words into each other's
89   > mouths :-) )
90   >
91   > On the other hand, if you still want me to switch this plugin to "real"
92   > pages, or if internal pages might become editable in future, then
93   > configuring lockedit/anonok so a user X can add comments to blog pages
94   > would also let X edit/delete comments on blog pages (including those
95   > written by others) in arbitrary ways, which doesn't seem good. --[[smcv]]
96
97   > I had a look at implementing comment() and fell afoul of
98   > some optimisations that assume only internal() will be used to match
99   > internal pages. So probably this isn't worth doing. --[[Joey]]
100
101 ## Done
102
103 * Add `COMMENTOPENID`: the authenticated/verified user name, if and only if it was an OpenID
104
105   > Done in my comments git branch --[[smcv]]
106
107   > Not seeing it there, which branch? --[[Joey]]
108
109   >> Bah, git push --all is not the default... 'comments' branch now (I've also rebased it).
110   >> Sorry, I'm on mobile Internet at the moment... --[[smcv]]
111
112   >>> merged by [[Joey]] in commit 0f03af38 --[[smcv]]
113
114 * Should the comments be visually set off more from the page above?
115   Rather than just a horizontal rule, I'm thinking put the comments
116   in a box like is used for inlined pages.
117
118   > I did put them in a box in the CSS... I agree the default template
119   > could do with visual improvement though. --[[smcv]]
120
121   >> I'll consider this solved by [[Joey]]'s changes. --[[smcv]]
122
123 * One can use inline to set up a feed of all comments posted to any page.
124   Using template=comment they are displayed right. Only problem
125   is there is no indication in that template of what page each comment in the
126   feed is a comment on. So, if a comment is inlined into a different page,
127   I think it should show a link back to the page commented on.
128   (BTW, the rss feed in this situation seems ok; there the link element
129   points back to the parent page.
130
131   > done --[[Joey]]
132
133 * One of Joey's commit messages says "Not ideal, it would be nicer to jump to
134   the actual comment posted, but no anchor is available". In fact there is
135   an anchor - the `\[[_comment]]` preprocessing wraps the comment in a `<div>`
136   with id="comment_123" or something. I'll fix this, unless Joey gets there
137   first. --[[smcv]]
138
139   > done --[[Joey]]