Re: wicked page export architecture

Sebastian Birnbach <[email protected]> Thu, 1 Feb 2018 14:57:22 +0100
Newsgroups gmane.comp.horde.devel
Message-ID <CACTNBFPNMvDVjQ_ve18gVHxgt+n=pWVqgkk6O-qU3G69BpYkuQ@mail.gmail.com>
2018-02-01 10:53 GMT+01:00 Ralf Lang <[email protected]>:

> Am 31.01.2018 um 14:55 schrieb Jan Schneider:
> >
> > Zitat von Sebastian Birnbach <[email protected]>:
> >
> >> Wicked permits page exports in plain text, HTML, LaTeX and reStructured
> >> Text via links at the end of each page.
> >>
> >> Over the attempt to print out a page I went for the HTML format, to find
> >> out (thanks for pointing this out, Jan) that the corresponding link
> >> returns
> >> just a HTML fragment, lacking the header with the charset and
> everything.
> >> Bad for printing.
> >>
> >> Could someone please explain what the rationale behind the fragments
> >> is? I
> >> see that for automated export his may come handy, piping a page into a
> >> larger text structure and everything. But said export is not API
> >> functionality but user-clickable links. What use would a fragment be to
> a
> >> user? And why is there no support for creating a printable page?
> >>
> >> Thanks for any architectural clarification.
> >>
> >>   Sebastian
> >
> > There is no special reasoning for this. We send what the different
> > renderers produce straight to the browser. Those links *are* APIs
> > though, and definitely are used as such. We for example use the ReST
> > export to synchronize documentation between the source code and the
> > wiki. Thus we cannot simply change the output, since it may break
> > existing consumers.
> > The correct way would be to add a print CSS theme, so that the page can
> > be printed correctly.
> >
> There should be a decorator layer between the API output and what the
> user sees when clicking the link. Breaking the API itself may not be best.
>
>
I agree, there should be a distinction between a full export (providing a
standalone document), and a partial export (providing a processable
fragment). Full export makes sense as a link, partial export may better be
done through an API.
BTW: Google often gives me links to wicked pages that are really exported
fragments. This inconvenience could also be solved through removing
'partial export' links from wicked pages.

  Sebastian
-- 
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]