diff options
author | smcv <smcv@web> | 2014-06-30 16:44:41 -0400 |
---|---|---|
committer | admin <admin@branchable.com> | 2014-06-30 16:44:41 -0400 |
commit | 4e83442e6c50c212c236928b176442a7e320fab7 (patch) | |
tree | 90785b180c4c3d615ae512fd5bf0acb4d2cef779 | |
parent | cedbb3f0af9edc401231c6d8f91d7d897b28e5c0 (diff) | |
download | ikiwiki-4e83442e6c50c212c236928b176442a7e320fab7.tar ikiwiki-4e83442e6c50c212c236928b176442a7e320fab7.tar.gz |
design-taste opinions?
-rw-r--r-- | doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn b/doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn new file mode 100644 index 000000000..68d753f03 --- /dev/null +++ b/doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn @@ -0,0 +1,37 @@ +In [[todo/Option_linktext_for_pagestats_directive]] I wrote: + +> It's unfortunate that map and pagestats have different meanings for +> the show parameter. I'm tempted to propose a patch that adds something +> like limit (by analogy with SQL) or max as the canonical name for the +> "number of things to match" parameter, at which point a non-numeric show +> could mean [what [[spalax]] proposed]. + +It isn't immediately obvious whether `show` should be used like +`\[[!map show=title]]` or like `\[[!inline show=10]]`. I can't think of +any better names for the "which property to display" parameter that don't +have the problem of being a synonym for show so you can't easily tell which +is which, and I think that suggests that it might be better to rename the +"number of items to display" parameter instead. + +This would allow recycling the name `show` so that a non-numeric +value is interpreted analogous to `\[[!map show=title]]`, +for instance to solve [[todo/Option_linktext_for_pagestats_directive]]. + +If a committer (I think that just means Joey?) would review it, I'd be happy +to put together a patch that adds the chosen name to all the directives +that currently interpret `show` to mean "number of items", preferring the +new name but retaining compatibility for a numeric `show`. + +Some possibilities (using inline as my example directive here): + +* `\[[!inline limit=10]]` like SQL `select * from foo limit 10` +* `\[[!inline max-count=10]]` like `git log --max-count=10` +* `\[[!inline max=10]]` +* `\[[!inline n=10]]`, `\[[!inline num=10]]`, `\[[!inline number=10]]` + +Which of those do Joey/other contributors prefer? + +Or if keeping `show=10` is preferred, what should be the conventional name +for functionality like `\[[!map show=title]]`? + +I personally like the idea of `\[[!inline limit=10]]`. --[[smcv]] |