#390: Product wiki syntax
-------------------------+-------------------------------------------------
Reporter: olemis | Owner: olemis
Type: task | Status: accepted
Priority: major | Milestone:
Component: | Version:
multiproduct | Keywords: product resource wiki syntax
Resolution: | TracLinks
-------------------------+-------------------------------------------------
Comment (by olemis):
Replying to [comment:7 andrej]:
> Replying to [comment:6 olemis]:
> [...]
> > - The solution is smart when expanding nested (i.e. product: ,
global:) TracLinks
> > expressions containing whitespaces . For instance the equivalent
of this link
> > `search:"foo bar"` will be `global:"search:foo bar"` or
> > `product:"PREFIX:search:foo bar"` instead of `global:"search:\"foo
bar\""` .
> > More examples in the test cases.
> Search is not resource and I suggest to have search always global. If
user want specify product, syntax may look like:
{{{search:?q=trac+link&product=xxx}}} similar to existing legacy search
syntax e.g.: {{{search:?q=trac+link&wiki=on}}}
If that's the case then the link resolver (i.e. bh search plugin) has to
provide the right syntax . Notice that such URLs are generated by
TracSearch link resolver rather than our plugin . The nested links
formatter does not tweak URLs in any especial way . That's a
responsibility of product environment's href . So if you choose global
path only then there are two observations :
1. what will users get on accessing `/product/PREFIX/search` ? HTTP 404
? Redirect ?
2. I'd suggest to make `/product/PREFIX/search` equivalent to
/search?q=whatever&product=xxx as long as no other explicit
constraint will override it .
3. tests make use of built-in search component not bh search .
4. the TracLinks are decoupled from URL handling and generation .
Developers are still free to do whatever is considered correct
by implementing `IWikiSyntaxProvider` and nested resources formatter
will
stay out of the way . If product-aware , it's your plugin hence your
decision ;)
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/390#comment:12>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker