Edgewall Software

Changes between Initial Version and Version 1 of Ticket #10470, comment 6


Ignore:
Timestamp:
Nov 30, 2011, 10:19:28 AM (12 years ago)
Author:
osimons

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10470, comment 6

    initial v1  
    11By hooking into a fundamental rendering mechanism and adding `<script>...</script>` tags, you also make the assumption that all rendering will be destined for web page output inside the standard Trac layout. So unless jQuery (++) are already loaded correctly, any call inserted will of course fail.
    22
    3 To me this just runs a risk of entangling `format_to_html()` call with a specific purpose. This method should be output agnostic and not make assumptions about use - even though it is though a suggested keyword argument. If anything it should be handled by interacting with the `context` so maybe that one day will have methods that can customize output for specific purposes.
     3To me this just runs a risk of entangling `format_to_html()` call with a specific purpose. This method should be output agnostic and not make assumptions about use - even though it is through a suggested keyword argument. If anything it should be handled by interacting with the `context` so maybe that one day will have methods that can customize output for specific purposes.
    44
    55I've never really liked the structure of the `context` and how we bury `hints` inside it in a totally non-obvious manner, and call to `get_hint()` in arbitrary places to be used by the code as it pleases. It just makes things very complicated, and entangles the code with needs of the Trac project only. Plugins obviously have no way of interacting with this structure. To me, any supported 'hint' should be provided by a component extension point, and likewise the handling of the given hint for a given output context should also be extendible by others. The `load_stylesheet` hint could then be handled differently when rendering for email, Trac layout web, or even the HTML I call to generate for various purposes through the RPC interface. At that stage we could even drop the vague 'hint' term for a more formal 'feature' structure...